diff --git a/src/libcrun/cgroup-systemd.c b/src/libcrun/cgroup-systemd.c index 1052c46906..8dd71f1f26 100644 --- a/src/libcrun/cgroup-systemd.c +++ b/src/libcrun/cgroup-systemd.c @@ -984,6 +984,9 @@ libcrun_destroy_systemd_cgroup_scope (struct libcrun_cgroup_status *cgroup_statu ret = systemd_check_job_status (bus, &job_data, object, "removing", err); + /* In case of a failed unit, call reset-failed so systemd can remove it. */ + reset_failed_unit (bus, scope); + exit: if (bus) sd_bus_unref (bus);