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 3F9A91FF185 for ; Mon, 18 Aug 2025 15:12:29 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 292E4383DA; Mon, 18 Aug 2025 15:14:13 +0200 (CEST) From: Stoiko Ivanov To: pmg-devel@lists.proxmox.com Date: Mon, 18 Aug 2025 15:13:33 +0200 Message-Id: <20250818131333.13364-1-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1755522780724 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.065 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 Subject: [pmg-devel] [PATCH pmg-api] pmgtunnel: adapt to read_etc_network_interfaces using run_command X-BeenThere: pmg-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Mail Gateway development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pmg-devel-bounces@lists.proxmox.com Sender: "pmg-devel" the changes in pve-common: 346ff97 ("inotify/interfaces: use 'ip link' instead of /proc/net/dev") made the /etc/network/interfaces parser call `ip link -details` via run_command. This was the first use of a external command apart from the ssh processes for the tunnels. pmgtunnel changed the SIGCHLD handler before entering it's main-loop, which in turn made run_command return an error on each invocation: `command 'ip -details -json link show' failed: failed to execute` The issue is not directly reproducible, as /etc/network/interfaces is only read if the node-name does not resolv to a non-loopback ip (via /etc/hosts or DNS). reported in our community-forum: https://forum.proxmox.com/threads/.169854/ Signed-off-by: Stoiko Ivanov --- minimally tested on a PMG Cluster I have for testing, where I reproduced this by commenting each node's entry in their /etc/hosts and stopping the DNS-Server used by the nodes. src/PMG/Service/pmgtunnel.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/PMG/Service/pmgtunnel.pm b/src/PMG/Service/pmgtunnel.pm index 513bba0..7b9fa28 100644 --- a/src/PMG/Service/pmgtunnel.pm +++ b/src/PMG/Service/pmgtunnel.pm @@ -180,7 +180,10 @@ sub run { $next_update = time() + $updatetime; eval { + # reset SIGCHLD handler as ClusterConfig::new uses run_command (for reading ip link) + $SIG{CHLD} = 'DEFAULT'; my $cinfo = PMG::ClusterConfig->new(); # reload + $SIG{CHLD} = \&finish_children; $self->purge_tunnels($cinfo); $self->start_tunnels($cinfo); }; -- 2.39.5 _______________________________________________ pmg-devel mailing list pmg-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel