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 C02EAE05C for ; Thu, 21 Apr 2022 09:36:02 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id AED911BB6A for ; Thu, 21 Apr 2022 09:35:32 +0200 (CEST) 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)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 302621BB61 for ; Thu, 21 Apr 2022 09:35:32 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 0060D42663 for ; Thu, 21 Apr 2022 09:35:31 +0200 (CEST) Date: Thu, 21 Apr 2022 09:35:25 +0200 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Fabian Ebner , pve-devel@lists.proxmox.com References: <20220318075123.5445-1-f.ebner@proxmox.com> <1650457969.m5c6lqzh1t.astroid@nora.none> <07464575-25ec-9a0e-5e93-cb89bcea1757@proxmox.com> In-Reply-To: <07464575-25ec-9a0e-5e93-cb89bcea1757@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1650526327.oafw0qvb7g.astroid@nora.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.172 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 Subject: Re: [pve-devel] [PATCH qemu-server] migrate: keep VM paused after migration if it was before 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: Thu, 21 Apr 2022 07:36:02 -0000 On April 21, 2022 9:20 am, Fabian Ebner wrote: > Am 20.04.22 um 14:43 schrieb Fabian Gr=C3=BCnbichler: >> one other thing I noticed (pre-existing, but the changes here made me=20 >> look and my search came up short), inside phase2: >>=20 >> - start block job(s) without autocompletion and wait for them to=20 >> converge >> - start RAM/state migration without autocompletion and wait for it to=20 >> converge >> X both source and target VMs are paused now with "identical" state,=20 >> irrespective of the source being paused or not initially >> - cancel block job(s) (to close NBD writer(s) so that switchover can=20 >> proceed in phase3_cleanup) >>=20 >> if something happens after X in phase2, we enter phase2_cleanup, and=20 >> attempt to cancel the migration, remove the lock, cancel the block jobs=20 >> again, clean up bitmaps, stop the target VM, clean up remote disks, tear= =20 >> down the tunnel, and effectively exit the migration at that point BUT -=20 >> we don't handle the paused state? is there a resume source (with this=20 >> patch, guarded by source was not paused) missing or am I missing=20 >> something? >=20 > Quickly tested it, but there is no resume call for the source (with or > without the patch) in this scenario. I don't think there is any real > downside to try and resume on the source in phase2_cleanup(). exactly - I expected such a call to be there somewhere in error handling=20 (similar to the vzdump flow), but didn't find it. it was just your patch=20 that made me look, not that your patch made anything worse ;)