MitchDrage commented on code in PR #14305:
URL: https://github.com/apache/cloudstack/pull/14305#discussion_r4205629691
##########
scripts/vm/hypervisor/kvm/nasbackup.sh:
##########
@@ -276,12 +292,20 @@ print(len(files))
backup_begin=1;
fi
fi
+ if [[ $backup_begin -eq 1 ]]; then
+ BACKUP_JOB_ACTIVE=1
+ fi
if [[ $thaw -eq 1 ]]; then
- if ! response=$(virsh -c qemu:///system qemu-agent-command "$VM"
'{"execute":"guest-fsfreeze-thaw"}' 2>&1); then
- echo "Failed to thaw the filesystem for vm $VM: $response"
- cleanup
- exit 1
+ if ! response=$(qemu_agent_command '{"execute":"guest-fsfreeze-thaw"}'
2>&1); then
+ if [[ $freeze_ok -eq 1 ]]; then
+ echo "Failed to thaw the filesystem for vm $VM: $response"
+ cleanup
+ exit 1
Review Comment:
Fixed in 432a153207.
A failed thaw is now checked with guest-fsfreeze-status and retried up to
three times.
The backup continues only when the guest reports thawed, or when the freeze
failed and the domain XML shows the agent channel as disconnected, which means
the freeze never reached the guest. Anything else fails the backup.
Tested on libvirt 8.0 by stopping the guest agent mid-backup.
The results were that a thaw that timed out and then recovered completed the
backup, and an agent that stayed stuck lead to a failed backup.
--
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]