]> git.proxmox.com Git - qemu-server.git/commit
drive mirror: prevent wrongly logging success when completion fails differently
authorFiona Ebner <f.ebner@proxmox.com>
Tue, 23 Jul 2024 12:07:59 +0000 (14:07 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 30 Jul 2024 19:15:15 +0000 (21:15 +0200)
commit7b4fac1275d43a7819d3f051cfb3a1ddb5594ca3
tree1ace85c863d038c9a441ec6b7f8f391421842a9f
parentf63cc6dbeb00928343ee93926a9feb200b78acc1
drive mirror: prevent wrongly logging success when completion fails differently

Currently, when completing a drive mirror job, only errors matching
"cannot be completed" will be handled. Other errors are ignored and
a wrong message that the job was completed successfully will be
printed to the log. An instance of this popped up in the community
forum [0].

The QMP command used for completing the job is either
'block-job-complete' or 'block-job-cancel'. The former causes the VM
to switch to the target drive, the latter doesn't, e.g. migration uses
the latter to not switch the source instance over to the target drive.
The 'block-job-cancel' command doesn't even have the same "cannot be
completed" message, but returns immediately.

The timeout for both 'block-job-cancel' and 'block-job-complete' is
set to 10 minutes in the QMPClient module, which should be enough.

[0]: https://forum.proxmox.com/threads/151518/

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
PVE/QemuServer.pm