[Bug 1812466] [NEW] netboot: failed to parse DNS settings set by dhclient
cuihao
1812466 at bugs.launchpad.net
Sat Jan 19 04:35:55 UTC 2019
Public bug reported:
I am setting up diskless netboot for Ubuntu LiveCDs, with following
kernel arguments:
```
boot=casper netboot=nfs nfsroot=192.168.89.10:/extracted/livecd toram
```
I have noticed the following strange error messages after dhcp (also see
the attachment):
```
/init: /run/net-ens3.conf: line 8: 202.38.64.56: not found
/init: /run/net-ens3.conf: line 8: 202.38.64.56: not found
/init: /run/net-ens3.conf: line 8: 202.38.64.56: not found
no search or nameservers found in /run/net-ens3.conf /run/net-ens3.conf /run/net6-*.conf
/init: /run/net-ens3.conf: line 8: 202.38.64.56: not found
/init: /run/net-ens3.conf: line 8: 202.38.64.56: not found
```
I manually broke the init process, and found line 8 of /run/net-
ens3.conf is:
```
IPV4DNS0=192.168.88.1 202.38.64.56 202.38.64.17
```
The problematic code is in the `netinfo_to_resolv_conf` function of
`scripts/functions`. It sources `/run/net-ens3.conf` (which is obviously
not in correct shell syntax due to the space inserted between multiple
DNS servers) to get network settings:
```
. "$f" || { echo "WARN: failed '. \"$f\"'" 1>&2; return 1; }
```
The bug is introduced by commit a77729e9, which replaced IP-config with
dhclient. While IP-config seems to write each DNS in `IPV4DNS0`,
`IPV4DNS1`, etc., dhclient write all DNS in `IPV4DNS0`, which is not
expected by `netinfo_to_resolv_conf`.
I can confirm 18.10 LiveCDs are affected.
** Affects: initramfs-tools (Ubuntu)
Importance: Undecided
Status: New
** Attachment added: "bug.png"
https://bugs.launchpad.net/bugs/1812466/+attachment/5230482/+files/bug.png
** Description changed:
- I am setting up diskless netboot for Ubuntu LiveCDs.
+ I am setting up diskless netboot for Ubuntu LiveCDs, with following
+ kernel arguments:
```
boot=casper netboot=nfs nfsroot=192.168.89.10:/extracted/livecd toram
```
I have noticed the following strange error messages after dhcp (also see
the attachment):
```
/init: /run/net-ens3.conf: line 8: 202.38.64.56: not found
/init: /run/net-ens3.conf: line 8: 202.38.64.56: not found
/init: /run/net-ens3.conf: line 8: 202.38.64.56: not found
no search or nameservers found in /run/net-ens3.conf /run/net-ens3.conf /run/net6-*.conf
/init: /run/net-ens3.conf: line 8: 202.38.64.56: not found
/init: /run/net-ens3.conf: line 8: 202.38.64.56: not found
```
I manually broke the init process, and found line 8 of /run/net-
ens3.conf is:
```
IPV4DNS0=192.168.88.1 202.38.64.56 202.38.64.17
```
The problematic code is in the `netinfo_to_resolv_conf` function of
`scripts/functions`. It sources `/run/net-ens3.conf` (which is obviously
not in correct shell syntax due to the space inserted between multiple
DNS servers) to get network settings:
```
. "$f" || { echo "WARN: failed '. \"$f\"'" 1>&2; return 1; }
```
The bug is introduced by commit a77729e9, which replaced IP-config with
dhclient. While IP-config seems to write each DNS in `IPV4DNS0`,
`IPV4DNS1`, etc., dhclient write all DNS in `IPV4DNS0`, which is not
expected by `netinfo_to_resolv_conf`.
I can confirm 18.10 LiveCDs are affected.
--
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/1812466
Title:
netboot: failed to parse DNS settings set by dhclient
Status in initramfs-tools package in Ubuntu:
New
Bug description:
I am setting up diskless netboot for Ubuntu LiveCDs, with following
kernel arguments:
```
boot=casper netboot=nfs nfsroot=192.168.89.10:/extracted/livecd toram
```
I have noticed the following strange error messages after dhcp (also
see the attachment):
```
/init: /run/net-ens3.conf: line 8: 202.38.64.56: not found
/init: /run/net-ens3.conf: line 8: 202.38.64.56: not found
/init: /run/net-ens3.conf: line 8: 202.38.64.56: not found
no search or nameservers found in /run/net-ens3.conf /run/net-ens3.conf /run/net6-*.conf
/init: /run/net-ens3.conf: line 8: 202.38.64.56: not found
/init: /run/net-ens3.conf: line 8: 202.38.64.56: not found
```
I manually broke the init process, and found line 8 of /run/net-
ens3.conf is:
```
IPV4DNS0=192.168.88.1 202.38.64.56 202.38.64.17
```
The problematic code is in the `netinfo_to_resolv_conf` function of
`scripts/functions`. It sources `/run/net-ens3.conf` (which is
obviously not in correct shell syntax due to the space inserted
between multiple DNS servers) to get network settings:
```
. "$f" || { echo "WARN: failed '. \"$f\"'" 1>&2; return 1; }
```
The bug is introduced by commit a77729e9, which replaced IP-config
with dhclient. While IP-config seems to write each DNS in `IPV4DNS0`,
`IPV4DNS1`, etc., dhclient write all DNS in `IPV4DNS0`, which is not
expected by `netinfo_to_resolv_conf`.
I can confirm 18.10 LiveCDs are affected.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1812466/+subscriptions
More information about the foundations-bugs
mailing list