Repository navigation
cephadm: add modules to abstract systemd units and run scripts - #54536
Conversation
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
e124db4 to
298ed7b
Compare
310d094 to
ed137a8
Compare
ed137a8 to
03ea84c
Compare
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
03ea84c to
8be22ea
Compare
|
NOTE: I'm moving this PR to ready-for-review but I am still not entirely happy with the changes I need to put in when I re-based after PR 53987 was merged. I had to work around both code conflicts and conceptual conflicts with the new command_unit_install function. I pinged the author of the pr at #53987 (comment) asking about changing how the command works. However I have got no response so far. I'm still inclined to change that function to require a service name. But I'll also ask for feedback from the team. |
|
jenkins test make check |
8be22ea to
e995880
Compare
|
I put a DNM label on here so I don't forget about what I wrote in #54536 (comment) |
e995880 to
56ec326
Compare
|
command_unit_install has been updated to take --fsid and require -n/--name. This resolves the outstanding task on my end. Make check passes. Removing DNM label, ready for review again. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
This is to support generating command lines or shell scripts using Jinja2 templates in the future. Signed-off-by: John Mulligan <[email protected]>
Update container engine tests file to use the canonical module for container engines rather than importing them indirectly from cephadm.py. This future proofs the test in case the imports in cephadm.py change. Signed-off-by: John Mulligan <[email protected]>
Continue to modularize cephadm by moving the functions related to generating systemd unit files to a new module. Signed-off-by: John Mulligan <[email protected]>
Update systemd unit file tests file to use the canonical module for systemd units functions rather than importing them indirectly from cephadm.py. This future proofs the test in case the imports in cephadm.py change. Signed-off-by: John Mulligan <[email protected]>
Add the function update_files to systemd_unit.py to encapsulate and abstract the details regarding the generation of system unit files. This will make it simpler in the future to add more advanced systemd configurations include managing customized unit files and systemd unit drop-in files. Some additional work was needed to update the recently added command_unit_install function. Because the new systemd_unit.update_files function requires a full daemon identity. The command_unit_install function now requires a daemon name. In addition, while testing this change it was found that the function could not have worked as it was because it required the fsid but neither used the infer_fsid decorator nor provided a `--fsid` argument. Both were added. Signed-off-by: John Mulligan <[email protected]>
Add a new file runscripts.py for the lower-level management of scripts and related files that are invoked by systemd units. This patch ended up uglier than I desired because there was a bunch of daemon specific logic that remains in cephadm.py and those functions all needed to be updated to avoid calling functions that write to the scripts directly. Now customizations are done by passing a list of commands: these commands can be either a string that will be literally added to the scipt, a list that will be quoted and then added to the script, or a ContainerCommand which is basically a wrapper around the arguments to _write_container_cmd_to bash. Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
56ec326 to
4e37eb7
Compare
|
jenkins test make check |
|
reruns of failed/dead jobs: https://pulpito.ceph.com/adking-2023-12-11_15:11:37-orch:cephadm-wip-adk-testing-2023-12-10-1329-distro-default-smithi/ After reruns: 14 failures, 3 dead jobs
Overall, despite the high raw failure number, we should be able to merge PRs from the run. |
Depends on #54441
A small assortment of patches to abstract some of cephadm's handling of systemd unit files and unit "run scripts".
This is largely in preparation for adding sidecar containers.
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
opened tracker ticketShow available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e