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 checks using waitmax and run_cached in Linux agent #619

Closed
wants to merge 0 commits into from

Conversation

sparunakian
Copy link

General information

Since checkmk 2.2, some checks (like chrony) are not returning any data and are presumed missing/vanished. This is due to a regression.

Bug reports

checkmk 2.2.0p7 installed on Debian 12
checkmk Linux agent 2.2.0p7, over SSH, on Debian 12 (but other Linux distributions are affected.)
chrony on the monitored servers

There is no step to reproduce the bug, it appears immediately.

The use of both run_cached and waitmax in some agent sections is causing this. On servers with the timeout binary, waitmax is defined as a function calling timeout In the run_cached function a subshell is started and the waitmax function is not known in this context. If there is no waitmax binary on the system, the check silently fails.

In the 2.1 version of the agent, there was export -f waitmax just after the definition of the waitmax function, allowing it to be callable in the subshell started in the run_cached function.

Proposed changes

This MR reintroduces the missing export.

@github-actions
Copy link

github-actions bot commented Aug 10, 2023

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@sparunakian
Copy link
Author

recheck

@sparunakian
Copy link
Author

I have read the CLA Document and I hereby sign the CLA or my organization already has a signed CLA.

@TimotheusBachinger
Copy link
Contributor

Dear Checkmk Contributor! Unfortunately, we had to re-write our git-repo history, rendering your PR auto-closed. We will therefore rebase your PR onto the current master and reopen it again. Sorry for the inconvenience.

@TimotheusBachinger
Copy link
Contributor

Dear Contributor. Unfortunately, we learned that re-opening a PR which was force-rebased, is not possible (see isaacs/github#361). Therefore we kindly ask you to create a new PR for your change. We apologize for the circumstances and will implement technical measures to prevent such incidents in the future.

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

Successfully merging this pull request may close these issues.

5 participants