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

Fix: Avoid Linux Agent timeouts when systemd-timedated doesn't run #790

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mueller-ma
Copy link

@mueller-ma mueller-ma commented Feb 13, 2025

General information

See https://forum.checkmk.com/t/linux-agent-issues-with-systemd-timedated-service-creates-timeouts/52259 for context

Bug reports

When the Linux agents checks systemd-timesync, it calls timedatectl show:

timedatectl show | awk '/Timezone/{print $0}'

When the service systemd-timedated.service doesn't run, the command times out and blocks the agent out for ~25 seconds:

# time timedatectl show
Failed to parse bus message: Connection timed out

real    0m25.020s
user    0m0.000s
sys     0m0.006s
# systemctl status systemd-timedated.service
● systemd-timedated.service - Time & Date Service
     Loaded: loaded (/lib/systemd/system/systemd-timedated.service; static)
     Active: failed (Result: exit-code) since Wed 2025-02-12 15:35:38 CET; 7s ago

25 seconds is nearly half of the default 60 seconds agent timeout, so the agent reaches this timeout sometimes when systemd-timedated is down.

Proposed changes

Add a timeout call to reduce the timeout from timedatectl show from ~25 seconds to 5 seconds.

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

Successfully merging this pull request may close these issues.

1 participant