oem-config breaks the systemd resolved link for /etc/resolv.conf in 18.04 server

Bug #1777900 reported by Woodrow Shen on 2018-06-20
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Undecided
Michael Hudson-Doyle
Bionic
Undecided
Michael Hudson-Doyle

Bug Description

[Impact]
When ubuntu 18.04 server is trying to do an OEM installation using oem-config-firstboot, the ubiquity breaks the symlink /etc/resolv.conf -> /run/systemd/resolv/stub-resolv.conf, replacing /etc/resolv.conf with a 0-byte file and thereby breaking name resolution.

[Test Case]
The reproducer steps:
1. Prepare ubuntu-server with d-i version
2. Install iso
3. apt install oem-config ubiquity-frontend-debconf oem-config-debconf
5. oem-config-prepare -q
6. reboot
7. enter oem-config and finish it
8. check if /etc/resolv.conf is broken (actually it becomes a zero-byte file)

[Regression potential]
The fix is simple, merely adding a service to oem-config.target's Wants=. Even if the service somehow fails to start or is not present on a system, the other functionality of oem-config will be unaffected.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubiquity (Ubuntu):
status: New → Confirmed
description: updated
Phillip Susi (psusi) on 2018-06-21
affects: ubiquity (Ubuntu) → oem-config (Ubuntu)
Dimitri John Ledkov (xnox) wrote :

@psusi

oem-config package does not exist, the package is ubiquity.

affects: oem-config (Ubuntu) → ubiquity (Ubuntu)
Dimitri John Ledkov (xnox) wrote :

Typically one should install a specific frontend _and_ the backend. Not just the backend.
I.e. debconf frontend & oem-config; or kde frontend & ubiquity. etc.

Steven Clarkson (stvnclarkson) wrote :

I've also experienced this bug. My workaround was to install resolvconf as the oem user.

tags: added: id-5b453ca6b8f2f5261594eb65
Michael Hudson-Doyle (mwhudson) wrote :

Some findings: systemd-resolved is not running when oem-config runs. Starting systemd-resolved from another shell before going through oem-config fixes the observed problem, so on the assumption that starting it is the correct solution, I made https://code.launchpad.net/~mwhudson/ubiquity/+git/ubiquity/+merge/352792

Changed in ubiquity (Ubuntu):
status: Confirmed → In Progress
description: updated
Changed in ubiquity (Ubuntu):
status: In Progress → Fix Committed
assignee: nobody → Michael Hudson-Doyle (mwhudson)
Changed in ubiquity (Ubuntu Bionic):
assignee: nobody → Michael Hudson-Doyle (mwhudson)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 18.10.7

---------------
ubiquity (18.10.7) cosmic; urgency=medium

  [ Dariusz Gadomski ]
  * Implement missing reboot and shutdown methods in debconf_ui (LP: #1749289)

  [ Michael Hudson-Doyle ]
  * Add systemd-resolved to oem-config.target's Wants (LP: #1777900)
  * Automatic update of included source packages: console-setup
    1.178ubuntu8, partman-jfs 53, partman-lvm 124.

 -- Michael Hudson-Doyle <email address hidden> Fri, 17 Aug 2018 10:23:14 +1200

Changed in ubiquity (Ubuntu):
status: Fix Committed → Fix Released
description: updated

Hello Woodrow, or anyone else affected,

Accepted ubiquity into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubiquity/18.04.14.7 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ubiquity (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-bionic
Changed in ubiquity (Ubuntu Bionic):
status: Fix Committed → In Progress

An upload of ubiquity to bionic-proposed has been rejected from the upload queue for the following reason: "should be re-uploaded with console-setup 1.178ubuntu2.7".

Hello Woodrow, or anyone else affected,

Accepted ubiquity into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubiquity/18.04.14.8 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ubiquity (Ubuntu Bionic):
status: In Progress → Fix Committed
Woodrow Shen (woodrow-shen) wrote :

Hi Łukasz,

I took some time to verify the ubiquity on proposed repo, and oem-config works correctly with fix to give the right way. Thanks your support.

test@ubuntu:~$ ll /etc/resolv.conf
lrwxrwxrwx 1 root root 39 Aug 30 23:20 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
test@ubuntu:~$ cat /var/log/installer/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
test@ubuntu:~$ cat /var/log/installer/version
ubiquity 18.04.14.8

tags: added: verification-done-bionic
removed: verification-needed-bionic
tags: removed: verification-needed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers