Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Systemd notification does not wait when 0 is specified #135

Open
mvorisek opened this issue Dec 8, 2021 · 2 comments
Open

Systemd notification does not wait when 0 is specified #135

mvorisek opened this issue Dec 8, 2021 · 2 comments

Comments

@mvorisek
Copy link

mvorisek commented Dec 8, 2021

Some services like mysql server use 0 for timeout which should imply, based on the official systemd/systemd#10501, infinity wait

Example config:

[Unit]
Description=MySQL Community Server
Documentation=man:mysqld(8)
Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.html
After=network.target
[Install]
WantedBy=multi-user.target
[Service]
User=mysql
Group=mysql
Type=notify
PermissionsStartOnly=true
ExecStartPre=+/usr/share/mysql-8.0/mysql-systemd-start pre
ExecStart=/usr/sbin/mysqld
TimeoutSec=0
LimitNOFILE = 10000
Restart=on-failure
RestartPreventExitStatus=1

The docker-systemctl-replacement must wait at least DefaultMaximumTimeout (as defined in systemctl3.py) when 0, 0s or infinity is specified.

@gdraheim
Copy link
Owner

gdraheim commented Dec 8, 2021

Yes, that should be in the next version.

@gdraheim
Copy link
Owner

gdraheim commented Dec 9, 2021

Looking for "infinity" it seems that using "0" is an undocumented feature of systemd.

https://www.freedesktop.org/software/systemd/man/systemd.service.html

Such things are quite usual in the systemd world, so I'll put that also on the list of checks that the systemctl-replacement script will show a warning for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants