[Merge] ~enr0n/ubuntu/+source/systemd:ubuntu-jammy-sru into ~ubuntu-core-dev/ubuntu/+source/systemd:ubuntu-jammy
Lukas Märdian
mp+449220 at code.launchpad.net
Wed Aug 16 14:52:56 UTC 2023
Review: Approve
Thanks, lgtm!
I've added two inline comments about the "systemd-networkd-wait-online --any" behavior on GKE cloud images (see my forwarded email) and a potential systemd.postinst interference with debhelper for extra considerations.
Diff comments:
> diff --git a/debian/patches/debian/UBUNTU-wait-online-exit-if-no-links-are-managed.patch b/debian/patches/debian/UBUNTU-wait-online-exit-if-no-links-are-managed.patch
> deleted file mode 100644
> index 56295f5..0000000
> --- a/debian/patches/debian/UBUNTU-wait-online-exit-if-no-links-are-managed.patch
Regarding dropping of the UBUNTU-wait-online-exit-if-no-links-are-managed.patch see the GKE email that I forwarded to you. It might need extra considerations for the Jammy SRU, as we do not want to produce unexpected behavior on their cloud images. But IIRC the "--any" flag was not part of the final solution, so should be fine to be dropped most probably.
> +++ /dev/null
> @@ -1,38 +0,0 @@
> -From: Dimitri John Ledkov <xnox at ubuntu.com>
> -Date: Mon, 26 Mar 2018 13:17:01 +0100
> -Subject: wait-online: exit, if no links are managed.
> -
> -(cherry picked from commit 19d11f607ac0f8b1e31f72a8e9d3d44371b9dadb)
> ----
> - src/network/wait-online/manager.c | 7 ++++++-
> - 1 file changed, 6 insertions(+), 1 deletion(-)
> -
> ---- a/src/network/wait-online/manager.c
> -+++ b/src/network/wait-online/manager.c
> -@@ -118,6 +118,7 @@ static int manager_link_is_online(Manage
> -
> - bool manager_configured(Manager *m) {
> - bool one_ready = false;
> -+ bool none_managed = true;
> - const char *ifname;
> - Link *l;
> - int r;
> -@@ -168,13 +169,17 @@ bool manager_configured(Manager *m) {
> - _LINK_OPERSTATE_INVALID });
> - if (r < 0 && !m->any)
> - return false;
> -+ if (l->state && STR_IN_SET(l->state, "configured", "failed")) {
> -+ log_info("managing: %s", l->ifname);
> -+ none_managed = false;
> -+ }
> - if (r > 0)
> - /* we wait for at least one link to be ready,
> - * regardless of who manages it */
> - one_ready = true;
> - }
> -
> -- return one_ready;
> -+ return one_ready || none_managed;
> - }
> -
> - static int manager_process_link(sd_netlink *rtnl, sd_netlink_message *mm, void *userdata) {
> diff --git a/debian/systemd.postinst b/debian/systemd.postinst
> index d6799d0..73c529c 100644
> --- a/debian/systemd.postinst
> +++ b/debian/systemd.postinst
> @@ -87,7 +87,22 @@ fi
>
> # skip daemon-reexec and try-restarts during shutdown to avoid hitting LP: #1803391
> if [ -n "$2" ] && [ "$(systemctl is-system-running)" != "stopping" ]; then
> - _systemctl daemon-reexec || true
This is executed before the "#DEBHELPER#" section. While on Mantic it was added below and on the Lunar SRU we've actually moved it below #DEBHELPER#. Does that make any difference? Maybe you should download the systemd binary .deb and check the generated .postinst script from the control.tar.gz archive to double-check what debhelper is injecting there and if that influences the new code.
> + # LP: #2013543 - the systemd cmdline can get mangled depending on the
> + # contents of /proc/cmdline, which causes systemd to fail to deserialize
> + # it's previous state on daemon-reexec. This means that for upgrades from
> + # affected versions, we need a reboot and cannot re-exec here, else the
> + # bug could be triggered.
> + if dpkg --compare-versions "$2" lt "249.11-0ubuntu3.10~"; then
> + if ! grep -Fqsx systemd /run/reboot-required.pkgs; then
> + echo systemd >> /run/reboot-required.pkgs || true
> + fi
> +
> + # Reload to avoid warnings when restarting services below
> + _systemctl daemon-reload || true
> + else
> + _systemctl daemon-reexec || true
> + fi
> +
> # don't restart logind; this can be done again once this gets implemented:
> # https://github.com/systemd/systemd/issues/1163
> if dpkg --compare-versions "$2" lt-nl "246.2-2~"; then
--
https://code.launchpad.net/~enr0n/ubuntu/+source/systemd/+git/systemd/+merge/449220
Your team Ubuntu Core Development Team is subscribed to branch ~ubuntu-core-dev/ubuntu/+source/systemd:ubuntu-jammy.
More information about the Ubuntu-reviews
mailing list