GutoVeronezi commented on issue #6804:
URL: https://github.com/apache/cloudstack/issues/6804#issuecomment-1274649819

   @levindecaro @DaanHoogland
   
   When taking a snapshot with ACS prior to 4.17, it would set the snapshot 
path as `disk.getPath() + File.separator + snapshotName`. Then, when deleting 
the snapshot, ACS would use the `disk path` and the `snapshot name` to call the 
script `managesnapshot` (which calls `$qemu_img snapshot -l $disk |tail -n 
+3|awk '{print $1}'|xargs -I {} $qemu_img snapshot -d {} $disk >&2`). 
   
   When taking a snapshot in 4.17, the snapshot path is created with the 
primary storage path + '/snapshot/' + snapshot name. When deleting the 
snapshot, ACS will try to remove the file in that path. As the old snapshot 
path format was not a real path, in 4.17, it throws the exception `Not a 
directory`, as seen in the logs. 
   
   One option is to mark the primary storage reference (in 
`snapshot_store_ref`) as removed for the snapshots taken before upgrading to 
4.17, so ACS would not unnecessary try to delete them in the primary storage.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to