please re-add Support-system-image-read-only-etc.patch

Bug #1778936 reported by Michael Vogt on 2018-06-27
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Undecided
Unassigned
Bionic
Undecided
Unassigned
Cosmic
Undecided
Unassigned

Bug Description

[Impact]

 * core18 systems fail to update hostname
 * this happens due to /etc/hostname actually being a symlink to a file under /etc/writable/, adjust hostnamed to take that into account when trying to update /etc/hostname

[Test Case]

 * run a core18 system, check that dhcp acquire hostname is correctly updated in /etc/writable/hostname

[Regression Potential]

 * This is cherrypick of code that has gone missing since xenial.
 * There is no change of behaviour for the classic systems.
 * Currently, core18 systems simply fail to update hostname/machine-info files, thus the worst case is that they will still fail to do so.

[Other Info]

 * original bug report

The 16.04 version of systemd had a patch to support the read-only etc. For core18 we will also need this change because core18 is still not on a fully writable etc.

I will attach a debdiff against the current bionic version of systemd.

Michael Vogt (mvo) wrote :
tags: added: patch
Changed in systemd (Ubuntu Cosmic):
status: New → Fix Committed
Dimitri John Ledkov (xnox) wrote :

https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-cosmic/cosmic/amd64/s/snapd/20180830_184959_a6800@/log.gz

appears to fail with this change in

2018-08-30 18:49:42 Successful tasks: 279
2018-08-30 18:49:42 Aborted tasks: 0
2018-08-30 18:49:42 Failed tasks: 1
    - autopkgtest:ubuntu-18.10-amd64:tests/main/dirs-not-shared-with-host:alternatives
error: unsuccessful run

Should this change be backed out of cosmic-proposed?

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 239-7ubuntu7

---------------
systemd (239-7ubuntu7) cosmic; urgency=medium

  * boot-and-services: skip gdm test, when gdm-x-session fails.
    Across all architectures, gdm fails to come up reliably since cosmic.
    (LP: #1790478)

 -- Dimitri John Ledkov <email address hidden> Mon, 03 Sep 2018 16:33:00 +0100

Changed in systemd (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Changed in systemd (Ubuntu Bionic):
status: New → In Progress
description: updated

Hello Michael, or anyone else affected,

Accepted systemd into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/237-3ubuntu10.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 for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in systemd (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Łukasz Zemczak (sil2100) wrote :

Hello Michael, or anyone else affected,

Accepted systemd into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/237-3ubuntu10.10 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 for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Dimitri John Ledkov (xnox) wrote :

@mvo

Security wants to trump this again... Can you please validate this? I'm not sure how to boot a core18 system.

@xnox

Hello, I validated the fix on core18 but I still see the error trying to set the hostname

This line is failing:

+ test-snapd-sh.with-hostname-control-plug -c 'hostnamectl set-hostname localhost'
Could not set property: Failed to set static hostname: Read-only file system

I created a branch where I build snapd using systemd from proposed "systemd (= 237-3ubuntu10.10)", and then I use that snapd fo build the ubuntu core 18 where I execute the test.

The test which is failing is https://github.com/snapcore/snapd/blob/master/tests/main/interfaces-hostname-control/task.yaml.

Thanks

To reproduce the error:

1. checkout this branch:
  https://github.com/sergiocazzolato/snapd/tree/tests-validate-lp-1778936
2. run the test:
  spread -debug google:ubuntu-core-18-64:tests/main/interfaces-hostname-control

@xnox, testing is still ongoing, today I'll have more information about it

Finally I could verify the fix works well and fixes the issue.

We are building core18 image using the snap which has systemd from proposed.

Steps to validate:

1. build core18 snap using proposed
  > git clone -b master https://git.launchpad.net/snap-core18
  > cd snap-core18
  > sed -i -e 's/current/pending/g' Makefile
  > sudo snapcraft
2. prepare test
  > git clone https://github.com/sergiocazzolato/snapd.git
  > git checkout tests-validate-lp-1778936
  > cd snapd
  > < copy the core18_18_amd64.snad to tests/lib/ directory >
3. run the tests
  > spread -debug google:ubuntu-core-18-64:tests/main/interfaces-hostname-control

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers