]> git.proxmox.com Git - pve-manager.git/commitdiff
pveceph: reuse supported ceph versions for non-default warning
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 21 Jun 2022 15:04:21 +0000 (17:04 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 21 Jun 2022 15:04:49 +0000 (17:04 +0200)
albeit this is a bit odd safety "check" anyway

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

index 62763ad2c6bdac71787a2bbc1c4e240290f92642..41005bcf1b2be61ff2f2558ff0f905ae54bf1c2e 100755 (executable)
@@ -159,8 +159,8 @@ __PACKAGE__->register_method ({
        }
        PVE::Tools::file_set_contents("/etc/apt/sources.list.d/ceph.list", $repolist);
 
-       warn "WARNING: installing non-default ceph release '$cephver'!\n"
-           if $cephver !~ qr/^(?:octopus|pacific)$/;
+       my $supported_re = join('|', $supported_ceph_versions->@*);
+       warn "WARNING: installing non-default ceph release '$cephver'!\n" if $cephver !~ qr/^(?:$supported_re)$/;
 
        local $ENV{DEBIAN_FRONTEND} = 'noninteractive';
        print "update available package list\n";