Bug#931173: Configuring static networking via NoCloud with Network Config Version 2 does not work
On 2/13/20 12:44 PM, Christian Tramnitz wrote: > Is there any progress in getting 19.3 into stable? I can see it was not > part of the Buster 10.3 release. > If this takes any longer I'd suggest to backport the initially mentioned > patch. > > > BR, > Christian We currently don't have any answer from the release team, so we can't tell, really. Opening a new big will not help. Cheers, Thomas Goirand (zigo)
Bug#931173: Configuring static networking via NoCloud with Network Config Version 2 does not work
Is there any progress in getting 19.3 into stable? I can see it was not part of the Buster 10.3 release. If this takes any longer I'd suggest to backport the initially mentioned patch. BR, Christian OnTue, 31. Dez. 2019 at 16:57 Uhr Thomas Goirand wrote: > This is included in cloud-init 19.3 which is currently in Sid/Testing, > and as our current plan is to backport 19.3 as the new version for > buster-proposed-updates, this may be solved with this upgrade. Let's > wait and see what the stable release team says. > >
Bug#931173: Configuring static networking via NoCloud with Network Config Version 2 does not work
On 12/31/19 1:13 PM, Christian Tramnitz wrote: > On Tue, 13 Aug 2019 10:04:03 +0200 Bastian Blank wrote: >> - cloud-init write the config file using a name that is ignored by >> ifupdown. The filename is "50-cloud-init.cfg" and everything with "-" >> or "_" in it is ignored. (wtf?) > > No, it's the other way around: > File names may *only* include alphanumeric and "-" + "_" but not a dot. > So the ".cfg" is the part that is causing the problem. > > This has already been addressed upstream, see > https://github.com/canonical/cloud-init/commit/a6faf3acef02bd8cd4d46ac9efeebf24b3f21d81#diff-6bf578623d31fa6e19b21138b2c41e8e > > So I'd suggest to backport this patch: > https://github.com/canonical/cloud-init/commit/a6faf3acef02bd8cd4d46ac9efeebf24b3f21d81.patch This is included in cloud-init 19.3 which is currently in Sid/Testing, and as our current plan is to backport 19.3 as the new version for buster-proposed-updates, this may be solved with this upgrade. Let's wait and see what the stable release team says. Cheers, Thomas Goirand (zigo)
Bug#931173: Configuring static networking via NoCloud with Network Config Version 2 does not work
On Tue, 13 Aug 2019 10:04:03 +0200 Bastian Blank wrote: > - cloud-init write the config file using a name that is ignored by > ifupdown. The filename is "50-cloud-init.cfg" and everything with "-" > or "_" in it is ignored. (wtf?) No, it's the other way around: File names may *only* include alphanumeric and "-" + "_" but not a dot. So the ".cfg" is the part that is causing the problem. This has already been addressed upstream, see https://github.com/canonical/cloud-init/commit/a6faf3acef02bd8cd4d46ac9efeebf24b3f21d81#diff-6bf578623d31fa6e19b21138b2c41e8e So I'd suggest to backport this patch: https://github.com/canonical/cloud-init/commit/a6faf3acef02bd8cd4d46ac9efeebf24b3f21d81.patch Best regards, Christian
Bug#931173: Configuring static networking via NoCloud with Network Config Version 2 does not work
Hi Sven On Thu, Jun 27, 2019 at 02:38:53PM +0200, Sven Bartscher wrote: > The specified network-config doesn't seem to have any actual effect on > what actually happens when the system boots. From what I see, > cloud-init generates a configuration file from my specified > configuration in /etc/network/interfaces.d/50-cloud-init.cfg with the > following contents: Thanks for bringing this up. However I have bad news: this can not work with ifupdown. Reasons: - cloud-init write the config file using a name that is ignored by ifupdown. The filename is "50-cloud-init.cfg" and everything with "-" or "_" in it is ignored. (wtf?) - ifupdown can't handle duplicated network definitions. It will try to setup both static ips and use dhcp, and fail. The first could be fixed pretty easily. However the second can not really without reinventing everything. Regards, Bastian -- Youth doesn't excuse everything. -- Dr. Janice Lester (in Kirk's body), "Turnabout Intruder", stardate 5928.5.
Bug#931173: Configuring static networking via NoCloud with Network Config Version 2 does not work
Package: cloud-init Version: 18.3-6 Severity: normal I was trying to start a machine with a static network setup using cloud-init. I supplied cloud-init with the following data on a NoCloud ISO image: /meta-data: instance-id: iid-foo-1 local-hostname: foo /user-data: #cloud-config chpasswd: { expire: False } password: ssh_authorized_keys: - ssh_pwauth: True timezone: Europe/Berlin users: - default /network-config: version: 2 ethernets: enp1s0: match: macaddress: "52:54:00:95:3b:42" addresses: - 192.168.123.2/255.255.255.0 gateway4: 192.168.123.1 The specified network-config doesn't seem to have any actual effect on what actually happens when the system boots. From what I see, cloud-init generates a configuration file from my specified configuration in /etc/network/interfaces.d/50-cloud-init.cfg with the following contents: # This file is generated from information provided by # the datasource. Changes to it will not persist across an instance. # To disable cloud-init's network configuration capabilities, write a file # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: # network: {config: disabled} auto lo iface lo inet loopback auto enp1s0 iface enp1s0 inet static address 192.168.123.2/24 gateway 192.168.123.1 but the file apparently has not effect, as /run/network/interfaces.d/enp1s0 seems to have precedence and apparently always uses dhcp for the interface. I also tried to use the set-name option of the Network Configuration Version 2 format, to change the name of the interface, but apparently that really confuses ifup, because it still tries to bring up the old interface name. -- System Information: Debian Release: 10.0 APT prefers testing-debug APT policy: (990, 'testing-debug'), (990, 'testing'), (102, 'unstable-debug'), (102, 'unstable'), (101, 'experimental-debug'), (101, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.19.0-5-amd64 (SMP w/4 CPU cores) Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), LANGUAGE=de_DE.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages cloud-init depends on: ii cloud-guest-utils 0.29-1 ii fdisk 2.33.1-0.1 ii gdisk 1.0.3-1.1 ii ifupdown0.8.35 ii locales 2.28-10 ii lsb-base10.2019051400 ii lsb-release 10.2019051400 ii net-tools 1.60+git20180626.aebd88e-1 ii procps 2:3.3.15-2 ii python3 3.7.3-1 pn python3-configobj ii python3-jinja2 2.10-2 pn python3-jsonpatch ii python3-jsonschema 2.6.0-4 pn python3-oauthlib ii python3-requests2.21.0-1 ii python3-six 1.12.0-1 ii python3-yaml3.13-2 ii util-linux 2.33.1-0.1 Versions of packages cloud-init recommends: ii eatmydata 105-7 ii sudo 1.8.27-1 Versions of packages cloud-init suggests: ii btrfs-progs 4.20.1-2 ii e2fsprogs1.44.5-1 ii xfsprogs 4.20.0-1