From: Hannes Duerr <h.duerr@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Fiona Ebner <f.ebner@proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu-server] block job: mirror: always detach the target node upon error
Date: Mon, 28 Jul 2025 14:08:40 +0200 [thread overview]
Message-ID: <62f6ed23-6ae6-4a37-9944-197fb9eb64b9@proxmox.com> (raw)
In-Reply-To: <20250728100702.38685-1-f.ebner@proxmox.com>
I attempted to migrate a VM with its disk on local storage, but this
failed due to insufficient space on the target node.
I then moved the disk to shared storage and attempted the migration again.
This time, the migration succeeded.
Please consider this:
Tested-by: Hannes Duerr <h.duerr@proxmox.com>
On 7/28/25 12:07 PM, Fiona Ebner wrote:
> For example, attempting to live-migrate a disk again after failure
> would not work, because a node with the same name would still be
> attached.
>
> Mirroring the disk to a shared storage after VM live-migration failure
> and then attempting VM live-migration again, would result in
>
>> migration status error: failed - Error in migration completion: Input/output error
> This is because for migration completion, all attached block devices
> are flushed, but the NBD export does not exist on the target side
> anymore.
>
> Fixes: 1da91175 ("block job: add blockdev mirror")
> Reported-by: Hannes Dürr <h.duerr@proxmox.com>
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
> src/PVE/QemuServer/BlockJob.pm | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/PVE/QemuServer/BlockJob.pm b/src/PVE/QemuServer/BlockJob.pm
> index 9c04600b..f742b184 100644
> --- a/src/PVE/QemuServer/BlockJob.pm
> +++ b/src/PVE/QemuServer/BlockJob.pm
> @@ -28,6 +28,9 @@ sub qemu_handle_concluded_blockjob {
> eval { mon_cmd($vmid, 'job-dismiss', id => $job_id); };
> log_warn("$job_id: failed to dismiss job - $@") if $@;
>
> + # If there was an error, always detach the target.
> + $job->{'detach-node-name'} = $job->{'target-node-name'} if $qmp_info->{error};
> +
> if (my $node_name = $job->{'detach-node-name'}) {
> eval { PVE::QemuServer::Blockdev::detach($vmid, $node_name); };
> log_warn($@) if $@;
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-07-28 12:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-28 10:06 Fiona Ebner
2025-07-28 12:08 ` Hannes Duerr [this message]
2025-07-29 6:08 ` 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=62f6ed23-6ae6-4a37-9944-197fb9eb64b9@proxmox.com \
--to=h.duerr@proxmox.com \
--cc=f.ebner@proxmox.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox