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

Bug #1777900 reported by Woodrow Shen
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Fix Released
Undecided
Michael Hudson-Doyle
Bionic
Fix Released
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.

Revision history for this message
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)
affects: ubiquity (Ubuntu) → oem-config (Ubuntu)
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

@psusi

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

affects: oem-config (Ubuntu) → ubiquity (Ubuntu)
Revision history for this message
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.

Revision history for this message
Steven Clarkson (sclarkson) wrote :

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

tags: added: id-5b453ca6b8f2f5261594eb65
Revision history for this message
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)
Revision history for this message
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
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

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
Revision history for this message
Adam Conrad (adconrad) wrote : Proposed package upload rejected

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".

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

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
Revision history for this message
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
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for ubiquity has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 18.04.14.8

---------------
ubiquity (18.04.14.8) bionic; urgency=medium

  * Revert inclusion of package updates from cosmic.
  * Automatic update of included source packages: console-setup
    1.178ubuntu2.7.

ubiquity (18.04.14.7) bionic; 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)

 -- Michael Hudson-Doyle <email address hidden> Sun, 26 Aug 2018 19:53:26 +1200

Changed in ubiquity (Ubuntu Bionic):
status: Fix Committed → Fix Released
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.