Some units set KillMode=none to survive the initrd→rootfs transition. We
cannot remove their cgroups, but that shouldn't really be considered an
issue, so let's downgrade the error message.
r = cg_trim_with_mask(u->cgroup_mask, u->cgroup_path, true);
if (r < 0)
r = cg_trim_with_mask(u->cgroup_mask, u->cgroup_path, true);
if (r < 0)
- log_error("Failed to destroy cgroup %s: %s", u->cgroup_path, strerror(-r));
+ log_debug("Failed to destroy cgroup %s: %s", u->cgroup_path, strerror(-r));
hashmap_remove(u->manager->cgroup_unit, u->cgroup_path);
hashmap_remove(u->manager->cgroup_unit, u->cgroup_path);