[Bug 1840965] [NEW] netplan initramfs code writes invalid net-eth0.conf
Alkis Georgopoulos
1840965 at bugs.launchpad.net
Wed Aug 21 18:32:27 UTC 2019
Public bug reported:
While netbooting, in initramfs-tools/scripts/functions, netplan for some
reason tries to overwrite /run/net-enp0s3.conf that is initially and
correctly generated by ipconfig.
There, it writes unquoted values like the following, which are a shell syntax error:
IPV4DNS0=1.2.3.1 1.2.3.2 1.2.3.3
Then, initramfs-tools/init tries to source that in various places, and produces the following message a lot of times:
/init: /run/net-enp0s3.conf: line 8: 1.2.3.2: not found
I.e. values should be quoted, and 2 DNS entries should go in
IPV4DNS0/IPV4DNS1, not multiple unquoted ones in IPV4DNS0.
Here is the erroneous file that netplan produces:
DEVICE=enp0s3
PROTO=dhcp
IPV4PROTO=dhcp
IPV4ADDR=10.161.254.38
IPV4NETMASK=255.255.255.0
IPV4BROADCAST=10.161.254.255
IPV4GATEWAY=10.161.254.1
IPV4DNS0=194.63.237.4 194.63.239.164 194.63.238.4
ROOTSERVER=10.161.254.1
HOSTNAME=
DNSDOMAIN=
Here is the correct one that ipconfig initially produces, before getting overwritten:
DEVICE='enp0s3'
PROTO='dhcp'
IPV4ADDR='10.161.254.38'
IPV4BROADCAST='10.161.254.255'
IPV4NETMASK='255.255.255.0'
IPV4GATEWAY='10.161.254.1'
IPV4DNS0='194.63.237.4'
IPV4DNS1='194.63.239.164'
HOSTNAME=''
DNSDOMAIN=''
NISDOMAIN=''
ROOTSERVER='10.161.254.1'
ROOTPATH=''
filename=''
UPTIME='594'
DHCPLEASETIME='25200'
DOMAINSEARCH=''
Thank you.
** Affects: netplan
Importance: Undecided
Status: New
** Affects: initramfs-tools (Ubuntu)
Importance: Undecided
Status: New
** Also affects: initramfs-tools (Ubuntu)
Importance: Undecided
Status: New
** Description changed:
While netbooting, in initramfs-tools/scripts/functions, netplan for some
reason tries to overwrite /run/net-enp0s3.conf that is initially and
correctly generated by ipconfig.
There, it writes unquoted values like the following, which are a shell syntax error:
IPV4DNS0=1.2.3.1 1.2.3.2 1.2.3.3
Then, initramfs-tools/init tries to source that in various places, and produces the following message a lot of times:
- /init: /run/net-enp0s3.conf: line 8: 1.2.32: not found
+ /init: /run/net-enp0s3.conf: line 8: 1.2.3.2: not found
I.e. values should be quoted, and 2 DNS entries should go in
IPV4DNS0/IPV4DNS1, not multiple unquoted ones in IPV4DNS0.
Here is the erroneous file that netplan produces:
DEVICE=enp0s3
PROTO=dhcp
IPV4PROTO=dhcp
IPV4ADDR=10.161.254.38
IPV4NETMASK=255.255.255.0
IPV4BROADCAST=10.161.254.255
IPV4GATEWAY=10.161.254.1
IPV4DNS0=194.63.237.4 194.63.239.164 194.63.238.4
ROOTSERVER=10.161.254.1
HOSTNAME=
DNSDOMAIN=
-
Here is the correct one that ipconfig initially produces, before getting overwritten:
DEVICE='enp0s3'
PROTO='dhcp'
IPV4ADDR='10.161.254.38'
IPV4BROADCAST='10.161.254.255'
IPV4NETMASK='255.255.255.0'
IPV4GATEWAY='10.161.254.1'
IPV4DNS0='194.63.237.4'
IPV4DNS1='194.63.239.164'
HOSTNAME=''
DNSDOMAIN=''
NISDOMAIN=''
ROOTSERVER='10.161.254.1'
ROOTPATH=''
filename=''
UPTIME='594'
DHCPLEASETIME='25200'
DOMAINSEARCH=''
Thank you.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to initramfs-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1840965
Title:
netplan initramfs code writes invalid net-eth0.conf
Status in netplan:
New
Status in initramfs-tools package in Ubuntu:
New
Bug description:
While netbooting, in initramfs-tools/scripts/functions, netplan for
some reason tries to overwrite /run/net-enp0s3.conf that is initially
and correctly generated by ipconfig.
There, it writes unquoted values like the following, which are a shell syntax error:
IPV4DNS0=1.2.3.1 1.2.3.2 1.2.3.3
Then, initramfs-tools/init tries to source that in various places, and produces the following message a lot of times:
/init: /run/net-enp0s3.conf: line 8: 1.2.3.2: not found
I.e. values should be quoted, and 2 DNS entries should go in
IPV4DNS0/IPV4DNS1, not multiple unquoted ones in IPV4DNS0.
Here is the erroneous file that netplan produces:
DEVICE=enp0s3
PROTO=dhcp
IPV4PROTO=dhcp
IPV4ADDR=10.161.254.38
IPV4NETMASK=255.255.255.0
IPV4BROADCAST=10.161.254.255
IPV4GATEWAY=10.161.254.1
IPV4DNS0=194.63.237.4 194.63.239.164 194.63.238.4
ROOTSERVER=10.161.254.1
HOSTNAME=
DNSDOMAIN=
Here is the correct one that ipconfig initially produces, before getting overwritten:
DEVICE='enp0s3'
PROTO='dhcp'
IPV4ADDR='10.161.254.38'
IPV4BROADCAST='10.161.254.255'
IPV4NETMASK='255.255.255.0'
IPV4GATEWAY='10.161.254.1'
IPV4DNS0='194.63.237.4'
IPV4DNS1='194.63.239.164'
HOSTNAME=''
DNSDOMAIN=''
NISDOMAIN=''
ROOTSERVER='10.161.254.1'
ROOTPATH=''
filename=''
UPTIME='594'
DHCPLEASETIME='25200'
DOMAINSEARCH=''
Thank you.
To manage notifications about this bug go to:
https://bugs.launchpad.net/netplan/+bug/1840965/+subscriptions
More information about the foundations-bugs
mailing list