Commit Graph

57 Commits

Author SHA1 Message Date
Thomas Lamprecht
6763226345 followup log messages nits
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-12 17:40:20 +02:00
Thomas Lamprecht
797ba64009 pve5to6: refactor out apt-cache package installed checks
for potential reuse in the future and makes the real check easier to
read

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-12 15:43:18 +02:00
Dominik Csapak
a08419739e pve5to6: add check for ovmf vms with potentially broken efi disk
we wrongly mapped some efidisks into the vm, and fixed it in pve6
this potentially needs manual intervention, so warn the user about
which vms might be affected

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-05-12 14:18:34 +02:00
Dominik Csapak
aa517822d6 pve5to6: add check for stock debian kernel package
on current debian buster, stock kernel images recommend
firmware-linux-free which conflict with our pve-firmware package
which leads to apt wanting to remove promxox-ve

check for the meta package in the update check script

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-05-12 14:18:34 +02:00
Thomas Lamprecht
12511b123d 5to6: cleanup cert check and make more general
If we need to add other types or increases the min size this makes it
easier as it's just a schematic definition.

Also just do a pass/fail on each cert, so drop the last "summary
pass".

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 6c7e4ab4e24592a8dfa5dac3f5047064e17254f2)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-25 09:29:56 +02:00
Alwin Antreich
70effe2709 pve5to6: cert: check certificates key size
Debian Buster raised the default security level (1 -> 2) for TLS
connections.

This moves from the 80 bit security level to the 112 bit security level
and will require 2048 bit or larger RSA and DHE keys, 224 bit or larger
ECC keys, and SHA-2.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
(cherry picked from commit 501f8505210553093243db6d279f936498e76124)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-25 09:29:52 +02:00
Fabian Grünbichler
e0505600dd 5to6: make corosync totem checks more verbose
to avoid just printing the subheader with no results

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
(cherry picked from commit c4bc94bb7b019e3c5a4518eda55883bb989146c5)
2019-07-08 18:27:23 +02:00
Fabian Grünbichler
77f8b8414f 5to6: add more corosync subheaders
to improve readability

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
(cherry picked from commit 5684da54dc15fb2a5bb26fdef95db67cea836a21)
2019-07-08 18:27:23 +02:00
Fabian Grünbichler
a6524bbec2 5to6: fail if a corosync node has neither ring0 nor ring1 defined
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
(cherry picked from commit e6b956df7bb1522e0cf47e2afb3dbb609a88b750)
2019-07-08 18:27:23 +02:00
Fabian Grünbichler
b3a6a2aebe 5to6: reword/-structure corosync message
and fix a typo as well

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
(cherry picked from commit 388a505104eae0d8c6389b247aba7eca713b03ba)
2019-07-08 18:27:23 +02:00
Fabian Grünbichler
b78378f3cc 5to6: attempt to resolve corosync rings
and only fail if unable to

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>

(backported from commit 669211d8bbb0857275669068fcbf62560782b888)

use local copy of resolve_hostname_like_corosync instead of
pve-cluster's.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-08 18:27:23 +02:00
Fabian Grünbichler
e9ad9ab43f 5to6: add Corosync resolve helper
copied from PVE 6.x's pve-cluster.

since Corosync 2.x has a different default value for ip_version, we
don't want to backport this for general usage in PVE::Corosync. the
check here needs the default of Corosync 3.x, since that is what we
upgrade to.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-07-08 18:27:23 +02:00
Thomas Lamprecht
64ef936327 5to6: only tell to solve problems if fails are present
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit be1072fb3bee0c15fbe67637289ab39adf64b6d7)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 15:32:44 +02:00
Thomas Lamprecht
e35e351f12 5to6: improve final note on errors and/or warning a bit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit a14a5aaf678d9f5ba6235616b091684a9042cf4a)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 15:31:08 +02:00
Thomas Lamprecht
0e25ab8057 5to6: fiy typo: s/detailled/detailed/
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 71f6edacdf6f5694f10a196626b950c66665d121)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 15:23:42 +02:00
Thomas Lamprecht
e5196e8489 5to6: check common services pveproxy pvedaemon pvestatd
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 0192b0a2c2d5e2debb8e0a3e9279e73399e288ec)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 15:22:13 +02:00
Thomas Lamprecht
57d9636122 5to6: add log_systemd_unit_state and use for pve-cluster and corosync
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit fa1c414e265c1fe47673c069a114cbc9199d8347)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 15:22:13 +02:00
Thomas Lamprecht
b60916cc2c 5to6: import run_command
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit a82c200a9e11033f0f696a0af6bb5e6d522ca883)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 15:22:13 +02:00
Thomas Lamprecht
084625c29f 5to6: clarify "cluster quorate" message a bit
As this is the state from the pmxcfs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 88d757d0c02fe62f57432a133e222a0fbd057e4e)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 15:22:13 +02:00
Thomas Lamprecht
a6fc492a8b 5to6: fixup: really set $total_votes to 0 if not defined
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 176116b22ffae4993f5b3e25977ea08c6aca4dc9)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 15:22:13 +02:00
Fabian Grünbichler
02e79accf9 5to6: drop detailed quorumtool output
since we already print most of that anyway, and it is rather long.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
(cherry picked from commit 3456f2fc9d3094af3a0c7bdbe7a55abfd16ff380)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 15:22:13 +02:00
Fabian Grünbichler
fbcc77375f 5to6: more quorum / vote checking
handle expected votes set to non-standard value, and try to adjust
calculations for qdevice setups.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
(cherry picked from commit f6c6aa2b046b6b580855bab633a7ff1f94e3028a)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 15:22:13 +02:00
Fabian Grünbichler
7a6994bc37 5to6: quote some Ceph flags/options
to improve readability

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
(cherry picked from commit 8ac5d4a50064f8d4c0e3abd6023fd2dee46331d3)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 11:40:28 +02:00
Fabian Grünbichler
a500f71b44 5to6: check for ceph global keyring config
which causes issues after upgrading to Nautilus.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
(cherry picked from commit 974a1b58548eb6f63541b311166c81a46fb4dc35)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 11:40:28 +02:00
Thomas Lamprecht
6cc9ab6128 5to6: followup: also detect ceph conf keys separated with -
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 09250673d60b34febd220944c2a904758cf91618)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 11:27:54 +02:00
Thomas Lamprecht
90ec2ddb9e 5to6: ceph mon host check: switch config check from defined to hash values exist
we can get here if a empty (or one with just comments) ceph.conf
exists

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 153d6912879b0053af54a9218e10aa57ed43fc96)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 11:27:54 +02:00
Thomas Lamprecht
8ade3b35fa 5to6: ceph global mon host check: also detect mon-host
and adapt message a bit

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit f696b0c355d0e9400da7f10530a957ede2b4e433)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 11:27:54 +02:00
Dominik Csapak
c0d772c434 pve5to6: check ipv6/ipv4 settings in ceph.conf
having ipv6 enabled while not disabling ipv4 prevents
nautilus osds to start if no ipv4 network is given (because they
are trying to bind to both ip families and die if one of them
is not found)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
(cherry picked from commit 9e98f1fecf1c09811239b2c6183107a00b149de0)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 11:27:54 +02:00
Dominik Csapak
42bbe3edd1 pve5to6: check ceph config for mon_host line
this already works on luminous, so it does not harm to add it already,
and is recommended when both msgr1 and msgr2 is activated in nautilus

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
(cherry picked from commit 4731f493c3484d5ea95dee7978678779189ef779)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 11:27:54 +02:00
Fabian Grünbichler
a75241fb90 5to6: invert check for noout for nautilus
mainly because it looks strange to get a warning after the upgrade is
finished and noout has been removed again

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
(cherry picked from commit 600a106ba0c47150c29f87561d480d4b89085d41)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 09:41:30 +02:00
Thomas Lamprecht
33866e3cdc 5to6: followup: still include nodename in IP check
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit eb7dae8bba7f57abdf16d3843ce6716786d04bf8)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 09:41:30 +02:00
Fabian Grünbichler
f94e33c0e1 5to6: reuse $nodename
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
(cherry picked from commit 473a71d246492941b17d003decc8d2c1e7d5b01a)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 09:41:30 +02:00
Fabian Grünbichler
329cf22a70 5to6: improve some log messages
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
(cherry picked from commit 1760de9011fdfbc3f734c3039125d46176586545)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 09:41:30 +02:00
Thomas Lamprecht
92c64229a9 5to6: followup sheepdog message
do not suggest that we ever supported it as first class storage, it
was always just a experimental support and upstream is
EOL/unmaintained now.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 95c3dc246008b64cdc66e77f08a4862f531e7f0a)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 09:41:30 +02:00
Fabian Grünbichler
cd77216038 5to6: add check for configured Sheepdog storages
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
(cherry picked from commit 1f16530be97b27c0674d6e1d7b842844a5d20043)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-04 09:41:30 +02:00
Thomas Lamprecht
dc7eea012c 5to6: improve ceph warning on non OK state
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-03 13:14:05 +02:00
Thomas Lamprecht
22ad5ba62e pve5to6: be a bit more verbose for misc. checks
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 5a7a3630d770604a0d187190a6e9e6046048eb65)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-02 12:10:48 +02:00
Thomas Lamprecht
450957c08a pve5to6: followup: improve coding style and outputs a bit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 6e41184b1a7af21523380c7cb5080462d89bbcf4)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-02 12:10:48 +02:00
Dominik Csapak
eb7fda9966 pve5to6: list vms with active vmx/svm flag
list all vms with either max/host cputype or vmx/svm explicitely set
(this can only happen in the args)

