Shutdown action only calls delete.sh for system datastore
|Assignee:||Ruben S. Montero||% Done:|
|Category:||Drivers - Auth|
|Target version:||Release 4.0|
|Affected Versions:||OpenNebula 3.8|
I've just upgraded from 3.8.1 to 3.8.3 and I use Xen 4.1 hypervisors. I've developed IBM v7000 SAN datastore drivers for opennebula and I'm now polishing final details. I'm facing a big problem with non-persistent images and I'm pretty sure it was working in 3.8.1.
When I shutdown a VM with opennebula, I see only tm/shared/delete.sh script is called for system DS. My tm/v7000/delete.sh script for storage DS is ignored. As a consequence, non-persistent iscsi volumes are not unmapped and snapshots are not removed from san.
But if I shutdown from inside the VM, then delete the VM in "unknown" state in opennebula, my tm/v7000/delete.sh script is ran just before tm/shared/delete.sh for system DS and everything is fine. Do you have any idea about what is going wrong ?
#2 Updated by Ruben S. Montero about 6 years ago
- Status changed from New to Assigned
- Assignee set to Ruben S. Montero
- Target version set to Release 4.0
It seems that this may be a bug. The epilog scripts are different when you are shutting down the VM, and when you are deleting it. In the first case, persistent disks are move back (MVDS operation) to the datastore, the other disks are removed (DELETE operation). However, when you are deleting the VMs all the disks are deleted.
From the code, DELETE from shutdown use the system datastore scripts, while the DELETE from delete use the image datastore scripts. This is exactly the behavior described in the issue.
I agree that DELETE for persistent and non-persistent images should use the image datastore drivers. Volatile disks, must use the system datastore ones, as volatile images are created in the System DS.
THANKS FOR THE FEEDBACK!