Skip to content

cephadm: add option to install systemd unit only - #53987

Merged
adk3798 merged 1 commit into
ceph:mainfrom
diabolocom:main
Nov 3, 2023
Merged

adk3798 merged 1 commit into
ceph:mainfrom
diabolocom:main

Conversation

@fayak

@fayak fayak commented Oct 12, 2023

Copy link
Copy Markdown
Contributor

Description

We have the need of having a way to re-create the systemd unit files that cephadm creates, for specific internal reasons. I have not found out a way to call cephadm to do this job (and only this) in a satisfactory manner.
I have then written this small patch that adds a new command, cephadm unit-install that will install the systemd units and do nothing else. We use it locally, it suits us well so I'd figure people might be interested in having this upstreamed.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation (I believe the --help is enough for this feature ?)
    • No doc update is appropriate
  • Tests (select at least one)

@adk3798 adk3798 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems alright to me. Just a couple things to get the CI to pass.

Comment thread src/cephadm/cephadm.py Resolved
Comment thread src/cephadm/cephadm.py Resolved
Cephadm is responsible for installing systemd units on the system. If
for some reasons the units are missing, this newly added option cephadm
    unit-install will install them (and do nothing else).

This is useful in some cases where going through the others means of
creating such unit are not possible, or do extra unwanted things.

Signed-off-by: Cyril Duval <[email protected]>
@fayak

fayak commented Oct 19, 2023

Copy link
Copy Markdown
Contributor Author

Thank you, should be better now

@adk3798

adk3798 commented Oct 19, 2023

Copy link
Copy Markdown
Contributor

jenkins test api

@adk3798

adk3798 commented Nov 3, 2023

Copy link
Copy Markdown
Contributor

https://pulpito.ceph.com/adking-2023-11-01_15:18:48-orch:cephadm-wip-adk-testing-2023-11-01-0807-distro-default-smithi/

reruns of failed/dead jobs: https://pulpito.ceph.com/adking-2023-11-03_14:14:47-orch:cephadm-wip-adk-testing-2023-11-01-0807-distro-default-smithi/

After reruns, 3 failures

Nothing to blocker merging PRs unrelated to the host drain failures

@adk3798
adk3798 merged commit 6343c51 into ceph:main Nov 3, 2023
@phlogistonjohn

Copy link
Copy Markdown
Contributor

Hi, @fayak I was recently rebasing some of my outstanding work and discovered this command has some conflicts with what I'm doing.

To try and summarize I am adding "init containers" and "sidecar containers" to cephadm and this means I need to add additional systemd unit files for certain daemon types. For example, the iscsi service will become two systemd services. In order to do this properly I think I would like to change the command_unit_install to require an identifier (type/id). We discussed a few other options but this seems to me the least "magical" and most correct option. Would it be a big burden for your workflow if you had to specify a service after that command?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants