all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-api] pmgtunnel: adapt to read_etc_network_interfaces using run_command
Date: Mon, 18 Aug 2025 15:13:33 +0200	[thread overview]
Message-ID: <20250818131333.13364-1-s.ivanov@proxmox.com> (raw)

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 <s.ivanov@proxmox.com>
---
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


             reply	other threads:[~2025-08-18 13:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-18 13:13 Stoiko Ivanov [this message]
2025-08-19  9:57 ` [pmg-devel] applied: " Wolfgang Bumiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250818131333.13364-1-s.ivanov@proxmox.com \
    --to=s.ivanov@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal