From: Thomas Lamprecht Date: Wed, 17 Dec 2025 16:28:11 +0000 (+0100) Subject: systemd services: fix installing ceph-volume@ X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F66670%2Fhead;p=ceph.git systemd services: fix installing ceph-volume@ The ceph-volume@ service uses the @CMAKE_INSTALL_PREFIX@, so we cannot just install it directly like the target units, but need to process it like all other units that are referring to actual executables that reside in build-target dependent paths. Fixes: 68c72c5dff5 ("systemd: use CMake install prefix in templates") Reported-by: Daniel Herzig Reported-by: Aaron Lauterer Signed-off-by: Thomas Lamprecht --- diff --git a/systemd/CMakeLists.txt b/systemd/CMakeLists.txt index 366bab4195df8..072730142bec0 100644 --- a/systemd/CMakeLists.txt +++ b/systemd/CMakeLists.txt @@ -22,6 +22,7 @@ foreach(service ceph-osd@ ceph-radosgw@ ceph-rbd-mirror@ + ceph-volume@ ceph-immutable-object-cache@ cephfs-mirror@ rbdmap) @@ -44,6 +45,5 @@ install(FILES ceph-radosgw.target ceph-rbd-mirror.target ceph-immutable-object-cache.target - ceph-volume@.service cephfs-mirror.target DESTINATION ${SYSTEMD_SYSTEM_UNIT_DIR}) diff --git a/systemd/ceph-volume@.service b/systemd/ceph-volume@.service deleted file mode 100644 index 78bfc256c7662..0000000000000 --- a/systemd/ceph-volume@.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Ceph Volume activation: %i -After=local-fs.target -Wants=local-fs.target - -[Service] -Type=oneshot -KillMode=none -Environment=CEPH_VOLUME_TIMEOUT=10000 -ExecStart=/bin/sh -c 'timeout $CEPH_VOLUME_TIMEOUT @CMAKE_INSTALL_PREFIX@/sbin/ceph-volume-systemd %i' -TimeoutSec=0 - -[Install] -WantedBy=multi-user.target diff --git a/systemd/ceph-volume@.service.in b/systemd/ceph-volume@.service.in new file mode 100644 index 0000000000000..78bfc256c7662 --- /dev/null +++ b/systemd/ceph-volume@.service.in @@ -0,0 +1,14 @@ +[Unit] +Description=Ceph Volume activation: %i +After=local-fs.target +Wants=local-fs.target + +[Service] +Type=oneshot +KillMode=none +Environment=CEPH_VOLUME_TIMEOUT=10000 +ExecStart=/bin/sh -c 'timeout $CEPH_VOLUME_TIMEOUT @CMAKE_INSTALL_PREFIX@/sbin/ceph-volume-systemd %i' +TimeoutSec=0 + +[Install] +WantedBy=multi-user.target