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 B80391FF183 for ; Wed, 30 Jul 2025 11:45:15 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D0A5C8645; Wed, 30 Jul 2025 11:46:31 +0200 (CEST) From: Christoph Heiss To: pve-devel@lists.proxmox.com Date: Wed, 30 Jul 2025 11:45:42 +0200 Message-ID: <20250730094549.263805-9-c.heiss@proxmox.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250730094549.263805-1-c.heiss@proxmox.com> References: <20250730094549.263805-1-c.heiss@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1753868745849 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. 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. [qemumigrate.pm] Subject: [pve-devel] [PATCH qemu-server v5 08/11] 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. Tested-by: Stefan Hanreich 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 Changes v3 -> v4: * no changes Changes v4 -> v5: * no changes src/PVE/QemuMigrate.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/PVE/QemuMigrate.pm b/src/PVE/QemuMigrate.pm index e4fbcbbe..e18cc2aa 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; @@ -1761,6 +1762,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