[Bug 1814355] Re: snapd remove /usr/local/bin from the PATH for all systemd unit (bionic SRU regression)
Mathew Hodson
1814355 at bugs.launchpad.net
Thu Feb 6 02:15:09 UTC 2020
** No longer affects: systemd (Ubuntu Cosmic)
** No longer affects: systemd (Ubuntu Bionic)
** No longer affects: systemd (Ubuntu)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to initramfs-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1814355
Title:
snapd remove /usr/local/bin from the PATH for all systemd unit (bionic
SRU regression)
Status in initramfs-tools package in Ubuntu:
Fix Released
Status in snapd package in Ubuntu:
Fix Released
Status in initramfs-tools source package in Bionic:
New
Status in snapd source package in Bionic:
Fix Released
Status in initramfs-tools source package in Cosmic:
Won't Fix
Status in snapd source package in Cosmic:
Won't Fix
Bug description:
[Impact]
* Initramfs exports PATH to init, which is different than the
expected stock / compiled one, which results in slightly different
runtime behaviour of init, if it has environment generators as well.
[Test Case]
* Disable snapd env generator & disable initrd-less boot (if enabled)
sudo chmod -x /usr/lib/systemd/system-environment-generators/snapd-env-generator
set empty GRUB_FORCE_PARTUUID= and update-grub
* Reboot cosmic system with an initramfs
$ journalctl -b -k | grep initramfs
(verify that initramfs was unpacked)
* Check the path used by systemd, ie.:
systemd-run /usr/bin/env
journalctl -b -e | grep PATH
It should contain /usr/local
* Enable any env generator for example & reboot:
/usr/lib/systemd/system-environment-generators/xnox.sh
#!/bin/sh
echo XNOX=ROCKS
* Verify path used by systemd
It should still contain /usr/local
Repeat again with the new initramfs-tools.
[Regression Potential]
* We are hardcoding, the same path, yet again, in one more place. However, we are setting it to a well-known value (see https://wiki.ubuntu.com/PATH
) as it is universally expected and regressed when booted (a) with initrd AND (b) with broken path exported by initrd AND (c) with an env-generator.
[Other Info]
* Anything else you think is useful to include
* Anticipate questions from users, SRU, +1 maintenance, security teams and the Technical Board
* and address these questions in advance
===
Big regression in 2.37.1+18.04 compare to version 2.34.2
all these paths /usr/local/sbin & /usr/local/bin are not anymore in
the path of all systemd process .
So we can not start a daemon that use /usr/local/bin
reinstalling package 2.34.2 fix the problem
in 2.34.2 :
~# strings /proc/$(pidof /lib/systemd/systemd-resolved)/environ | grep PATH
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
in 2.37.1+18.04 :
~# strings /proc/$(pidof /lib/systemd/systemd-resolved)/environ | grep PATH
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/snap/bin
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1814355/+subscriptions
More information about the foundations-bugs
mailing list