GutoVeronezi opened a new pull request, #6422:
URL: https://github.com/apache/cloudstack/pull/6422

   ### Description
   
   PR #5297 introduced the disk-only snapshot feature for KVM, which changed 
the whole snapshot workflow for KVM. While taking a volume snapshot and the 
global setting `snapshot.backup.to.secondary` is `true`, ACS will backup the 
snapshot from the primary storage to the secondary storage. As the disk-only 
snapshot process generates an external file, the backup process only copies it 
to the secondary storage.
   The extract snapshot from VM snapshot feature uses the same backup workflow 
to extract the snapshot from the VM directly to the secondary storage. However, 
as the process was changed to only copy the file, the following error occurs 
when trying to extract a snapshot from a VM snapshot:
   
   
   ```
   2022-05-30 11:55:19,152 DEBUG [kvm.storage.KVMStorageProcessor] 
(agentRequest-Handler-2:null) (logid:565d35b1) Executing: 
/usr/share/cloudstack-common/scripts/storage/qcow2/managesnapshot.sh -b 
i-2-5-VM_VS_20220530114135 -n i-2-5-VM_VS_20220530114135 -p 
/mnt/3ac1f06a-3f50-3e03-b53e-92faead36a85/snapshots/2/5 -t 
248e458e-f2c5-48c3-86bc-5201104a5832 
   2022-05-30 11:55:19,155 DEBUG [kvm.storage.KVMStorageProcessor] 
(agentRequest-Handler-2:null) (logid:565d35b1) Executing while with timeout : 
21600000
   2022-05-30 11:55:19,167 DEBUG [kvm.storage.KVMStorageProcessor] 
(agentRequest-Handler-2:null) (logid:565d35b1) Exit value is 3
   2022-05-30 11:55:19,168 DEBUG [kvm.storage.KVMStorageProcessor] 
(agentRequest-Handler-2:null) (logid:565d35b1) ***Failed to backup snapshot 
i-2-5-VM_VS_20220530114135, undefined type i-2-5-VM_VS_20220530114135
   ```
   
   As the VM snapshot is internal, the backup workflow has to be different. 
This PR address the fix for the situation, by using the previous backup 
workflow when a snapshot is being extracted from a VM snapshot.
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [x] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [x] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [x] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### How Has This Been Tested?
   
   In a local lab I created a VM and took a VM snapshot. With the changes I 
could extract the VM snapshot and do other operations with it (create volume, 
create template and so on).
   I also took a volume snapshot and tested the operations (create volume, 
create template and so on).


-- 
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