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

Passing keyring to a cephadm volume for health check #87

Open
bluikko opened this issue Dec 8, 2022 · 0 comments · May be fixed by #88
Open

Passing keyring to a cephadm volume for health check #87

bluikko opened this issue Dec 8, 2022 · 0 comments · May be fixed by #88

Comments

@bluikko
Copy link

bluikko commented Dec 8, 2022

Trying to use the check_ceph_health script I hit an issue: the keyring is not passed to the cephadm container that runs the ceph command.

I do not know how this current implementation is supposed to be run but usually there would be an additional switch passed to cephadm that mounts the keyring from the host OS to the container as a volume, for example with:

cephadm shell -v /etc/ceph/client.nagios.keyring:/etc/ceph/client.nagios.keyring:z

Possibly the :z at the end of the volume specification would not work on a system without SELinux but I do not have any other than RPM systems to test with. In the example code this is not included since I couldn't test it on other systems.

The example I made is very simple, possibly it is not pretty but Python is not one of my favorites: bluikko/ceph-nagios-plugins@master...bluikko-cephadm-volume
It works on my system but since this was not included in the original implementation it makes me question how was the cephadm support supposed to work earlier. Usually (?) the container it runs would not include keyrings, to my knowledge.

I would like feedback on this before I make a PR.

Additionally running the script without adding the above patch fails at line 189 on Python 3.9 (the real error is about the missing keyring)...

TypeError: a bytes-like object is required, not 'str'
@bluikko bluikko linked a pull request Dec 28, 2022 that will close this issue
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 a pull request may close this issue.

1 participant