give a general message if none is found at the moment (and do not warn)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
(cherry picked from commit e739e0ba6724d41f2a912796b68833ebdc8baadd)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-02 12:10:48 +02:00
Thomas Lamprecht
663ae4d86b 5to6: get_pkg: cache version list
this is a short running script, so the version list can be re-used,
the chance that there where updates in between are slim and racy
anyway. IF getting the versions did not succeeded, we still retry on
every call though, simpler and ensures a warning is printed in the
caller check vicinity.

Makes script noticeable faster.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-28 08:46:00 +02:00
Thomas Lamprecht
86a3955d78 5to6: followup kernel version checks, make compatible with PVE 5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-28 08:35:45 +02:00
Fabian Grünbichler
5d2ae29215 5to6: add check for scanned simple OSDs
only as a warning, since this will also trigger a Ceph health warning
and is easily recoverable.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-06-28 08:35:45 +02:00
Fabian Grünbichler
7f4b3ea551 5to6: add check for running kernel version
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-06-28 08:35:45 +02:00
Thomas Lamprecht
ebd4de69d4 pve5to6: improve is-node-IP active check
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-27 19:48:36 +02:00
Thomas Lamprecht
f814c077d8 pve5to6: add total count in summary
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-27 19:48:36 +02:00
Thomas Lamprecht
52d469afde pve5to6: align summary counters
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-27 19:48:36 +02:00
Thomas Lamprecht
3f5db7faac pve5to6: list packages with updates in new line
with two spaces indentation, like apt does

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-27 19:48:36 +02:00
Thomas Lamprecht
6afec5dab9 pve5to6: versions: detect if already upgraded
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-27 19:48:36 +02:00
Thomas Lamprecht
f3d40afa75 pve5to6: add and use print_header
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-27 19:48:36 +02:00
Thomas Lamprecht
89abf04dfe pve5to6: make this a simple CLI command
with this it's enough to call `pve5to6`, no (sub)command needed

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-27 19:48:36 +02:00