From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 3D7BC96F24 for ; Fri, 27 Jan 2023 10:00:23 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id DE558609D for ; Fri, 27 Jan 2023 10:00:22 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 27 Jan 2023 10:00:21 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 831B646737 for ; Fri, 27 Jan 2023 10:00:21 +0100 (CET) Date: Fri, 27 Jan 2023 10:00:14 +0100 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox VE development discussion References: <20230118135240.318550-1-f.ebner@proxmox.com> In-Reply-To: <20230118135240.318550-1-f.ebner@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.16.0 (https://github.com/astroidmail/astroid) Message-Id: <1674809718.agoo0izrzx.astroid@yuna.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.131 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com, qemumigrate.pm] Subject: [pve-devel] applied: [PATCH qemu-server] close #2792: allow online migration with replicated snapshots X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jan 2023 09:00:23 -0000 On January 18, 2023 2:52 pm, Fiona Ebner wrote: > Since commit 9b6efe43 ("migrate: add live-migration of replicated > disks") live-migration with replicated volumes is possible. When > handling the replication, it is checked that all local volumes > previously detected as replicatable are actually replicated. So the > check if migration with snapshots is possible can just allow volumes > that are detected as replicatable. >=20 > Note that VM state files are also replicated. >=20 > If there is an invalid configuration with a non-replicatable volume or > state file and replication is enabled, then replication will fail, and > thus migration will fail early. >=20 > Trying to live-migrate to a non-replication target (needs --force) > will still fail if there are snapshots, because they are (correctly) > detected as non-replicated. >=20 > Signed-off-by: Fiona Ebner > --- >=20 > This seems too easy. What did I miss ;)? it looks good to me - and I think all the work we did on restructuring the migration code and especially the volume handling paid off :) there is a thread waiting for this, so maybe we can ping them once it hits pvetest: https://forum.proxmox.com/threads/error-online-storage-migration-not-possib= le-if-snapshot-exists-on-zfspool-bug-in-qemumigrate-pm.107025 > PVE/QemuMigrate.pm | 4 +++- > test/run_qemu_migrate_tests.pl | 9 ++++++--- > 2 files changed, 9 insertions(+), 4 deletions(-) >=20 > diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm > index 5e466d95..0c12f77d 100644 > --- a/PVE/QemuMigrate.pm > +++ b/PVE/QemuMigrate.pm > @@ -433,7 +433,9 @@ sub scan_local_volumes { > # we cannot migrate shapshots on local storage > # exceptions: 'zfspool' or 'qcow2' files (on directory storage) > =20 > - die "online storage migration not possible if snapshot exists\n" if $s= elf->{running}; > + die "online storage migration not possible if non-replicated snapshot = exists\n" > + if $self->{running} && !$local_volumes->{$volid}->{replicated}; > + > die "remote migration with snapshots not supported yet\n" if $self->{o= pts}->{remote}; > =20 > if (!($scfg->{type} eq 'zfspool' > diff --git a/test/run_qemu_migrate_tests.pl b/test/run_qemu_migrate_tests= .pl > index 0dffaa43..3a3049d7 100755 > --- a/test/run_qemu_migrate_tests.pl > +++ b/test/run_qemu_migrate_tests.pl > @@ -678,7 +678,7 @@ my $tests =3D [ > 'with-local-disks' =3D> 1, > }, > expected_calls =3D> {}, > - expect_die =3D> 'online storage migration not possible if snapshot exis= ts', > + expect_die =3D> 'online storage migration not possible if non-replicate= d snapshot exists', > expected =3D> { > source_volids =3D> local_volids_for_vm(4567), > target_volids =3D> {}, > @@ -1237,8 +1237,11 @@ my $tests =3D [ > 'with-local-disks' =3D> 1, > }, > target_volids =3D> local_volids_for_vm(105), > - expected_calls =3D> {}, > - expect_die =3D> "online storage migration not possible if snapshot exis= ts", > + expected_calls =3D> { > + %{$replicated_expected_calls_online}, > + 'block-dirty-bitmap-add-drive-scsi0' =3D> 1, > + 'block-dirty-bitmap-add-drive-ide0' =3D> 1, > + }, > expected =3D> { > source_volids =3D> local_volids_for_vm(105), > target_volids =3D> local_volids_for_vm(105), > --=20 > 2.30.2 >=20 >=20 >=20 > _______________________________________________ > pve-devel mailing list > pve-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel >=20 >=20 >=20