[pve-devel] [PATCH container v2 2/2] setup: shortcut cgroupv2 support for non-systemd distros
Stoiko Ivanov
s.ivanov at proxmox.com
Mon Jul 5 12:57:15 CEST 2021
Alpine and Devuan do not use systemd as init, thus run without
problems in a pure cgroupv2 environment
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
src/PVE/LXC/Setup/Alpine.pm | 7 +++++++
src/PVE/LXC/Setup/Devuan.pm | 7 +++++++
2 files changed, 14 insertions(+)
diff --git a/src/PVE/LXC/Setup/Alpine.pm b/src/PVE/LXC/Setup/Alpine.pm
index e486971..5caeee7 100644
--- a/src/PVE/LXC/Setup/Alpine.pm
+++ b/src/PVE/LXC/Setup/Alpine.pm
@@ -106,4 +106,11 @@ sub setup_network {
PVE::LXC::Setup::Debian::setup_network($self, $newconf);
}
+# non systemd based containers work with pure cgroupv2
+sub unified_cgroupv2_support {
+ my ($self) = @_;
+
+ return 1;
+}
+
1;
diff --git a/src/PVE/LXC/Setup/Devuan.pm b/src/PVE/LXC/Setup/Devuan.pm
index d3d9019..3e15bb2 100644
--- a/src/PVE/LXC/Setup/Devuan.pm
+++ b/src/PVE/LXC/Setup/Devuan.pm
@@ -40,6 +40,13 @@ sub new {
return bless $self, $class;
}
+# non systemd based containers work with pure cgroupv2
+sub unified_cgroupv2_support {
+ my ($self) = @_;
+
+ return 1;
+}
+
# the rest gets handled by the Debian plugin, which is compatible with older
# non-systemd Debian versions for now.
--
2.30.2
More information about the pve-devel
mailing list