pve6to7: avoid parsing configs to often, merge lxc.cgroup check and note length one
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit d0ec7e3e2fca754ed9a92716392c47af75efb4e9) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 999b4335ef1dc69777198cdd2fd4c63bae0bbe97) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
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>
(cherry picked from commit 5617b13b915e79c582de5d2c9f8d8d814e79559a) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
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>
(cherry picked from commit efa7075778552938accc108368515f52343cbdfc) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
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>
(cherry picked from commit 05dc1ab498ff457b43723ab3e166fa27eff37063) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 8e0530c4130051ddde74fbc4567954de46f80ead) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 4e55d526905dc1d182e7e98c2f4276261879c82d) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 8b805a70c8bd1f206a37b3f834600c35870af382) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 500ccca1a5cea8ccac2d18fb8d0b8ac8b5102768) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
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>
(cherry picked from commit 97441e982adcaaff52f80c8e7e28798817d18c44) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Hannes Laimer [Mon, 28 Jun 2021 10:40:34 +0000 (12:40 +0200)]
api: cluster/resources: add 'name' property to return schema
VM names are returned by the endpoint anyway, therefore it makes sense
to add it to the endpoint specification so it also appears in the API
docs and is visible when using pvesh with text output.
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
api: cluster/backupinfo: rework bogus index endpoint
This had a myriad of issues:
* marked as protected, thus forwarded to the privileged daemon even
if it just returned static information
* did not return directory index but a "stub" string, which does not
makes sense.
* not named index
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
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.
Fabian Ebner [Wed, 30 Jun 2021 09:16:18 +0000 (11:16 +0200)]
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.
Aaron Lauterer [Tue, 22 Jun 2021 08:07:26 +0000 (10:07 +0200)]
ui: dc: backup: fix job detail search
'for...in array' returns the id in the array but not the value,
'for...of array' returns the values.
Another issue that I ran into was if the property did not exist.
Checking if the property evaluates to false will catch situations where
the property does not exist or is null. All other situations where there
is a value for the name, id or type, should evaluate to true if present
as they are strings or the VMID.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
(cherry picked from commit cfabe90ecb69a1b4120d37a6879c3bb4772d310c) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Fabian Ebner [Mon, 21 Jun 2021 14:31:39 +0000 (16:31 +0200)]
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>
(cherry picked from commit fffa98eaf05dc944a78a9fa23f9882c6357f9f6c) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Fri, 18 Jun 2021 14:49:22 +0000 (16:49 +0200)]
pve6to7: re-work output of description length check and add passes too
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 33015eb881f65030a1a2a6ebee57c5891edc6c6f) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
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
Thomas Lamprecht [Thu, 10 Jun 2021 07:16:38 +0000 (09:16 +0200)]
ui: TFA: use correct user-id value when creating TOTP QR code
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 2abc47ae590de83c0ff7a4fcc7abfbe5bb061088) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Wed, 26 May 2021 09:01:10 +0000 (11:01 +0200)]
ui: panel/ConfigPanel: return early on no selection
treelist technically allows deselection and this happens on destruction
in extjs 7.0 so simply return early to avoid errors accessing
components that do not exist anymore
remove vmid from data part, it is already contained in object part.
this is accomplished by adding the parameter $excluded to
build_influxdb_payload().
while the function in '.on' and '.un' are identical, they are not the
*same* function, thus the '.un' does not really remove the listener,
and we have leftover references to the grid which means it will never
really garbage-collected
instead, use '.mon' on the grid, which automatically cleans up the
listeners
Thomas Lamprecht [Wed, 19 May 2021 14:51:16 +0000 (16:51 +0200)]
ui: window/Migrate: avoid triggering another info request if already in-progress
use the node as key, so that a target switch would still trigger a
new one - else there's a slight chance that a user could get the
check out-of-sync (from another node).
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>