systemd /etc/resolv.conf setup on new installation breaks in-target package installation.

Bug #1714169 reported by Vinson Lee
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
netcfg (Ubuntu)
Confirmed
Undecided
Dimitri John Ledkov

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

Tags: artful
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I believe debian-installer has resolvconf integration which used to fake this for us, and this must be extended to fake things for resolved too.

affects: systemd (Ubuntu) → netcfg (Ubuntu)
Changed in netcfg (Ubuntu):
status: New → Confirmed
assignee: nobody → Dimitri John Ledkov (xnox)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.