Commit Graph

49 Commits

Author SHA1 Message Date
Stoiko Ivanov
3524142cb3 pve7to8: fix typo in log message
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
(cherry picked from commit 8763c263d1)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-04-04 12:45:21 +02:00
Christian Ebner
0ab0fd0123 pve7to8: fix broken pipe warning for dkms status invocation
The check for dkms kernel modules relies on the output of `dkms
status`. dkms command invocation will perform the following sanity
check:
```
if [ ! -e <(echo) ]; then
    warn $"dkms will not function properly if /proc is not mounted."
fi
```

This check will however throw the following warning when SIGPIPE is
set to be ignored:

```
sbin/dkms: line 2497: echo: write error: Broken pipe
```

While only cosmetic, this can be confusing. Therefore, temporarily
enable SIGPIPE before calling dkms, restoring the originally setting
afterwards.

Reported-by: Alexander Zeidler <a.zeidler@proxmox.com>
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
(cherry picked from commit 2bbf10d9ef)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-04-04 12:42:33 +02:00
Stoiko Ivanov
afb37f08f6 pve7to8: check for proper grub meta-package for bootmode
This should catch installations from our ISO on non-ZFS in uefi mode,
which won't get the updated grub efi binary installed upon upgrade,
because grub-pc is installed instead of grub-efi-amd64.

Adding this to pve7to8 should make this even more visible, than the
corresponding patch for promxox-kernel-helper (warnings printed during
regular package upgrades might be overlooked more easily than
a yellow line in the major upgrade checkscript)

The if/else order was chosen to limit the nesting level of the long
messages.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2023-11-06 18:12:39 +01:00
Christian Ebner
df296eae15 pve7to8: Add check for dkms modules
... and warn if at least one is present.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2023-09-27 19:29:55 +02:00
Christian Ebner
349f989913 pve7to8: Fix Fedora 38 systemd unified cgroupv2 check
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@proxmox.com>
2023-09-27 19:08:29 +02:00
Fiona Ebner
5fa7a336b7 pve7to8: fix Ceph noout check
Commit 114e5f2c ("pve7to8: sync over from stable-7 branch")
accidentally got rid of the correct value 0 here and also the new TODO
message to improve the situation. But the TODO is actually easy,
because there already is the $upgraded variable. Just rely on that
instead of hard-coding and forgetting about it again.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-07-17 14:57:49 +02:00
Thomas Lamprecht
5dc2d79a4d pve7to8: add checks for mismatched or strange repos
adapted and extended from pmg-api's commit 6ceeea8 [0].

[0]: https://git.proxmox.com/?p=pmg-api.git;a=commit;h=6ceeea877027853d6ae7a44f2d4d732ed6b136b9

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-07-03 13:12:03 +02:00
Thomas Lamprecht
ada2f621ad pve7to8: add "notice" log level
can be useful for things that might be OK, so where warn or even fail
would be to drastic, but that should be still checked as they seem
odd.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-07-03 13:12:03 +02:00
Thomas Lamprecht
c18858872e pve7to8: move color coding into low-level helper
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-07-03 13:12:03 +02:00
Stoiko Ivanov
d335f48136 pve7to8: add check for systemd-boot presence where needed
since the package won't get installed for systems upgraded from 7 to 8
we warn users who need systemd-boot - to be able to initialize new
ESPs - that they need to install it

The check for package installation is based on existance of the
changelog, since the package information used in pve7to8 comes from
the API-modules, which limit it to the pve-relevant packages.

tested in VMs with uefi and legacy mode, with existing
proxmox-boot-uuids both with and w/o systemd-boot being installed

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2023-06-21 19:50:26 +02:00
Fiona Ebner
835f0d198c pve7to8: enable noout before upgrade
Just like 3b776617 ("pve6to7: enable noout before upgrade") last time,
it should be enabled in the stable branch to ensure users see the
warning before upgrade.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-06-21 18:25:02 +02:00
Fiona Ebner
517abd0cd2 pve7to8: avoid confusing warning about required setting 'storage' for vzdump
It's required in the schema for notes-template and protected, but when
parsing vzdump.conf, it shouldn't matter whether the storage parameter
is set or not.

