From: Alexandre Derumier <aderumier@odiso.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server 2/2] migration: add missing eval on nbdstop with tunnel v2.
Date: Fri, 29 Sep 2023 10:28:59 +0200 [thread overview]
Message-ID: <20230929082859.147270-3-aderumier@odiso.com> (raw)
In-Reply-To: <20230929082859.147270-1-aderumier@odiso.com>
It was already done in tunnel v1.
Avoid to avoid migration (and keep both source/targetvm locked) if nbdstop error occur
2023-09-28 16:20:39 ERROR: error - tunnel command '{"cmd":"nbdstop"}' failed - failed to handle 'nbdstop' command - VM 140 qmp command 'nbd-server-stop' failed - got timeout
2023-09-28 16:20:39 ERROR: migration finished with problems (duration 00:01:42)
---
PVE/QemuMigrate.pm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index f41c61f..81880e5 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -1475,7 +1475,13 @@ sub phase3_cleanup {
$self->log('info', "stopping NBD storage migration server on target.");
# stop nbd server on remote vm - requirement for resume since 2.9
if ($tunnel && $tunnel->{version} && $tunnel->{version} >= 2) {
- PVE::Tunnel::write_tunnel($tunnel, 30, 'nbdstop');
+ eval {
+ PVE::Tunnel::write_tunnel($tunnel, 30, 'nbdstop');
+ };
+ if (my $err = $@) {
+ $self->log('err', $err);
+ $self->{errors} = 1;
+ }
} else {
my $cmd = [@{$self->{rem_ssh}}, 'qm', 'nbdstop', $vmid];
--
2.39.2
next prev parent reply other threads:[~2023-09-29 8:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-29 8:28 [pve-devel] [PATCH qemu-server 0/2] migration: fix sporadic nbd-server-stop timeout Alexandre Derumier
2023-09-29 8:28 ` [pve-devel] [PATCH qemu-server 1/2] nbd_stop: increase timeout to 25s Alexandre Derumier
2023-09-29 8:28 ` Alexandre Derumier [this message]
2023-09-29 11:57 ` [pve-devel] [PATCH qemu-server 0/2] migration: fix sporadic nbd-server-stop timeout Fiona Ebner
2023-11-06 18:48 ` [pve-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230929082859.147270-3-aderumier@odiso.com \
--to=aderumier@odiso.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.