nspawn: rename UNIFIED_CGROUP_HIERARCHY to SYSTEMD_NSPAWN_UNIFIED_HIERARCHY

We should never have used an unprefixed environment variable name.
All other systemd-nspawn variables have the "SYSTEMD_NSPAWN_" prefix,
and all other systemd variables have the "SYSTEMD_" prefix.

The new variable name takes precedence, but we fall back to checking the
old one. If only the old one is found, a warning is emitted.

In addition, SYSTEMD_NSPAWN_UNIFIED_HIERARCHY="" is accepted as an override
to avoid looking for the old variable name.

We have a variable with the same name ($UNIFIED_CGROUP_HIERARCHY) in tests,
which governs both systemd-nspawn and qemu behaviour. It is not renamed.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2019-09-27 14:17:41 +02:00
committed by Filipe Brandenburger
parent 490486842b
commit c78c095b1e
4 changed files with 34 additions and 22 deletions

View File

@@ -70,8 +70,8 @@ systemctl:
systemd-nspawn:
* `$UNIFIED_CGROUP_HIERARCHY=1` — if set, force nspawn into unified cgroup
hierarchy mode.
* `$SYSTEMD_NSPAWN_UNIFIED_HIERARCHY=1` — if set, force nspawn into unified
cgroup hierarchy mode.
* `$SYSTEMD_NSPAWN_API_VFS_WRITABLE=1` — if set, make /sys and /proc/sys and
friends writable in the container. If set to "network", leave only