From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 46BB16080E for ; Wed, 9 Sep 2020 21:13:01 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 3BCA014077 for ; Wed, 9 Sep 2020 21:12:31 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 880F314053 for ; Wed, 9 Sep 2020 21:12:29 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 4DBE344AD9 for ; Wed, 9 Sep 2020 21:12:29 +0200 (CEST) From: Thomas Lamprecht To: pve-devel@lists.proxmox.com Date: Wed, 9 Sep 2020 21:12:22 +0200 Message-Id: <20200909191223.4187564-4-t.lamprecht@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200909191223.4187564-1-t.lamprecht@proxmox.com> References: <20200909191223.4187564-1-t.lamprecht@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.186 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust 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. [alpine.pm] Subject: [pve-devel] applied: [PATCH container 4/5] alpine: setup net: pass whole config to parent method 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: , X-List-Received-Date: Wed, 09 Sep 2020 19:13:01 -0000 We expected the whole $conf to be passed in a call to setup_network, a bit ago it worked if their where only the netX keys present, for some plugin that still is the case. But, in the Debian version, reused by Alpine, we now check if the CT distro version is recent enough to support (or need) the address in CIDR format. So, at least "ostype" needs to be passed to, else we get ugly warnings in the syslog (or the recently added --debug log CLI switch) Just pass the whole config, the setup_network method need to cope with that anyway. Signed-off-by: Thomas Lamprecht --- src/PVE/LXC/Setup/Alpine.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/PVE/LXC/Setup/Alpine.pm b/src/PVE/LXC/Setup/Alpine.pm index 75d6ebe..e486971 100644 --- a/src/PVE/LXC/Setup/Alpine.pm +++ b/src/PVE/LXC/Setup/Alpine.pm @@ -86,21 +86,24 @@ sub setup_network { # at least with the workaround the networking starts and if an ipv4 is # configured slaac for ipv6 works (unless accept_ra = 0 in the node) - my $netconf = {}; + my $newconf = {}; my $networks = {}; foreach my $k (keys %$conf) { + my $value = $conf->{$k}; + $newconf->{$k} = $value; next if $k !~ m/^net(\d+)$/; - my $netstring = $conf->{$k}; + + my $netstring = $value; # check for dhcp6: my $d = PVE::LXC::Config->parse_lxc_network($netstring); if (defined($d->{ip6}) && ($d->{ip6} eq 'dhcp' || $d->{ip6} eq 'auto')) { $d->{ip6} = 'manual'; $netstring = PVE::LXC::Config->print_lxc_network($d); } - $netconf->{$k} = $netstring; + $newconf->{$k} = $netstring; } - PVE::LXC::Setup::Debian::setup_network($self, $netconf); + PVE::LXC::Setup::Debian::setup_network($self, $newconf); } 1; -- 2.20.1