JoaoJandre commented on PR #10632:
URL: https://github.com/apache/cloudstack/pull/10632#issuecomment-2976349420

   > @JoaoJandre, when testing some more advanced workflows of creation, 
reversion and deletion of disk-only VM snapshots, I created the following 
scenario:
   > 
   >     * Created snapshots `s1`, `s2` and `s3`
   > 
   >     * Reverted to snapshot `s2` and created snapshot `s4`
   > 
   > 
   > Then, I deleted snapshot `s2` and verified that it was marked as `Hidden` 
in the DB. Deleted snapshot `s1` and reverted to snapshot `s3`:
   > 
   > 
![Image](https://private-user-images.githubusercontent.com/115510880/455268517-2ad083fd-1c19-4b5f-a69e-008dae35a4dd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTAwNzU3ODMsIm5iZiI6MTc1MDA3NTQ4MywicGF0aCI6Ii8xMTU1MTA4ODAvNDU1MjY4NTE3LTJhZDA4M2ZkLTFjMTktNGI1Zi1hNjllLTAwOGRhZTM1YTRkZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwNjE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDYxNlQxMjA0NDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00NDZiYmQwNTg3NTNkODRkMzdlNDNmNTlkZGUwOGVkMDQ1NjAxOWEwNmI0Zjk0OWRkMWY3MmEzNGI2YTQ0NTMzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.txhcbj97qu6QYabvv8VmPzy2aOW6yzmlR879n1fxDt8)
   > 
   > 
![Image](https://private-user-images.githubusercontent.com/115510880/455268568-dd621a42-d099-4ade-a81c-5c6bb9275c82.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTAwNzU3ODMsIm5iZiI6MTc1MDA3NTQ4MywicGF0aCI6Ii8xMTU1MTA4ODAvNDU1MjY4NTY4LWRkNjIxYTQyLWQwOTktNGFkZS1hODFjLTVjNmJiOTI3NWM4Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwNjE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDYxNlQxMjA0NDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jMDFiODMzNjgyOTk5ZjM4NDY3M2E0Y2MyZmIzZmZiN2U4YTY0OWQ5ODQzMzM3M2QwZmMyMzAzMWI2MjA0MTQwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.rxfEUDCxdAuZtFUcH0T_5uCY6GOcchtYcfnulYAWyFs)
   > 
   > When reverting to the `s3` snapshot, the operation failed:
   > 
   > 
![Image](https://private-user-images.githubusercontent.com/115510880/455268603-e40761b5-551f-4627-9ae1-55d14d92d84e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTAwNzU3ODMsIm5iZiI6MTc1MDA3NTQ4MywicGF0aCI6Ii8xMTU1MTA4ODAvNDU1MjY4NjAzLWU0MDc2MWI1LTU1MWYtNDYyNy05YWUxLTU1ZDE0ZDkyZDg0ZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwNjE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDYxNlQxMjA0NDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05NDhlMGFlYTNmYTI2N2U5Yzk1N2U5ODNjNDllMWMzY2NmOTE3ZDJiY2I0YjIwZDBjNjA2YmIwMzA3MmIyZjRhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Lufxz_RSQq6UpVSEly_Y5c1gPHTF4oCw99CX4DrC-BI)
   > 
   > The logs seem to indicate an error when creating the new delta for the 
volume:
   > 
   > ```shell
   > 2025-06-15 15:29:11,565 DEBUG 
[resource.wrapper.LibvirtRevertDiskOnlyVMSnapshotCommandWrapper] 
(AgentRequest-Handler-1:[]) (logid:59368419) Creating new delta for volume 
[4b80abb2-562c-4325-b68f-3655e933daeb] as part of the disk-only VM snapshot 
revert process for VM [i-2-14-VM].
   > 2025-06-15 15:29:11,565 DEBUG [utils.script.Script] 
(AgentRequest-Handler-1:[]) (logid:59368419) Executing command [qemu-img create 
-f qcow2 -F qcow2 -b 
/mnt/10d28cdf-71a7-33ad-802e-f4ec9042e4fd/d0dd008e-9458-4995-b9ca-e0f41bb73556 
/mnt/10d28cdf-71a7-33ad-802e-f4ec9042e4fd/f9fa34c3-993a-47d1-a7aa-6c08ec23f9dd 
].
   > 2025-06-15 15:29:11,584 WARN  [utils.script.Script] 
(AgentRequest-Handler-1:[]) (logid:59368419) Execution of process [8348] for 
command [qemu-img create -f qcow2 -F qcow2 -b 
/mnt/10d28cdf-71a7-33ad-802e-f4ec9042e4fd/d0dd008e-9458-4995-b9ca-e0f41bb73556 
/mnt/10d28cdf-71a7-33ad-802e-f4ec9042e4fd/f9fa34c3-993a-47d1-a7aa-6c08ec23f9dd 
] failed.
   > 2025-06-15 15:29:11,584 DEBUG [utils.script.Script] 
(AgentRequest-Handler-1:[]) (logid:59368419) Exit value of process [8348] for 
command [qemu-img create -f qcow2 -F qcow2 -b 
/mnt/10d28cdf-71a7-33ad-802e-f4ec9042e4fd/d0dd008e-9458-4995-b9ca-e0f41bb73556 
/mnt/10d28cdf-71a7-33ad-802e-f4ec9042e4fd/f9fa34c3-993a-47d1-a7aa-6c08ec23f9dd 
] is [1].
   > 2025-06-15 15:29:11,584 WARN  [utils.script.Script] 
(AgentRequest-Handler-1:[]) (logid:59368419) Process [8348] for command 
[qemu-img create -f qcow2 -F qcow2 -b 
/mnt/10d28cdf-71a7-33ad-802e-f4ec9042e4fd/d0dd008e-9458-4995-b9ca-e0f41bb73556 
/mnt/10d28cdf-71a7-33ad-802e-f4ec9042e4fd/f9fa34c3-993a-47d1-a7aa-6c08ec23f9dd 
] encountered the error: [qemu-img: 
/mnt/10d28cdf-71a7-33ad-802e-f4ec9042e4fd/f9fa34c3-993a-47d1-a7aa-6c08ec23f9dd: 
Could not open backing file: Could not open backing file: Could not open 
'/mnt/10d28cdf-71a7-33ad-802e-f4ec9042e4fd/4b80abb2-562c-4325-b68f-3655e933daeb':
 No such file or directoryCould not open backing image.].
   > 2025-06-15 15:29:11,584 ERROR 
[resource.wrapper.LibvirtRevertDiskOnlyVMSnapshotCommandWrapper] 
(AgentRequest-Handler-1:[]) (logid:59368419) Exception while reverting 
disk-only VM snapshot for VM [i-2-14-VM]. Deleting leftover deltas. 
org.apache.cloudstack.utils.qemu.QemuImgException: qemu-img: 
/mnt/10d28cdf-71a7-33ad-802e-f4ec9042e4fd/f9fa34c3-993a-47d1-a7aa-6c08ec23f9dd: 
Could not open backing file: Could not open backing file: Could not open 
'/mnt/10d28cdf-71a7-33ad-802e-f4ec9042e4fd/4b80abb2-562c-4325-b68f-3655e933daeb':
 No such file or directoryCould not open backing image.
   >    at org.apache.cloudstack.utils.qemu.QemuImg.create(QemuImg.java:268)
   >    at org.apache.cloudstack.utils.qemu.QemuImg.create(QemuImg.java:200)
   >    at org.apache.cloudstack.utils.qemu.QemuImg.create(QemuImg.java:297)
   >    at 
com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRevertDiskOnlyVMSnapshotCommandWrapper.execute(LibvirtRevertDiskOnlyVMSnapshotCommandWrapper.java:71)
   >    at 
com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRevertDiskOnlyVMSnapshotCommandWrapper.execute(LibvirtRevertDiskOnlyVMSnapshotCommandWrapper.java:43)
   > --
   >    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
   >    at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
   >    at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
   >    at java.base/java.lang.Thread.run(Thread.java:840)
   > 
   > 2025-06-15 15:29:11,591 DEBUG [cloud.agent.Agent] 
(AgentRequest-Handler-1:[]) (logid:59368419) Seq 1-6557804007404863671:  { Ans: 
, MgmtId: 169551026600426, via: 1, Ver: v1, Flags: 110, 
[{"com.cloud.agent.api.Answer":{"result":"false","details":"Exception: 
org.apache.cloudstack.utils.qemu.QemuImgException
   > Message: qemu-img: 
/mnt/10d28cdf-71a7-33ad-802e-f4ec9042e4fd/f9fa34c3-993a-47d1-a7aa-6c08ec23f9dd: 
Could not open backing file: Could not open backing file: Could not open 
'/mnt/10d28cdf-71a7-33ad-802e-f4ec9042e4fd/4b80abb2-562c-4325-b68f-3655e933daeb':
 No such file or directoryCould not open backing image.
   > Stack: org.apache.cloudstack.utils.qemu.QemuImgException: qemu-img: 
/mnt/10d28cdf-71a7-33ad-802e-f4ec9042e4fd/f9fa34c3-993a-47d1-a7aa-6c08ec23f9dd: 
Could not open backing file: Could not open backing file: Could not open 
'/mnt/10d28cdf-71a7-33ad-802e-f4ec9042e4fd/4b80abb2-562c-4325-b68f-3655e933daeb':
 No such file or directoryCould not open backing image.
   >    at org.apache.cloudstack.utils.qemu.QemuImg.create(QemuImg.java:268)
   >    at org.apache.cloudstack.utils.qemu.QemuImg.create(QemuImg.java:200)
   >    at org.apache.cloudstack.utils.qemu.QemuImg.create(QemuImg.java:297)
   > ```
   > 
   > Below are uploaded the full workflow execution logs:
   > 
   >     * 
[ms-logs.txt](https://github.com/user-attachments/files/20746296/ms-logs.txt)
   > 
   >     * 
[agent-logs.txt](https://github.com/user-attachments/files/20746297/agent-logs.txt)
   
   @bernardodemarco thank you for the tests, I'll check it out as soon as 
possible.


-- 
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: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to