mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-12-15 12:59:42 +01:00
Detect RHEL 8, AlmaLinux 8, Rocky Linux 8, and CloudLinux 8 systems and provide clear instructions when cgroups v2 needs manual enablement. These systems have cgroups v2 backported to kernel 4.18 but it's disabled by default. When detected without cgroups v2 enabled, the system now: 1. Detects RHEL 8 family by checking /etc/redhat-release 2. Verifies if cgroups v2 is mounted (checks 'mount' output for 'cgroup2') 3. If not enabled, logs detailed instructions: - grubby command to add kernel parameter - Reboot instruction - Verification command - Clear step-by-step guide Changes: - _check_rhel8_cgroups_v2(): New method for RHEL 8 family detection - _ensure_cgroups_enabled(): Calls RHEL 8 check before general checks - check_cgroup_support(): Returns RHEL 8 status in support dict - rhel8_family: bool (detected RHEL 8 family) - rhel8_needs_enablement: bool (cgroups v2 not mounted) - os_name: str (full OS name from release file) OS Support Status: ✅ Ubuntu 20.04+ - Native cgroups v2 (kernel 5.4+) ✅ RHEL/Alma/Rocky 9+ - Native cgroups v2 (kernel 5.14+) ⚠️ RHEL/Alma/Rocky/CloudLinux 8 - Needs manual enable (kernel 4.18 backported)
21 KiB
21 KiB