Commit Graph

37 Commits

Author SHA1 Message Date
Thomas Lamprecht
0b1d64764f pve6to7: update expected running kernel version to 5.13 or 5.15
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-14 08:19:55 +01:00
Rhonda D'Vine
b8436f0c6b Only check deb sources.list entries
The check isn't specific enough, it also catches deb-src entries and
would give a false impression of security in certain circumstances, or
lead to false negatives in case you have a deb-src entry for
buster/updates even though you have bullseye-security in just the next
line -- something that isn't that uncommon for developers.

Signed-off-by: Rhonda D'Vine <rhonda@deb.at>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-13 06:33:45 +02:00
Fabian Ebner
d8aa2f664d pve6to7: storage content: ignore misconfigured unreferenced volumes
If the same local storage is configured twice with content type
separation, migration in PVE 6 would lead to the volumes being
duplicated. As that would happen for every migration, such an issue
would likely be noticed already, and in PVE 7 such configuration is
not problematic for migration anymore. Also, misconfigured
unreferenced volumes are not an issue with respect to the upgrade
itself, just drop the check.

It's not necessary to scan storages with either 'images' or 'rootdir'
anymore, as only the log_info() remains.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-07 18:44:54 +02:00
Fabian Ebner
fcae887b85 pve6to7: storage content: skip scanning storage if shared
Shared storages are not scanned for migration either, so they cannot
be problematic in this context. This could lead to false positives
where it actually is completely unproblematic:

https://forum.proxmox.com/threads/proxmox-ve-7-0-released.92007/post-401165

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-07 18:43:42 +02:00
Fabian Ebner
759d1a6ba8 pve6to7: add check for Debian security repository
since the pattern for the suite changed.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-07 18:10:50 +02:00
Thomas Lamprecht
71202973d3 pve6to7: avoid parsing configs to often, merge lxc.cgroup check and note length one
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-07 12:45:39 +02:00
Thomas Lamprecht
06f915e63f pve6to7: remember if cgroup is forced to legacy
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-07 12:40:43 +02:00
Stoiko Ivanov
2445be40e3 pve6to7: add check for 'lxc.cgroup.' keys in container config
The check is rather straight forward - and might help users who
passthrough devices to their containers.

Reported in our community forum:
https://forum.proxmox.com/threads/pve-7-0-lxc-intel-quick-sync-passtrough-not-working-anymore.92025/

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2021-07-07 12:20:08 +02:00
Fabian Grünbichler
6d451a4bc3 pve6to7: dont guard noout check on Ceph version
we don't have a mandatory Ceph major version upgrade this time around,
so this check does not make sense. instead, we want noout until the full
cluster is upgraded. let's use the simple approach and just flip the
switch to "turn off noout if all of Ceph is a single version" in the PVE
7.x branch.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-07-06 14:20:46 +02:00
Fabian Grünbichler
a2e5da3fdf pve6to7: check for >= Octopus
and drop the Nautilus OSD upgrade check while we are at it..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-07-06 14:20:46 +02:00
Fabian Grünbichler
1ba568d67e pve6to7: remove PASS noise for ceph
these were mostly relevant for the Luminous -> Nautilus upgrade, and we
don't need to list all the default passing states that our tooling sets
up anyway.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-07-06 14:20:46 +02:00
Fabian Grünbichler
3bc032ad0e pve6to7: use new flags API
the old one is not available post-upgrade, let's use a single codepath
for this.

the new API only allows querying user-settable flags, but the only flags
we check besides 'noout' are not relevant for an upgrade of PVE 6.x to
7.x (PVE 6.x only supports Nautilus+ which requires these flags to be
set in order to work) so we can just drop those outdated checks instead
of extending/refactoring the API.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-07-06 14:20:46 +02:00
Thomas Lamprecht
222db0f513 pve6to7: rework full-check skip-message slightly
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-05 17:38:32 +02:00
Thomas Lamprecht
1d5529612f pve6to7: rework cgroup message slightly
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-05 17:38:16 +02:00
Thomas Lamprecht
2331534996 pve6to7: try to iterate in a more stable fashion
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-05 17:37:58 +02:00
Thomas Lamprecht
ca0c50a1e6 pve6to7: handle undefined ostype
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-05 17:37:40 +02:00
Stoiko Ivanov
3d779b1274 pve6to7: add 'full' parameter for expensive checks
and place the container cgroupv2 support checks behind it.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2021-07-05 17:06:43 +02:00
Stoiko Ivanov
9f5f981914 pve6to7: check for containers not supporting pure cgroupv2
Helpers copied from pve-container to avoid versioned bumps.

Early returns when no containers are running, or the containers don't
use systemd, as well as returning after finding the first affected
container to minimize impact and resource usage.

Checking running containers first since following /proc/<pid>/root is
cheaper than mounting all volumes for a container

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2021-07-05 17:06:43 +02:00
Thomas Lamprecht
37208950a7 pve6to7: fix description-length warning for guests
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 11:49:48 +02:00
Fabian Grünbichler
cea2918a85 pve6to7: drop PASS for Luminous -> Nautilus check
this should pass on pretty much every system running hyper converged
Ceph on PVE 6.x ..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-07-02 11:43:44 +02:00
Fabian Grünbichler
23db33ca4c pve6to7: reduce number of cluster PASS statements
these were mostly releveant for upgrading from Corosync 2.x to 3.x - so
keep the warnings/errors, but reduce the noise a bit by skipping lots of
PASS output.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-07-02 11:43:44 +02:00
Dominik Csapak
97723d760c pve6to7: skip user.cfg if it does not exist
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-06-30 16:25:50 +02:00
Fabian Ebner
1126b8cd7d pve6to7: more fine-grained detection of misconfigured guest volumes
If neither 'rootdir' nor 'images' are configured on a storage, but
there are guest images, just log the number of volumes found. If they
are relevant for migration, the check for unreferenced volumes will
catch them later.

Also detect content type mismatch for all volumes of existing guests,
which also covers the case of a VM image on a storage with only
'rootdir' and vice versa. To catch all such unreferenced volumes too,
it is necessary to scan all storages that do not have both content
types configured.

Change the message from 'will not work' to 'might not work'. If a
volume only referenced by a snapshot is misconfigured, it doesn't mean
that the guest doesn't work at all. Or it might be an ISO on a
misconfigured storage.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-30 14:21:11 +02:00
Fabian Ebner
f68689bbf8 pve6to7: content check: fix detecting pass
If there is a log_fail, because of misconfigured 'none' content type, the final
log_pass should not be printed.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-30 14:21:11 +02:00
Thomas Lamprecht
0168075b9d pve6to7: make content-type check output an actual list
As else it gets rather confusing when one has more than one or two
such images.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-21 17:12:12 +02:00
Fabian Ebner
d12bbda5c5 pve6to7: check for misconfigured content type 'none'
which will be a hard error (i.e. section will be skipped when parsing) in PVE
7.0

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-21 16:50:51 +02:00
Fabian Ebner
6f361f8064 pve6to7: add check for guest images on misconfigured storages
migration and (container) startup will no longer work when the storage's content
type is not correct, and unreferenced volumes on such storages will not be
scanned for anymore.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-21 16:50:51 +02:00
Thomas Lamprecht
08dd6ed855 pve6to7: re-work output of description length check and add passes too
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-18 16:49:22 +02:00
Lorenz Stechauner
84006d1fcf pve6to7: add check for guest and node description length
Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
2021-06-18 15:48:09 +02:00
Thomas Lamprecht
6407435786 pve6to7: bump free space requirement to 4 GiB
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-18 14:32:20 +02:00
Fabian Grünbichler
055b696736 pve6to7: use file_get_contents
instead of File::Slurp

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-06-18 11:00:18 +02:00
Fabian Grünbichler
65b46cadf0 pve6to7: improve user.cfg parser
make it a bit more like the actual one - remove whitespace padding, use
same regex/split calls.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-06-18 10:52:32 +02:00
Lorenz Stechauner
5b3bad3786 pve6to7: add check for pool permissions
the two checks make sure that:
* no user defined role 'PVEPoolUser' exists
* the user gets a hint for roles only containing Pool.Allocate and
    not Pool.Audit

a very simple parser for user.cfg was implemented to be able to
parse the (in pve 6 invalid) Pool.Audit permission

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
2021-06-18 10:39:47 +02:00
Fabian Ebner
5df8b5555a pve6to7: add check for CIFS credentials
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-16 13:28:54 +02:00
Fabian Grünbichler
437ade60b5 pve6to7: improve vzdump.cron check
handle errors, and fix filename referenced in the warning.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-06-16 13:28:54 +02:00
Fabian Ebner
e522a2db5c pve6to7: add checks for backup retention options
Note that it's not possible to use read_vzdump_defaults() and storage_config(),
because they auto-converts maxfiles already.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-16 13:22:26 +02:00
Thomas Lamprecht
4177a14d13 add pve6to7 WIP
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-19 19:01:51 +02:00