/etc/init.d/ceph warnings

laxarus

Member
Aug 4, 2023
15
1
8
I am on the latest proxmox 9.1.5 with ceph 19.2.3 squid. These warnings bothering me a lot and I am scared to touch anything related to ceph.

Code:
systemd‑sysv‑generator: SysV service '/etc/init.d/ceph' lacks a native systemd unit file…

Please update package to include a native systemd unit file.

This compatibility logic is deprecated, expect removal soon.

Anything to do here to fix these warnings?

Or this is normal and I should wait for an update to be available?
 
This is indeed a serious issue. PVE version 9.1.6 uses "systemd/stable,stable,now 257.9-1~deb13u1 amd64" for providing ceph usability and "systemd-sysv-generator" is depreciated in the upcoming version 260 (see: https://github.com/systemd/systemd/releases/tag/v260-rc4 ). If this is not fixed before rolling "systemd version 260" ceph won't be available for PVE after booting. Maybe it will end up in a boot-loop or system-hold, because the storage is not available.
 
I ran into the same warning after upgrading from PVE 8 to PVE 9 with Ceph Squid.

It looks like /etc/init.d/ceph is simply an obsolete conffile left behind by ceph-base:

Bash:
# dpkg -S /etc/init.d/ceph
ceph-base: /etc/init.d/ceph

Bash:
# dpkg-query -W -f='${Conffiles}\n' ceph-base | grep init.d
 /etc/init.d/ceph 3ea0a68bfe33ec1a00d4e46b3bd53376 obsolete

Ceph itself is using the native systemd units. On my node, for example:
Bash:
# systemctl list-units 'ceph*'
ceph-osd@0.service  loaded active running
ceph-osd@1.service  loaded active running
ceph-osd.target       loaded active active
ceph-mon.target       loaded active active
ceph-mgr.target       loaded active active
ceph.target           loaded active active

while the ceph.service mentioned in the warning is only generated from the old SysV script and isn't used:

Bash:
# systemctl status ceph.service
○ ceph.service - LSB: Start Ceph distributed file system daemons at boot time
     Loaded: loaded (/etc/init.d/ceph; generated)
     Active: inactive (dead)
So the warning does not mean that the actual Ceph daemons depend on systemd-sysv-generator. It is triggered because the obsolete /etc/init.d/ceph is still present.

After verifying the above, the leftover can probably be removed:

Bash:
rm /etc/init.d/ceph
systemctl daemon-reload

This removes the generated ceph.service and the warning, while the native ceph.target, ceph-osd@.service, etc. remain untouched.

So this appears to be cleanup of an obsolete conffile after the upgrade rather than a missing systemd unit for Ceph.