update source of pve7to8 upgrade checker script

squashed from the respective commits of the stable-7 branch, which is
the canonical source for this specific script.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2023-05-31 10:16:15 +02:00
parent 37c01c901d
commit a98193c295
5 changed files with 1345 additions and 5 deletions

View File

@ -9,6 +9,7 @@ SOURCES = \
pvenode.pm \
pvesh.pm \
pve6to7.pm \
pve7to8.pm \
all:

View File

@ -172,7 +172,12 @@ sub check_pve_packages {
my $upgraded = 0;
if ($maj > $min_pve_major) {
log_pass("already upgraded to Proxmox VE " . ($min_pve_major + 1));
my $pve_now = "". ($min_pve_major + 1);
my $pve_next = "". ($min_pve_major + 2);
log_pass("already upgraded to Proxmox VE ${pve_now}");
log_warn("Proxmox VE ${pve_now} got superseeded by Proxmox VE ${pve_next}.\n"
." Did you mean to use the pve${pve_now}to${pve_next} checker script?"
);
$upgraded = 1;
} elsif ($maj >= $min_pve_major && $min >= $min_pve_minor && $pkgrel >= $min_pve_pkgrel) {
log_pass("proxmox-ve package has version >= $min_pve_ver");

1304
PVE/CLI/pve7to8.pm Normal file

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,17 @@ PERL_DOC_INC_DIRS=..
-include /usr/share/pve-doc-generator/pve-doc-generator.mk
SERVICES = pvestatd pveproxy pvedaemon spiceproxy pvescheduler
CLITOOLS = vzdump pvesubscription pveceph pveam pvesr pvenode pvesh pve6to7
CLITOOLS = \
vzdump \
pvesubscription \
pveceph \
pveam \
pvesr \
pvenode \
pvesh \
pve6to7 \
pve7to8 \
SCRIPTS = \
$(SERVICES) \
@ -45,8 +55,20 @@ all: $(SERVICE_MANS) $(CLI_MANS)
mv $@.tmp $@
pve6to7.1:
printf ".TH PVE6TO7 1\n.SH NAME\npve6to7 \- Proxmox VE upgrade checker script for 6.4 to 7.x\n" > $@
printf ".SH SYNOPSIS\npve6to7 [--full]\n" >> $@
printf ".TH PVE6TO7 1\n.SH NAME\npve6to7 \- Proxmox VE upgrade checker script for 6.4 to 7.x\n" > $@.tmp
printf ".SH NOTE\npve6to7 is for the previous upgrade, from Proxmox VE 6 to 7, but there's a\
new Proxmox VE 8 available, see the 'pve7to8' tool.\n" >> $@.tmp
printf ".SH SYNOPSIS\npve6to7 [--full]\n" >> $@.tmp
mv $@.tmp $@
pve7to8.1:
printf ".TH PVE7TO8 1\n.SH NAME\npve7to8 \- Proxmox VE upgrade checker script for 7.4+ to current 8.x\n" > $@.tmp
printf ".SH DESCRIPTION\nThis tool will help you to detect common pitfalls and misconfguration\
before, and during the upgrade of a Proxmox VE system\n" >> $@.tmp
printf "Any failure must be addressed before the upgrade, and any waring must be addressed, \
or at least carefully evaluated, if a false-positive is suspected\n" >> $@.tmp
printf ".SH SYNOPSIS\npve7to8 [--full]\n" >> $@.tmp
mv $@.tmp $@
pveversion.1.pod: pveversion
pveupgrade.1.pod: pveupgrade
@ -73,7 +95,7 @@ install: $(SCRIPTS) $(CLI_MANS) $(SERVICE_MANS) $(BASH_COMPLETIONS) $(ZSH_COMPLE
.PHONY: clean
clean:
rm -f *.xml.tmp *.1 *.5 *.8 *{synopsis,opts}.adoc docinfo.xml
rm -f *.xml.tmp *.1 *.5 *.8 *{synopsis,opts}.adoc docinfo.xml *.tmp
rm -f *~ *.tmp $(CLI_MANS) $(SERVICE_MANS) *.1.pod *.8.pod
rm -f *.bash-completion *.service-bash-completion *.zsh-completion *.service-zsh-completion
rm -f *.api-verified *.service-api-verified

8
bin/pve7to8 Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/perl
use strict;
use warnings;
use PVE::CLI::pve7to8;
PVE::CLI::pve7to8->run_cli_handler();