The warning is ugly and users might interpret it as something that
needs to be acted upon for the upgrade:
parse error in '/etc/vzdump.conf' - 'storage': missing property - 'notes-template' requires this property\nmissing property - 'protected' requires this property

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-06-21 18:16:14 +02:00
Fiona Ebner
b58348b1b6 pve7to8: remove outdated warning about retention
It just talks about the default behavior since PVE 7. It's rather
confusing to mention this, because the behavior doesn't change anymore
in PVE 8.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-06-21 18:16:14 +02:00
Friedrich Weber
20fb9aa3f1 pve7to8: content-dirs check: skip paths that cannot be resolved
The current inequality check for content-dirs does not correctly
handle the case in which `abs_path` returns undef. This can result in
confusing warnings:

  storage [...] uses directory  for multiple content types [...]

Fix this by skipping paths for which `abs_path` returns undef. This
matches the behavior of the actual content-dirs check in PVE 8 [0].

[0]: https://git.proxmox.com/?p=pve-storage.git;a=commit;h=09f1f847a

Fixes: ea0a4f1943
Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
2023-06-15 16:46:59 +02:00
Thomas Lamprecht
e1867cc765 pve7to8: code style cleanups
consistently use for instead of foreach (just shorter and avoids that
one thinks foreach does something special) and break a long line
while at it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-14 10:54:01 +02:00
Fabian Grünbichler
2f219e4981 pve7to8: add check for dropped Permissions.Modify
as a warning only - depending on desired privileges, no action might be
necessary.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-06-14 10:51:29 +02:00
Fabian Grünbichler
5ed620885f pve7to8: refactor user.cfg loop
next patch adds acl-related checks

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-06-14 10:51:29 +02:00
Thomas Lamprecht
b8396f9c21 pve7to8: fix parameter name of systemd unit state helper
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-12 17:11:52 +02:00
Thomas Lamprecht
6226082121 pve7to8: nvidia vGPU: downgrad report for active service to warning
While it would be a failure now (and I thus have recommended Dominik
to use a fail here), we cannot really predict how this
evolves. If NVIDIA fixes the issue in newer driver/tooling we cannot
detect this and telling users to ignore a failure can lead to them
getting condition on that and start ignoring any failure.

So, let's ignore my initial error-level hunch and use a warning,
which is quite prominent too.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-12 17:09:05 +02:00
Thomas Lamprecht
7b18f65726 pve7to8: nvidia vGPU: suppress stderr from unit check
Avoid a error message like "Failed to get unit file state for
nvidia-vgpu-mgr.service: No such file or directory" on systems that
don't have that service.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-12 17:05:39 +02:00
Thomas Lamprecht
40536b5ee4 pve7to8: nvidia vGPU: fix typo and refacotr out common message
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-12 17:05:12 +02:00
Dominik Csapak
5bff753aec pve7to8: add check for nvidia-vgpu-mgr
Currently the nvidia vgpu host driver (15.2) does not support kernels >
6.0 and thus will not work with bookworm based releases for now.

Fail when the service is running, and warn if it only exists, but is
disabled/stopped (in case a user installed it sometime but did not need
it and disabled it).

In any case, link to the known issues section in the upgrade guide
(which we can update to contain up-to-date information).

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-12 16:57:30 +02:00
Thomas Lamprecht
aee2b1382e pve7to8: use loop for systemd version extraction
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-12 16:44:39 +02:00
Christian Ebner
591f411f72 pve7to8: Improve systemd unified cgroupv2 support check
Checking /lib/systemd if it is present and a directory is not enough, as
the shared object file used to check the version might nevertheless be
located at /usr/lib/systemd, or under /usr/lib/x86_64-linux-gnu/systemd.
So check also the latter paths, if the former returned no match.

