slavkap commented on issue #4433: URL: https://github.com/apache/cloudstack/issues/4433#issuecomment-846091166
Hi all, I was able to reproduce the issue on the latest master also. Same configuration: ``` snapshot.backup.to.secondary=false kvm.snapshot.enabled=true primary storage - Ceph ``` If the snapshot is created bypassing secondary storage, maybe I'll say something stupid, but there is no implementation to create Volume from the snapshot. In the code, the image store of the source should be an NFS instance (but the snapshot does not exist on secondary) Also, there is another problem with the mgmt code. SnapshotDataFactoryImpl.getSnapshot should not search in snapshot_store_ref table by volume id and store role because, in some cases, it gets the wrong record. For example, if I want to create volume from a snapshot with id=11 (created only on primary), it gets the snapshot with id 5 because it looks for store_role = Image. Maybe there is a need to be added and snapshot.id also. ``` SELECT id,snapshot_id, store_role FROM cloud.snapshot_store_ref where volume_id=138; +----+-------------+------------+ | id | snapshot_id | store_role | +----+-------------+------------+ | 4 | 9 | Primary | | 5 | 9 | Image | | 7 | 11 | Primary | +----+-------------+------------+ ``` -- 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. For queries about this service, please contact Infrastructure at: [email protected]
