cephadm: workaround unit replace failure
This should be a bug in systemd. It failed to cleanup cgroups when stop the
unit. Then if we start a new unit with the same name, the 'ExecStartPre' command
will fail with status=219/CGROUP (Only when systemd unified cgroup hierarchy is
enabled), because cgroup v2 does not allow process in non-leaf group. This
should be fixed in systemd commit
e08dabfec7304dfa0d59997dc4219ffaf22af717.
By now, we just remove these left over cgroups before start new unit.
Fixes: https://tracker.ceph.com/issues/50998
Signed-off-by: 胡玮文 <huww98@outlook.com>
(cherry picked from commit
1fee255ee4ceab99684c34e3e64532b2eb555a9e)