core/varlink: do not send unrealized cgroups to oomd
Follow-ups for 23ac08115a.
Since the commit, the cgroup path is set only when it is realized.
Fixes the following varlink IDL validation failure:
```
systemd-oomd[1687]: Varlink-IDL: Mandatory field 'path' is null or missing on object, refusing.
```
This commit is contained in:
@@ -95,6 +95,10 @@ static int build_managed_oom_cgroups_json(Manager *m, sd_json_variant **ret) {
|
||||
if (!c)
|
||||
continue;
|
||||
|
||||
CGroupRuntime *crt = unit_get_cgroup_runtime(u);
|
||||
if (!crt || !crt->cgroup_path)
|
||||
continue;
|
||||
|
||||
FOREACH_ELEMENT(i, managed_oom_mode_properties) {
|
||||
_cleanup_(sd_json_variant_unrefp) sd_json_variant *e = NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user