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

Bug #1778936 reported by Michael Vogt
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Fix Released
High
Unassigned
Bionic
Fix Released
Undecided
Unassigned
Cosmic
Fix Released
Undecided
Unassigned
Focal
Fix Released
High
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.

Revision history for this message
Michael Vogt (mvo) wrote :
tags: added: patch
Changed in systemd (Ubuntu Cosmic):
status: New → Fix Committed
Revision history for this message
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?

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

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
Revision history for this message
Ł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.

Revision history for this message
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.

Revision history for this message
Sergio Cazzolato (sergio-j-cazzolato) wrote :

@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

Revision history for this message
Sergio Cazzolato (sergio-j-cazzolato) wrote :

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

Revision history for this message
Sergio Cazzolato (sergio-j-cazzolato) wrote :

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

Revision history for this message
Sergio Cazzolato (sergio-j-cazzolato) wrote :

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

Revision history for this message
Sergio Cazzolato (sergio-j-cazzolato) wrote :
Revision history for this message
Michael Vogt (mvo) wrote :

This is now uploaded again into the unapproved queue.

Revision history for this message
Michael Vogt (mvo) wrote :

The previous upload was superseded by a security upload so it never made it into the archive.

Revision history for this message
Ł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.16 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.

Revision history for this message
Ł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.17 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.

Revision history for this message
Michael Vogt (mvo) wrote :

This is tested via spread in https://github.com/snapcore/snapd/pull/6667

Revision history for this message
Sergio Cazzolato (sergio-j-cazzolato) wrote :

Validation completed. No errors detected on:

bionic: 237-3ubuntu10.17
core18: systemd 237

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for systemd 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 systemd - 237-3ubuntu10.17

---------------
systemd (237-3ubuntu10.17) bionic; urgency=medium

  [ Michael Vogt ]
  * d/p/Support-system-image-read-only-etc.patch:
    - re-add support for /etc/writable for core18 (LP: #1778936)
  * d/p/fix-race-daemon-reload-8803.patch:
    - backport systemd upstream PR#8803 and PR#11121 to fix race
      when doing systemctl and systemctl daemon-reload at the
      same time LP: #1819728

  [ Balint Reczey ]
   * d/p/virt-detect-WSL-environment-as-a-container.patch:
     - virt: detect WSL environment as a container (LP: #1816753)

 -- Michael Vogt <email address hidden> Mon, 18 Mar 2019 08:40:44 +0100

Changed in systemd (Ubuntu Bionic):
status: Fix Committed → Fix Released
Michael Vogt (mvo)
Changed in systemd (Ubuntu Focal):
status: Fix Released → Triaged
importance: Undecided → Critical
Revision history for this message
Michael Vogt (mvo) wrote :
Changed in systemd (Ubuntu Focal):
importance: Critical → High
Revision history for this message
Brian Murray (brian-murray) wrote :

Michael - is this something which you'd like a review of or are you planning on uploading it?

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.9 KiB)

This bug was fixed in the package systemd - 244.1-0ubuntu2

---------------
systemd (244.1-0ubuntu2) focal; urgency=medium

  [ Dimitri John Ledkov ]
  * shutdown: do not detach autoclear loopback devices
    Author: Dimitri John Ledkov
    File: debian/patches/shutdown-do-not-detach-autoclear-loopback-devices.patch
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=3978d34b59e98cdd01836c41a10442967636b8fc

  [ Balint Reczey ]
  * Revert upstream commit breaking IPv4 DHCP in LXC containers in 244.1
    (LP: #1857123)
    File: debian/patches/Revert-network-if-sys-is-rw-then-udev-should-be-around.patch
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=39c12f8e736afd1b7bdeb13ff6bccaea85020873

systemd (244.1-0ubuntu1) focal; urgency=medium

  * New upstream version 244.1
    - network: set ipv6 mtu after link-up or device mtu change (LP: #1671951)
    - & other changes
  * Refresh patches.
    - Dropped changes:
      * d/p/lp-1853852-*: fix issues with muliplexed shmat calls (LP: #1853852)
        Files:
        - debian/patches/lp-1853852-seccomp-fix-multiplexed-system-calls.patch
        - debian/patches/lp-1853852-seccomp-mmap-test-results-depend-on-kernel-libseccom.patch
        https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=382271662c60c339b0a404c7a1772fe5670516ef
      * d/p/lp1671951-network-set-ipv6-mtu-after-link-up-or-device-mtu-cha.patch:
        set ipv6 mtu at correct time
  * pstore: Don't start systemd-pstore.service in containers.
    Usually it is not useful and can also fail making
    boot-and-services autopkgtest fail. (LP: #1856729)
    File: debian/patches/pstore-Don-t-start-systemd-pstore.service-in-containers.patch
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=28b5a03769cbed9d3170ebac38508b867530a2d6
  * Revert: network: do not drop foreign config if interface is in initialized state.
    This fixes FTBFS with the other network-related reverts.
    File: debian/patches/Revert-network-do-not-drop-foreign-config-if-interface-is.patch
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=22a9fa3bb03ba2a629926af39ea7df81fe33c9b8

systemd (244-3ubuntu5) focal; urgency=medium

  [ Dariusz Gadomski ]
  * d/p/lp1762391/0001-user-util-Add-helper-functions-for-gid-lists-operati.patch,
    d/p/lp1762391/0002-execute-Restore-call-to-pam_setcred.patch,
    d/p/lp1762391/0003-execute-Detect-groups-added-by-PAM-and-merge-them-wi.patch,
    d/p/lp1762391/0004-test-Add-tests-for-gid-list-ops.patch,
    d/p/lp1762391/0005-execute-add-const-to-array-parameters-where-possible.patch,
    d/p/lp1762391/0006-execute-allow-pam_setcred-to-fail-ignore-errors.patch:
    - Restore call to pam_setcred (LP: #1762391)

  [ Dan Streetman ]
  * d/t/storage: without scsi_debug, skip test (LP: #1847816)

systemd (244-3ubuntu4) focal; urgency=medium

  * d/p/lp1671951-network-set-ipv6-mtu-after-link-up-or-device-mtu-cha.patch:
    set ipv6 mtu at correct time (LP: #1671951)
  * d/p/0001-network-rename-linux_configure_after_setting_mtu-to-linux.patch,
    d/p/0002-network-add-link-setting_genmode-flag.patc...

Read more...

Changed in systemd (Ubuntu Focal):
status: Triaged → 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.