[Bug 1714169] [NEW] systemd /etc/resolv.conf setup on new installation breaks in-target package installation.
Vinson Lee
1714169 at bugs.launchpad.net
Thu Aug 31 06:16:29 UTC 2017
Public bug reported:
This Ubuntu systemd commit breaks in-target package installation on
netboot installs.
https://git.launchpad.net/~usd-import-
team/ubuntu/+source/systemd/commit/?id=76e5adfa6d1fb60e9622ca4b0d03a5b4f130885a
The netboot initrd does not use systemd. /etc/resolv.conf is an actual
generated file and there is no /run/systemd/resolve/stub-resolv.conf.
Package installation in /target is done through in-target. in-target bind mounts the initrd /run to /target/run. After base-installer installs the systemd deb in /target, any subsequent in-target invocation to install a package fails. The repository containing the package cannot be resolved because /target/etc.resolv.conf will be a symlink to the bind mounted
non-existent /target/run/systemd/resolve/stub-resolv.conf from the initrd.
# chroot /target ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 39 Aug 29 22:32 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
# chroot /target ls -l /run/systemd/resolve/
total 4
-rw-r--r-- 1 root root 89 Aug 29 22:32 stub-resolv.conf
# chroot /target cat /etc/resolv.conf
search <redacted>
nameserver <redacted>
# chroot /target ls -l /run
total 12
drwxrwxrwt 2 root root 4096 Aug 29 22:30 lock
drwxr-xr-x 2 root root 4096 Aug 29 22:30 mount
drwxr-xr-x 3 root root 4096 Aug 29 22:32 systemd
-rw-rw-r-- 1 root utmp 0 Aug 29 22:30 utmp
# in-target ls -l /etc/resolv.conf
Aug 29 22:37:04 in-target: lrwxrwxrwx 1 root root 39 Aug 29 22:32 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
# in-target ls -l /run/systemd/resolve/
Aug 29 22:40:27 in-target: ls: cannot access '/run/systemd/resolve/'
Aug 29 22:40:27 in-target: : No such file or directory
# in-target cat /etc/resolv.conf
Aug 29 22:41:48 in-target: cat: /etc/resolv.conf
Aug 29 22:41:48 in-target: : No such file or directory
# in-target ls -l /run/
Aug 29 22:44:32 in-target: total 0
Aug 29 22:44:32 in-target: drwxr-xr-x 2 root root 40 Aug 29 22:26 lock
Aug 29 22:44:32 in-target: drwxr-xr-x 2 root root 60 Aug 29 22:26 mount
Aug 29 22:44:32 in-target: drwxr-xr-x 4 root root 100 Aug 29 22:30 udev
** Affects: systemd (Ubuntu)
Importance: Undecided
Status: New
** Tags: artful
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1714169
Title:
systemd /etc/resolv.conf setup on new installation breaks in-target
package installation.
Status in systemd package in Ubuntu:
New
Bug description:
This Ubuntu systemd commit breaks in-target package installation on
netboot installs.
https://git.launchpad.net/~usd-import-
team/ubuntu/+source/systemd/commit/?id=76e5adfa6d1fb60e9622ca4b0d03a5b4f130885a
The netboot initrd does not use systemd. /etc/resolv.conf is an actual
generated file and there is no /run/systemd/resolve/stub-resolv.conf.
Package installation in /target is done through in-target. in-target bind mounts the initrd /run to /target/run. After base-installer installs the systemd deb in /target, any subsequent in-target invocation to install a package fails. The repository containing the package cannot be resolved because /target/etc.resolv.conf will be a symlink to the bind mounted
non-existent /target/run/systemd/resolve/stub-resolv.conf from the initrd.
# chroot /target ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 39 Aug 29 22:32 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
# chroot /target ls -l /run/systemd/resolve/
total 4
-rw-r--r-- 1 root root 89 Aug 29 22:32 stub-resolv.conf
# chroot /target cat /etc/resolv.conf
search <redacted>
nameserver <redacted>
# chroot /target ls -l /run
total 12
drwxrwxrwt 2 root root 4096 Aug 29 22:30 lock
drwxr-xr-x 2 root root 4096 Aug 29 22:30 mount
drwxr-xr-x 3 root root 4096 Aug 29 22:32 systemd
-rw-rw-r-- 1 root utmp 0 Aug 29 22:30 utmp
# in-target ls -l /etc/resolv.conf
Aug 29 22:37:04 in-target: lrwxrwxrwx 1 root root 39 Aug 29 22:32 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
# in-target ls -l /run/systemd/resolve/
Aug 29 22:40:27 in-target: ls: cannot access '/run/systemd/resolve/'
Aug 29 22:40:27 in-target: : No such file or directory
# in-target cat /etc/resolv.conf
Aug 29 22:41:48 in-target: cat: /etc/resolv.conf
Aug 29 22:41:48 in-target: : No such file or directory
# in-target ls -l /run/
Aug 29 22:44:32 in-target: total 0
Aug 29 22:44:32 in-target: drwxr-xr-x 2 root root 40 Aug 29 22:26 lock
Aug 29 22:44:32 in-target: drwxr-xr-x 2 root root 60 Aug 29 22:26 mount
Aug 29 22:44:32 in-target: drwxr-xr-x 4 root root 100 Aug 29 22:30 udev
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1714169/+subscriptions
More information about the foundations-bugs
mailing list