[Bug 2055239] Re: Warning: The unit file, source configuration file or drop-ins of {apt-news, esm-cache}.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Nick Rosbrook
2055239 at bugs.launchpad.net
Wed Jul 31 19:59:18 UTC 2024
This issue can be seen with any actual unit after e.g. enabling or
disabling a non-existent unit. For example,
root at n:~# systemctl status ssh.socket
● ssh.socket - OpenBSD Secure Shell server socket
Loaded: loaded (/usr/lib/systemd/system/ssh.socket; enabled; preset: enabled)
Active: active (listening) since Wed 2024-07-31 19:51:18 UTC; 5min ago
Triggers: ● ssh.service
Listen: [::]:22 (Stream)
CGroup: /system.slice/ssh.socket
Jul 31 19:55:15 n systemd[1]: ssh.socket: Trying to enqueue job ssh.socket/start/replace
Jul 31 19:55:15 n systemd[1]: ssh.socket: Installed new job ssh.socket/start as 734
Jul 31 19:55:15 n systemd[1]: ssh.socket: Enqueued job ssh.socket/start as 734
Jul 31 19:55:15 n systemd[1]: ssh.socket: Job 734 ssh.socket/start finished, result=done
Jul 31 19:55:53 n systemd[1]: ssh.socket: Changed dead -> listening
Jul 31 19:56:05 n systemd[1]: ssh.socket: Trying to enqueue job ssh.socket/start/replace
Jul 31 19:56:05 n systemd[1]: ssh.socket: Installed new job ssh.socket/start as 825
Jul 31 19:56:05 n systemd[1]: ssh.socket: Enqueued job ssh.socket/start as 825
Jul 31 19:56:05 n systemd[1]: ssh.socket: Job 825 ssh.socket/start finished, result=done
Jul 31 19:56:20 n systemd[1]: ssh.socket: Changed dead -> listening
root at n:~# systemctl enable fdfldakfjdklfjdaljfa.service
Failed to enable unit: Unit file fdfldakfjdklfjdaljfa.service does not exist.
root at n:~# systemctl status ssh.socket
Warning: The unit file, source configuration file or drop-ins of ssh.socket changed on disk. Run 'systemctl daemon-reload' to reload units.
● ssh.socket - OpenBSD Secure Shell server socket
Loaded: loaded (/usr/lib/systemd/system/ssh.socket; enabled; preset: enabled)
Active: active (listening) since Wed 2024-07-31 19:51:18 UTC; 5min ago
Triggers: ● ssh.service
Listen: [::]:22 (Stream)
CGroup: /system.slice/ssh.socket
Jul 31 19:55:15 n systemd[1]: ssh.socket: Trying to enqueue job ssh.socket/start/replace
Jul 31 19:55:15 n systemd[1]: ssh.socket: Installed new job ssh.socket/start as 734
Jul 31 19:55:15 n systemd[1]: ssh.socket: Enqueued job ssh.socket/start as 734
Jul 31 19:55:15 n systemd[1]: ssh.socket: Job 734 ssh.socket/start finished, result=done
Jul 31 19:55:53 n systemd[1]: ssh.socket: Changed dead -> listening
Jul 31 19:56:05 n systemd[1]: ssh.socket: Trying to enqueue job ssh.socket/start/replace
Jul 31 19:56:05 n systemd[1]: ssh.socket: Installed new job ssh.socket/start as 825
Jul 31 19:56:05 n systemd[1]: ssh.socket: Enqueued job ssh.socket/start as 825
Jul 31 19:56:05 n systemd[1]: ssh.socket: Job 825 ssh.socket/start finished, result=done
Jul 31 19:56:20 n systemd[1]: ssh.socket: Changed dead -> listening
I have tested [1] in a PPA build, and the issue goes away.
It may have already been pointed out, but the reason this is seen with
apt-news.service and esm-cache.service specifically is because of the
hook defined in /etc/apt/apt.conf.d/20apt-esm-hook.conf which starts
these services. Besides that, there is nothing special about them which
makes this bug appear.
[1]
https://github.com/systemd/systemd/pull/32610/commits/d69cba3bfffc7b1e3197e2a34b459db13b1e1cb7
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2055239
Title:
Warning: The unit file, source configuration file or drop-ins of {apt-
news,esm-cache}.service changed on disk. Run 'systemctl daemon-reload'
to reload units.
Status in snapd:
New
Status in systemd package in Ubuntu:
Fix Released
Status in ubuntu-advantage-tools package in Ubuntu:
Invalid
Status in systemd source package in Noble:
Triaged
Status in ubuntu-advantage-tools source package in Noble:
Invalid
Bug description:
I recently started seeing the following warning messages when I run
`apt update`.
$ sudo apt update
Warning: The unit file, source configuration file or drop-ins of apt-news.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Warning: The unit file, source configuration file or drop-ins of esm-cache.service changed on disk. Run 'systemctl daemon-reload' to reload units.
...
apt-news.service for example is in /lib/systemd/system/apt-
news.service and it's a static file managed by the package. Does the
package maintenance script call systemd related hooks to reload the
config whenever the package gets updated?
$ systemctl cat apt-news.service
# /usr/lib/systemd/system/apt-news.service
# APT News is hosted at https://motd.ubuntu.com/aptnews.json and can include
# timely information related to apt updates available to your system.
...
$ dpkg -S /lib/systemd/system/apt-news.service
ubuntu-pro-client: /lib/systemd/system/apt-news.service
ProblemType: BugDistroRelease: Ubuntu 24.04
Package: ubuntu-pro-client 31.1
ProcVersionSignature: Ubuntu 6.6.0-14.14-generic 6.6.3
Uname: Linux 6.6.0-14-generic x86_64
NonfreeKernelModules: zfs
ApportVersion: 2.28.0-0ubuntu1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Wed Feb 28 13:06:35 2024
InstallationDate: Installed on 2024-01-08 (51 days ago)
InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Daily amd64 (20240104)
ProcEnviron:
LANG=en_US.UTF-8
PATH=(custom, no user)
SHELL=/bin/bash
TERM=xterm-256color
XDG_RUNTIME_DIR=<set>SourcePackage: ubuntu-advantage-tools
UpgradeStatus: No upgrade log present (probably fresh install)
apparmor_logs.txt:
cloud-id.txt-error:
Failed running command 'cloud-id' [exit(2)]. Message: REDACTED config part /etc/cloud/cloud.cfg.d/99-installer.cfg, insufficient permissions
REDACTED config part /etc/cloud/cloud.cfg.d/90-installer-network.cfg, insufficient permissions
REDACTED config part /etc/cloud/cloud.cfg.d/99-installer.cfg, insufficient permissions
REDACTED config part /etc/cloud/cloud.cfg.d/90-installer-network.cfg, insufficient permissions
livepatch-status.txt-error: Invalid command specified '/snap/bin/canonical-livepatch status'.
uaclient.conf:
contract_url: https://contracts.canonical.com
log_level: debug
To manage notifications about this bug go to:
https://bugs.launchpad.net/snapd/+bug/2055239/+subscriptions
More information about the foundations-bugs
mailing list