]> git.proxmox.com Git - pve-manager.git/commitdiff
pve7to8: make check for correct running kernel more resilient
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 12 Jun 2023 14:28:49 +0000 (16:28 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 12 Jun 2023 14:28:51 +0000 (16:28 +0200)
users can have the 6.2 kernel already installed, so this check needs
to cope with that.

The last non-bpo version on bullseye releases was 6.2.11-2-pve and
the first release for bookworm was 6.2.16-1-pve, so use a regex that
matches the bookworm one and newer, but fails with any tilde
characters, which must be used for any 6.2 update in bullseye from
now on to ensure correct upgrades.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/CLI/pve7to8.pm

index 6b51e98eb491c02f743756b87fc2f87e57aa424f..6e2cc04f3c8905ba1073ef3bad9e61d95baf0ace 100644 (file)
@@ -198,7 +198,8 @@ sub check_pve_packages {
            log_fail("proxmox-ve package is too old, please upgrade to >= $min_pve_ver!");
        }
 
-       my ($krunning, $kinstalled) = (qr/6\.(?:2|5)/, 'pve-kernel-6.2');
+       # FIXME: better differentiate between 6.2 from bullseye or bookworm
+       my ($krunning, $kinstalled) = (qr/6\.(?:2\.(?:[2-9]\d+|1[6-8]|1\d\d+)|5)[^~]*$/, 'pve-kernel-6.2');
        if (!$upgraded) {
            # we got a few that avoided 5.15 in cluster with mixed CPUs, so allow older too
            ($krunning, $kinstalled) = (qr/(?:5\.(?:13|15)|6\.2)/, 'pve-kernel-5.15');