[pve-devel] [PATCH manager master stable-7] pve7to8: Fix Fedora 38 systemd unified cgroupv2 check
Christian Ebner
c.ebner at proxmox.com
Wed Sep 27 08:58:44 CEST 2023
Ping, see also https://forum.proxmox.com/threads/128721/
> On 28.08.2023 09:54 CEST Christian Ebner <c.ebner at proxmox.com> wrote:
>
>
> For Fedora 38 the systemd shared object files used to check the systemd
> version are located at /usr/lib64/systemd or /usr/lib/systemd.
> Therefore, include /usr/lib64/systemd in the list of directories to
> check.
>
> Further, Fedora 38 adds a fc38 postfix to the filename, so expand the
> regex to cover that as well.
>
> Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
> ---
>
> Reported by users via the forum:
> https://forum.proxmox.com/threads/128721/#post-584456
>
> PVE/CLI/pve7to8.pm | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/PVE/CLI/pve7to8.pm b/PVE/CLI/pve7to8.pm
> index ff8e6045..3947b260 100644
> --- a/PVE/CLI/pve7to8.pm
> +++ b/PVE/CLI/pve7to8.pm
> @@ -1022,12 +1022,18 @@ sub check_containers_cgroup_compat {
> my $get_systemd_version = sub {
> my ($self) = @_;
>
> + my @dirs = (
> + '/lib/systemd',
> + '/usr/lib/systemd',
> + '/usr/lib/x86_64-linux-gnu/systemd',
> + '/usr/lib64/systemd'
> + );
> my $libsd;
> - for my $dir ('/lib/systemd', '/usr/lib/systemd', '/usr/lib/x86_64-linux-gnu/systemd') {
> + for my $dir (@dirs) {
> $libsd = PVE::Tools::dir_glob_regex($dir, "libsystemd-shared-.+\.so");
> last if defined($libsd);
> }
> - if (defined($libsd) && $libsd =~ /libsystemd-shared-(\d+)(\.\d-\d)?\.so/) {
> + if (defined($libsd) && $libsd =~ /libsystemd-shared-(\d+)(\.\d-\d)?(\.fc\d\d)?\.so/) {
> return $1;
> }
>
> --
> 2.39.2
More information about the pve-devel
mailing list