From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 77C161FF165 for ; Thu, 3 Jul 2025 13:56:55 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5F7261221A; Thu, 3 Jul 2025 13:57:04 +0200 (CEST) From: Christoph Heiss To: pve-devel@lists.proxmox.com Date: Thu, 3 Jul 2025 13:54:11 +0200 Message-ID: <20250703115621.883244-10-c.heiss@proxmox.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250703115621.883244-1-c.heiss@proxmox.com> References: <20250703115621.883244-1-c.heiss@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.030 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy 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: [pve-devel] [PATCH qemu-server v3 09/14] migrate: flush old VM conntrack entries after successful migration 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: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" After a successful live-migration, the old VM-specific conntrack entries are not needed anymore on the source node and can thus be flushed. Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * no changes Changes v2 -> v3: * formatted using perltidy * adjusted info message by adding `[on source] node` at end for better context src/PVE/QemuMigrate.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/PVE/QemuMigrate.pm b/src/PVE/QemuMigrate.pm index a6922198..22e7bb80 100644 --- a/src/PVE/QemuMigrate.pm +++ b/src/PVE/QemuMigrate.pm @@ -11,6 +11,7 @@ use Time::HiRes qw( usleep ); use PVE::AccessControl; use PVE::Cluster; use PVE::Format qw(render_bytes); +use PVE::Firewall::Helpers; use PVE::GuestHelpers qw(safe_boolean_ne safe_string_ne); use PVE::INotify; use PVE::JSONSchema; @@ -1755,6 +1756,10 @@ sub phase3_cleanup { if (my $err = $@) { $self->log('warn', "failed to stop dbus-vmstate on $targetnode: $err\n"); } + + # also flush now-old local conntrack entries for the migrated VM + $self->log('info', 'flushing conntrack state for guest on source node'); + PVE::Firewall::Helpers::flush_fw_ct_entries_by_mark($vmid); } } -- 2.49.0 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel