From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Stoiko Ivanov <s.ivanov@proxmox.com>
Cc: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] applied: [PATCH pmg-api] pmgtunnel: adapt to read_etc_network_interfaces using run_command
Date: Tue, 19 Aug 2025 11:57:05 +0200 [thread overview]
Message-ID: <kprt2u2q6d7tirw3digbzqfkldwkey3ajepgr5inw653e6vtb7@3y3j22vcmc4v> (raw)
In-Reply-To: <20250818131333.13364-1-s.ivanov@proxmox.com>
applied (yesterday already)
thanks
On Mon, Aug 18, 2025 at 03:13:33PM +0200, Stoiko Ivanov wrote:
> 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
prev parent reply other threads:[~2025-08-19 9:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-18 13:13 [pmg-devel] " Stoiko Ivanov
2025-08-19 9:57 ` Wolfgang Bumiller [this message]
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=kprt2u2q6d7tirw3digbzqfkldwkey3ajepgr5inw653e6vtb7@3y3j22vcmc4v \
--to=w.bumiller@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
--cc=s.ivanov@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox