Reputation: 1187
I've google this, but so far no way to fix it. My syslog under /var/log is being flooded every second with messages like this;
Aug 27 20:58:27 mail-server systemd[1]: run-docker-runtime\x2drunc-moby-e4bfb13118b141bf232cf981fe9b535706243c47ae0659466b8e6667bd4feceb-runc.YHoxmJ.mount: Succeeded.
Aug 27 20:58:27 mail-server systemd[1083]: run-docker-runtime\x2drunc-moby-e4bfb13118b141bf232cf981fe9b535706243c47ae0659466b8e6667bd4feceb-runc.YHoxmJ.mount: Succeeded.
Aug 27 20:58:27 mail-server systemd[8395]: run-docker-runtime\x2drunc-moby-e4bfb13118b141bf232cf981fe9b535706243c47ae0659466b8e6667bd4feceb-runc.YHoxmJ.mount: Succeeded.
Aug 27 20:58:28 mail-server systemd[1]: run-docker-runtime\x2drunc-moby-5dc4f4e0b3cbd5e5bfbcc88b8d22f92575706b7c3603847ccb2fd4e56f188f99-runc.gt51Ek.mount: Succeeded.
Aug 27 20:58:28 mail-server systemd[1083]: run-docker-runtime\x2drunc-moby-5dc4f4e0b3cbd5e5bfbcc88b8d22f92575706b7c3603847ccb2fd4e56f188f99-runc.gt51Ek.mount: Succeeded.
Aug 27 20:58:28 mail-server systemd[8395]: run-docker-runtime\x2drunc-moby-5dc4f4e0b3cbd5e5bfbcc88b8d22f92575706b7c3603847ccb2fd4e56f188f99-runc.gt51Ek.mount: Succeeded.
I am running Ubuntu 20.04 and dockerd is run by systemd.
Could anyone help me to find the cause if this? It seems that every single container is generating this.
Best,
Francis
Upvotes: 35
Views: 22197
Reputation: 257
You may want to check if one of your containers has healthcheck enabled. The container ID is the thing after "x2drunc-moby-".
In my case every time health check executed pg_isready
command inside PostgreSQL container, the mount entry appeared in the logs.
A workaround is increasing health check interval. Notice that with Docker version 25 and onward you can set different check interval for start up period (start_period and start_interval).
I have also found that with big enough health check interval the log messages stop appearing almost at all and if they appear than mostly when I'm logged into SSH terminal.
The issue also depends on the OS version. I had the issue on Debian 11 and not on more recent Ubuntu.
Upvotes: 1
Reputation: 151
For versions of systemd > v249 the below fixes (removes) the logging of docker mount.d without affecting the rest of the system logging of mount.d
sudo mkdir -p /etc/systemd/system/run-docker-.mount.d
sudo bash -c 'cat << EOF > /etc/systemd/system/run-docker-.mount.d/10-silence.conf
[Mount]
LogLevelMax=0
EOF'
Followed by a
sudo systemctl daemon-reload
Upvotes: 6
Reputation: 662
Those messages are from systemd itself about the mount. This is addressed in systemd v249; see https://github.com/systemd/systemd/issues/6432 for more information.
In a nutshell, that version of systemd allows controlling of that mount via its unit file using the following:
[Mount]
LogLevelMax=0
The LogLevelMax setting applies not just to the unit but also to systemd's log messages itself about the unit. That is the change introduced in v249.
Upvotes: 16