Skip to content

[cephadm] add plugin to collect cephadm config, logs and diagnostic o… #2682

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

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

Conversation

haklein
Copy link
Contributor

@haklein haklein commented Sep 9, 2021

…utput

Signed-off-by: Harald Klein [email protected]


Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines

  • Is the commit message split over multiple lines and hard-wrapped at 72 characters?
  • Is the subject and message clear and concise?
  • Does the subject start with [plugin_name] if submitting a plugin patch or a [section_name] if part of the core sosreport code?
  • Does the commit contain a Signed-off-by: First Lastname [email protected]?
  • Are any related Issues or existing PRs properly referenced via a Closes (Issue) or Resolved (PR) line?

@packit-as-a-service
Copy link

Congratulations! One of the builds has completed. 🍾

⚠️ Please note that our current plans include removal of these comments in the near future (at least 2 weeks after including this disclaimer), if you have serious concerns regarding their removal or would like to continue receiving them please reach out to us. ⚠️

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/sosreport-sos-2682
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

Copy link
Member

@TurboTurtle TurboTurtle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of overlap with the existing ceph plugin - would it not make sense to add the cephadm commands there, or should we instead be looking at potentially breaking up the ceph plugin and moving some of the items there into this (and/or other plugins)?

Comment on lines +17 to +21
profiles = ('storage')

packages = (
'cephadm'
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These need to be tuples, so you'll need a trailing , even for 1-tuples. E.g.

profiles = ('storage',)
packages = ('cephadm',)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cephadm is only available in very recent Ceph versions. Hence I was considering a separate plugin. Thanks for the comment on the tuples.

Comment on lines +26 to +33
if not all_logs:
self.add_copy_spec([
"/var/log/ceph/cephadm.log"
])
else:
self.add_copy_spec([
"/var/log/ceph/cephadm*"
])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already captured by the ceph plugin.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would only be captured via the ceph plugin when the ceph-common package is installed (to trigger the ceph plugin), which might not be the case in all situations (there is no package dependency between cephadm and ceph-common. ceph-common would usually be installed via playbook from cephadm-ansible).

Comment on lines +35 to +37
self.add_copy_spec([
"/etc/ceph/"
])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise, this is captured by the ceph plugin today.

Comment on lines +47 to +48
for s in cephadm_cmds:
self.add_cmd_output(cmds="cephadm --timeout 5 %s" % s, suggest_filename="%s" % s)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add_cmd_output() supports a timeout parameter, so you don't need to use the cephadm option here or do any filename mangling. self.add_cmd_output(["cephadm %s" % cmd for cmd in cephadm_cmds], timeout=5)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the "native" timeout of a command preferred? cephadm would give some hints on where the timeout did occur (e.g. if it couldn't acquire a lock).

@arif-ali
Copy link
Member

@haklein were you planning to work on this. I think having cephadm data in the ceph plugins could be useful

@arif-ali arif-ali added the Status/Need More Info Feedback is required to reproduce issue or to continue work label Nov 20, 2024
@jcastill jcastill added the Status/RedHat Eng RedHat Engineering has been requested to review label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status/Need More Info Feedback is required to reproduce issue or to continue work Status/RedHat Eng RedHat Engineering has been requested to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants