public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] 8 to 9: use more robust systemd version parsing regex from pve-container
@ 2025-08-06 13:48 Shannon Sterz
  2025-08-07 12:56 ` Fiona Ebner
  0 siblings, 1 reply; 3+ messages in thread
From: Shannon Sterz @ 2025-08-06 13:48 UTC (permalink / raw)
  To: pve-devel

previously some distrubtions could not be parsed here, leading to
reports that containers are not compatible with the dropped cgroup
support. however, this was due to a over sensitive regex. instead use
the more robust version we already use for pve-container [1].

this was reported for an OpenSUSE Slowroll container on the forum:
https://forum.proxmox.com/threads/169302/

[1]: https://git.proxmox.com/?p=pve-manager.git;f=PVE/CLI/pve8to9.pm;h=994189f1#l1285

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---



 PVE/CLI/pve8to9.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/PVE/CLI/pve8to9.pm b/PVE/CLI/pve8to9.pm
index 994189f13..a7ee842de 100644
--- a/PVE/CLI/pve8to9.pm
+++ b/PVE/CLI/pve8to9.pm
@@ -1282,7 +1282,8 @@ sub check_containers_cgroup_compat {
                 last if defined($libsd);
             }
             if (
-                defined($libsd) && $libsd =~ /libsystemd-shared-(\d+)(\.\d-\d)?(\.fc\d\d)?\.so/
+                defined($libsd)
+                && $libsd =~ /libsystemd-shared-(\d+)(?:[-.][a-zA-Z0-9]+)*\.so:?$/
             ) {
                 return $1;
             }
--
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [pve-devel] [PATCH manager] 8 to 9: use more robust systemd version parsing regex from pve-container
  2025-08-06 13:48 [pve-devel] [PATCH manager] 8 to 9: use more robust systemd version parsing regex from pve-container Shannon Sterz
@ 2025-08-07 12:56 ` Fiona Ebner
  2025-08-07 14:23   ` [pve-devel] Superseded: " Shannon Sterz
  0 siblings, 1 reply; 3+ messages in thread
From: Fiona Ebner @ 2025-08-07 12:56 UTC (permalink / raw)
  To: Proxmox VE development discussion, Shannon Sterz

Am 06.08.25 um 3:49 PM schrieb Shannon Sterz:
> diff --git a/PVE/CLI/pve8to9.pm b/PVE/CLI/pve8to9.pm
> index 994189f13..a7ee842de 100644
> --- a/PVE/CLI/pve8to9.pm
> +++ b/PVE/CLI/pve8to9.pm
> @@ -1282,7 +1282,8 @@ sub check_containers_cgroup_compat {
>                  last if defined($libsd);
>              }
>              if (
> -                defined($libsd) && $libsd =~ /libsystemd-shared-(\d+)(\.\d-\d)?(\.fc\d\d)?\.so/
> +                defined($libsd)
> +                && $libsd =~ /libsystemd-shared-(\d+)(?:[-.][a-zA-Z0-9]+)*\.so:?$/

I guess the colon at the very end is there, because in pve-container we
check via objdump rather than checking paths? It's already optional so
wouldn't be a functional change, but wanted to make sure.

Since we already use

my $lxc_setup = PVE::LXC::Setup->new($conf, $rootdir);

below, can't we simply call

$lxc_setup->unified_cgroupv2_support()

directly like we do in the prestart hook?


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [pve-devel] Superseded: [PATCH manager] 8 to 9: use more robust systemd version parsing regex from pve-container
  2025-08-07 12:56 ` Fiona Ebner
@ 2025-08-07 14:23   ` Shannon Sterz
  0 siblings, 0 replies; 3+ messages in thread
From: Shannon Sterz @ 2025-08-07 14:23 UTC (permalink / raw)
  To: Fiona Ebner, Proxmox VE development discussion

On Thu Aug 7, 2025 at 2:56 PM CEST, Fiona Ebner wrote:
> Am 06.08.25 um 3:49 PM schrieb Shannon Sterz:
>> diff --git a/PVE/CLI/pve8to9.pm b/PVE/CLI/pve8to9.pm
>> index 994189f13..a7ee842de 100644
>> --- a/PVE/CLI/pve8to9.pm
>> +++ b/PVE/CLI/pve8to9.pm
>> @@ -1282,7 +1282,8 @@ sub check_containers_cgroup_compat {
>>                  last if defined($libsd);
>>              }
>>              if (
>> -                defined($libsd) && $libsd =~ /libsystemd-shared-(\d+)(\.\d-\d)?(\.fc\d\d)?\.so/
>> +                defined($libsd)
>> +                && $libsd =~ /libsystemd-shared-(\d+)(?:[-.][a-zA-Z0-9]+)*\.so:?$/
>
> I guess the colon at the very end is there, because in pve-container we
> check via objdump rather than checking paths? It's already optional so
> wouldn't be a functional change, but wanted to make sure.

> Since we already use
>
> my $lxc_setup = PVE::LXC::Setup->new($conf, $rootdir);
>
> below, can't we simply call
>
> $lxc_setup->unified_cgroupv2_support()
>
> directly like we do in the prestart hook?

yep makes sense, i'll look into that, but was a bit worried about bigger
changes to this code. i send a v2 with these changes, so consider this:

Superseded-by: https://lore.proxmox.com/pve-devel/20250807142246.341381-1-s.sterz@proxmox.com/T/#u



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-07 14:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-06 13:48 [pve-devel] [PATCH manager] 8 to 9: use more robust systemd version parsing regex from pve-container Shannon Sterz
2025-08-07 12:56 ` Fiona Ebner
2025-08-07 14:23   ` [pve-devel] Superseded: " Shannon Sterz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal