Skip to content

add default value for MK_CONFDIR in ceph agent#894

Closed
fdriessler wants to merge 2 commits into
Checkmk:masterfrom
inettgmbh:ceph-agent
Closed

add default value for MK_CONFDIR in ceph agent#894
fdriessler wants to merge 2 commits into
Checkmk:masterfrom
inettgmbh:ceph-agent

Conversation

@fdriessler

Copy link
Copy Markdown
Contributor

General information

This PR adds a default Value for the call on MK_CONFDIR in the ceph agent.

Proposed changes

Add a default Value for the call of os.environ['MK_CONFDIR']
os.environ['MK_CONFDIR'] -> os.environ.get('MK_CONFDIR', "/etc/check_mk")

We've run into a issue where a few hosts were unable to read this environment variable, causing the mk_ceph.py agent to fail.
My guess is that such a default value is already present in other agents in some shape or form, as the mk_ceph.py agent was the only one to have failed.

Comment thread cmk/plugins/ceph/agents/mk_ceph.py Outdated
@englertor englertor added tracked and removed tracked labels Mar 12, 2026
@relrod

relrod commented Jun 19, 2026

Copy link
Copy Markdown
Member

@fdriessler Hello! Thank you for the patch and for making this consistent with the other agents! ❤️

I will get this merged soon, as Werk 19869. Apologies for the delay here!

CheckmkCI pushed a commit that referenced this pull request Jun 19, 2026
When the environment variable `$MK_CONFDIR` was not set, the ceph
agent would crash with a KeyError.

This has been fixed and the default directory is now
`/etc/check_mk/`, consistent with other agents.

CMK-32386
#894

Change-Id: I5f92426b17da95ec51125c8393334f7564af74cb
CheckmkCI pushed a commit that referenced this pull request Jun 19, 2026
When the environment variable `$MK_CONFDIR` was not set, the ceph
agent would crash with a KeyError.

This has been fixed and the default directory is now
`/etc/check_mk/`, consistent with other agents.

CMK-32386
#894

Change-Id: I5f92426b17da95ec51125c8393334f7564af74cb
@relrod

relrod commented Jun 19, 2026

Copy link
Copy Markdown
Member

This has merged into 2.5 and master as Werk 19869, thank you again for the contribution!

@relrod relrod closed this Jun 19, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants