[pmg-devel] applied: [PATCH pmg-api] pmgtunnel: adapt to read_etc_network_interfaces using run_command
Wolfgang Bumiller
w.bumiller at proxmox.com
Tue Aug 19 11:57:05 CEST 2025
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 at 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
More information about the pmg-devel
mailing list