You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With kvm.incremental.snapshot=true and snapshot.backup.to.secondary=false, createVolume or createTemplate from an incremental snapshot fails randomly with:
errorcode 530
Failed to copy snapshot: java.lang.RuntimeException: InvocationTargetException when invoking RPC callback for command: copySnapshotAsyncCallback
The agent log only says Failed to backup <uuid> ... to <secondary>/snapshots/<account>/<volume>. The real error is hidden because managesnapshot.sh sends qemu-img's output to /dev/null. I traced it on the host:
qemu-img convert ... : Could not create '<secondary>/snapshots/2/3/<uuid>': No such file or directory
What happens:
Both calls copy the snapshot into snapshots/<account>/<volume> on secondary. After the call, the SSVM deletes the copy and also removes the folder if it's empty (NfsSecondaryStorageResource.java#L2116-L2120).
On the next copy, backup_snapshot() only creates the folder if [ ! -d $destPath ] (managesnapshot.sh#L237-L245).
If the host has the same secondary export mounted somewhere else (configdrive, template), the NFS client can still see the folder the SSVM just removed. mkdir is skipped and qemu-img fails (managesnapshot.sh#L285).
Every failed copy I traced had no mkdir before qemu-img. Every good one had it.
KVM zone with NFS secondary. Set kvm.incremental.snapshot=true and snapshot.backup.to.secondary=false, restart the management server.
On a KVM host, keep a subfolder of the same secondary export mounted, like a configdrive mount does: mount -t nfs -o vers=4.2 <secstore>:/<export>/configdrive /mnt/keep
Deploy a VM on that host and take a full snapshot of its ROOT volume.
Loop: createSnapshot (incremental), then createVolume from it, then createTemplate from it.
Without step 2 I got 0 failures in 8 rounds. With it, 6 of 12 rounds failed, all with the error above.
Activity