systemd 237 reports incorrect state when drop-in present
Bug #1752722 reported by
Brian Moyles
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd |
Fix Released
|
Unknown
|
|||
systemd (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Bionic |
Fix Released
|
High
|
Unassigned |
Bug Description
Raised this upstream:
https:/
In short, in systemd 237 as it ships with Bionic, if a unit has a drop-in present but has been masked, systemctl is-enabled and systemctl list-unit-files report incorrect state, showing the units as enabled rather than masked.
This works as-expected in systemd 229 under Xenial. I have not tested under systemd 234 in artful so I cannot say for sure exactly when this was introduced, but will spin up a quick test to see if this also exists under systemd 234.
tags: | added: bionic |
Changed in systemd: | |
status: | Unknown → Fix Released |
tags: | added: id-5a998e676a158b97f18ebdc0 |
Changed in systemd (Ubuntu Bionic): | |
status: | Triaged → Fix Committed |
tags: | added: id-5ab94db18b8ce4cc5b39a518 |
To post a comment you must log in.
This does not appear to affect Artful and systemd 234. Example session:
~# cat /etc/lsb-release RELEASE= 17.10 CODENAME= artful DESCRIPTION= "Ubuntu 17.10"
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
~# uname -a
Linux ip-100-65-137-86 4.13.0-36-generic #40-Ubuntu SMP Fri Feb 16 20:07:48 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
~# systemctl --version hierarchy= hybrid
systemd 234
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN default-
~# systemctl daemon-reload
~# systemctl list-unit-files test-mask.service
0 unit files listed.
~# cat <<EOF > /lib/systemd/ system/ test-mask. service multi-user. target
> [Unit]
> Description=dummy service
>
> [Service]
> Type=oneshot
> ExecStart=/bin/true
>
> [Install]
> WantedBy=
>
> EOF
~# systemctl daemon-reload
~# systemctl list-unit-files test-mask.service; echo '**'; systemctl is-enabled test-mask.service; echo '**'; systemctl status test-mask.service
UNIT FILE STATE
test-mask.service disabled
1 unit files listed. system/ test-mask. service; disabled; vendor preset: enabled)
**
disabled
**
● test-mask.service - dummy service
Loaded: loaded (/lib/systemd/
Active: inactive (dead)
~# systemctl enable test-mask.service system/ multi-user. target. wants/test- mask.service → /lib/systemd/ system/ test-mask. service.
Created symlink /etc/systemd/
~# systemctl list-unit-files test-mask.service; echo '**'; systemctl is-enabled test-mask.service; echo '**'; systemctl status test-mask.service
UNIT FILE STATE
test-mask.service enabled
1 unit files listed. system/ test-mask. service; enabled; vendor preset: enabled)
**
enabled
**
● test-mask.service - dummy service
Loaded: loaded (/lib/systemd/
Active: inactive (dead)
~# systemctl list-unit-files test-mask.service; echo '**'; systemctl is-enabled test-mask.service; echo '**'; systemctl status test-mask.service
UNIT FILE STATE
test-mask.service masked
1 unit files listed.
**
masked
**
● test-mask.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
~# systemctl unmask test-mask.service system/ test-mask. service.
Removed /etc/systemd/
~# mkdir -p /etc/systemd/ system/ test-mask. service. d
~# cat <<EOF > /etc/systemd/ system/ test-mask. service. d/override. conf
> # Arbitrary override for the sake of demonstration
> [Unit]
> After=ssh.service
>
> EOF
~# systemctl daemon-reload
~# systemctl cat test-mask.service system/ test-mask. service
# /lib/systemd/
[Unit]
Description=dummy service
[Service]
Type=oneshot
ExecStart=/bin/true
[Install] multi-user. target
WantedBy=
# /etc/systemd/ system/ test-mask. service. d/override. conf
# Arbitrary override for the sake of demonstration
[Unit]
After=ssh.service
~# systemctl list-unit-files test-mask.service; echo '**'; systemctl is-enabled test-mask.service; echo '**'; systemctl status test-mask.service
UNIT FILE STATE
test-mask.service enabled
1 unit files listed. system/ test-mask. service; enabled; vendor preset: enabled) system/ test-mask. service. d
└─override. conf
**
enabled
**
● test-mask.service - dummy service
Loaded: loaded (/lib/systemd/
Drop-In: /etc/systemd/
Active: ...