]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cephadm: add a higher-level function for managing systemd units
authorJohn Mulligan <jmulligan@redhat.com>
Thu, 28 Sep 2023 21:18:18 +0000 (17:18 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Sun, 10 Dec 2023 15:25:57 +0000 (10:25 -0500)
commiteaa6cbd39fb0e8c1259c0aa7e8a73cc8d65f3a29
tree93df682ab6a2f34ce90898a4f6ff5482f4c7bb5e
parent160b768b4925a93bf0962bacf9a97176c638684b
cephadm: add a higher-level function for managing systemd units

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 <jmulligan@redhat.com>
src/cephadm/cephadm.py
src/cephadm/cephadmlib/systemd_unit.py
src/cephadm/tests/test_unit_file.py