Further, Arch Linux appends the minor version and release version to the
filename, so include that in the regex as well.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2023-06-12 16:36:23 +02:00
Thomas Lamprecht
0038166cc5 pve7to8: make check for correct running kernel more resilient
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>
2023-06-12 16:28:51 +02:00
Thomas Lamprecht
7f96ef7781 pve7to8: check if LXCFS is running with FUSE3 after upgrade
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-08 13:00:08 +02:00
Thomas Lamprecht
0672c98e32 pve7to8: check for custom role ID clashes with "PVE" namespace
we'll enforce that in Proxmox VE 8 to avoid some headache on future
ACL expansion.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-08 09:47:31 +02:00
Thomas Lamprecht
af8e8c8822 pve7to8: fix some typos
found with using the codespell tool

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-08 09:42:14 +02:00
Thomas Lamprecht
774feb81f3 pve7to8: add context to overly general pass messages
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-07 14:07:21 +02:00
Thomas Lamprecht
b24ecafe4e pve7to8: content type dir re-use: add pass/fail & small clean-ups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-07 14:06:26 +02:00
Friedrich Weber
ea0a4f1943 pve7to8: warn if storage uses a directory for multiple content types
Using a directory for multiple content types will throw an error in
PVE 8 (see 5f4b5bd1 in pve-storage). Hence, detect this in pve7to8 for
active storages and warn if needed.

Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
2023-06-07 13:49:54 +02:00
Thomas Lamprecht
7878d8737a pve7to8: code style fix
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-05 19:21:06 +02:00
Aaron Lauterer
2e865cb37d pve7to8: ceph version check: ignore commit hash
The commit hash of the Ceph version might be different between major
releases. For example:
ceph version 17.2.6 (810db68029296377607028a6c6da1ec06f5a2b27) quincy (stable)
ceph version 17.2.6 (995dec2cdae920da21db2d455e55efbc339bde24) quincy (stable)

This can lead to unnecessary warnings of multiple detected versions.
Therefore, extract the version, e.g. 'ceph version 17.2.6', and the
commit hash. Use the simplified version for the version checks and show
an info line when the commit is different instead of a warning.
If the commit hashes are the only difference, we are likely in the
middle of the upgrade.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2023-06-05 19:16:46 +02:00
Thomas Lamprecht
d645b92ea8 pve7to8: cope with native version of proxmox-ve package
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-31 18:20:50 +02:00
Thomas Lamprecht
bf776ddd2a pve7to8: drop outdated apt security repo format change check
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-31 17:51:09 +02:00
Thomas Lamprecht
bda81173cd pve7to8: add minimal ceph version check
note that this is only checked in the hyper-converged use-case,
otherwise we don't really care what ceph client version is in use, as
that cannot really break much w.r.t. the upgrade (i.e., packaging
dependencies) itself.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-31 16:34:42 +02:00
Thomas Lamprecht
6bafdd6585 pve7to8: output failures in bold
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-31 15:26:21 +02:00
Thomas Lamprecht
18bf77f599 pve7to8: suggest removing outdated kernel meta packages after upgrade+reboot
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-31 15:18:33 +02:00
Thomas Lamprecht
3831dc0adc pve7to8: differ running kernel message depending on being at pre and post upgrade
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-31 14:37:40 +02:00
Thomas Lamprecht
eb12dccb60 pve7to8: improve log message for missing kernel reboot
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-31 13:26:24 +02:00
Thomas Lamprecht
81e10d4931 pve7to8: check for active and known-OK time-daemon unit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-31 11:26:13 +02:00
Thomas Lamprecht
ea9dcd0b82 pve7to8: allow to surpress stderr if checking systemd unit state
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-31 11:26:08 +02:00
Thomas Lamprecht
1f4a4dbecd pve7to8: avoid scary colors for warn and fail if their counters are zero
has a greater effect if color coded only on actual issues detected

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-31 10:25:30 +02:00
Thomas Lamprecht
64fa63b7c7 pve7to8: rename check_security_repo to check_apt_repos
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-31 10:25:30 +02:00
Thomas Lamprecht
5af851c5af pve7to8: update check for free space to >= 5 GB
As for persistent storage we normally use GB not GiB nowadays (e.g.,
in the Web UI), as 2^30 is bigger than 10^9, rounding up to 5 GB
should be fine; it's really safer to have a bit more free space as
minimally required in some minimal setups.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-31 10:25:30 +02:00
Thomas Lamprecht
69eaceb3df pve7to8: ensure pvescheduler.service is running OK
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-31 10:25:30 +02:00
Thomas Lamprecht
3019f374e5 pve7to8: check storage content in storage health section
albeit this is affecting guests too, maybe it would better fit into a
new Virtual Guests section.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-31 10:25:30 +02:00
Thomas Lamprecht
82bbcfad01 pve7to8: initial updates
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-31 10:24:50 +02:00
Thomas Lamprecht
855e0adb07 copy over pve6to7 for new pve7to8 upgrade checker script
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-31 10:16:34 +02:00