Commit Graph

1724 Commits

Author SHA1 Message Date
Fabian Ebner
77c7945123 vzdump: include current backup when pruning dumpdir
Not doing so leads to an off-by-one error, and pruning in a dumpdir
really should behave the same way as pruning in a storage.

Reported in the community forum:
https://forum.proxmox.com/threads/problem-mit-prune-backups.95737/

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-09-08 12:58:53 +02:00
Dylan Whyte
e95aae29ac Add/fix option descriptions in pvenode api docs
Adds some missing descriptions to the api/man page documentation, for
certain options of the `pvenode` command. Some minor language fix-ups
are also included

Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
2021-08-31 17:02:29 +02:00
Oguz Bektas
dfc62e829c vzdump: allow backups from plugins
remove type check for the specific plugins, instead we can deduce it
from the supported content type in config (this can only be set on
storages that declare to support backups). should also work with
external storage plugins.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2021-07-30 17:08:58 +02:00
Dominik Csapak
dcdbc23259 Status/InfluxDB: add 'verify-certificate' option to disable ssl verification
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-29 10:28:36 +02:00
Thomas Lamprecht
560bdfd846 api: network apply: fix check for ifupdown2 origin
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-15 14:30:52 +02:00
Thomas Lamprecht
ad7dd5a91f api: services: propagate "uninstalled" state for units
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-13 18:48:30 +02:00
Thomas Lamprecht
4ec19e8487 api: services: improve state detection for one-shot units
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-13 18:47:05 +02:00
Dominik Csapak
7195dcd37a API: Tasks: add more fields to return schema
so that they are documented and get displayed by pvesh/pvenode
all those fields must exists (since they come from the upid)
aside from the exitstatus, so marking that as optional

forum user reported that they are missing:
https://forum.proxmox.com/threads/ergebnis-eines-tasks-per-api-abfragen.92267/

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-13 06:36:33 +02: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
Dominik Csapak
e8300c39df fix #3490: show more pci devices by default
we filtered out devices which belong into the 'Generic System Peripheral'
category, but this can contain actual useful pci devices
users want to pass through, so simply do not filter it by default.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-07 18:37:07 +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
13856b9590 aplinfo: switch over to new index
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-06 12:32: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
Fabian Ebner
08e22c1eac pveceph: also install nvme-cli
The nvme-cli package is recommended by (our) Ceph packages, but here
--no-install-recommends is used to avoid pulling in too much.

The issue with not installing nvme-cli is that a "security
information" mail notification is triggered by sudo each time Ceph
tries to get the device health metrics. While there is a sudoers
rule for /usr/sbin/nvme, Ceph uses 'sudo nvme ...', so it does not
apply when the package is not installed.

This didn't seem to happen with sudo in buster.

It's about 1 MiB of additional packages (nvme-cli + uuid-runtime).

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-05 12:05:13 +02:00
Lorenz Stechauner
17711ff849 api: nodes: add query_url_metadata method
metadata is gained using a HEAD request.

Due to the ability of this api endpoint to request files on internal
networks (which would not be visible/accessible from outside) it is
restricted to users with permissions `Sys.Audit` and `Sys.Modify` on
`/`. Users with these permissions are able to alter node (network)
config anyway, so this should not create any further security risk.

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Reviewed-By: Dominik Csapak <d.csapak@proxmox.com>
2021-07-03 00:36:20 +02:00
Dietmar Maurer
3dd99bab1f ui: implement OpenId login
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
 [ Thomas: amended the following changes:
 - factor out openid_login_param to widget-toolkit as
   getOpenIDRedirectionAuthorization and use it
 - use camel case to match our JS style guide and our framework (and
   basically the rest of the JS world)
 - minor cleanups like moving variable definition into the single if
   branch their used
 ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 14:09:30 +02:00
Fabian Ebner
d2aae44882 cli: tasks: don't treat warning status as an error status
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-02 12:52:08 +02:00
Thomas Lamprecht
df6f4b1874 move BackupInfo module into Cluster
no semantic change regarding API or the like intended

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 12:50:49 +02:00
Fabian Ebner
1a2e0e235e api: backup info: prefer kebab-case
And also add the 'backup-info' endpoint to the index.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 12:03:03 +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
Thomas Lamprecht
1bde7cd8df api: cluster: add backupinfo to subdirectories
to make it actually show up in auto-completion and some docs..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 11:36:26 +02:00
Thomas Lamprecht
db11051374 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>
2021-07-02 11:34:34 +02:00
Fabian Ebner
7e33f74b22 api: apt: add PUT and POST handler for repositories
To allow adding/modifying them. Currently the only possible modification is
enable/disable.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-30 21:03:38 +02:00
Fabian Ebner
9005e0dfe1 api: apt: add call for repository information
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-30 21:03:09 +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
Lorenz Stechauner
81579be0ac aplinfo: factoring out regex for vztmpl
Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
2021-06-28 19:16:03 +02:00
Hannes Laimer
c5f7b4b34f 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>
2021-06-28 17:59:53 +02:00
Dominik Csapak
acf8a27172 api: tasks: add 'statusfilter' to task list endpoint
Similar to PBS. The 'errors' filter parameter still takes precedence
(overrides this)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ Thomas: adapt to renamed PVE::Tools helper method ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-28 17:51:25 +02:00
Dominik Csapak
97e749ad3c api: tasks: add 'since' and 'until' filter for the task list
similar to PBS

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-28 17:17:43 +02:00
Thomas Lamprecht
2cc7120e1b api: apt versions: track proxmox-backup-file-restore
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-25 15:32:38 +02:00
Thomas Lamprecht
89e4fc8cc7 api/apt: whitespace/indentation cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-25 14:07:03 +02:00
Fabian Ebner
4bb46baab5 cli tools: correctly handle warnings status
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-24 08:50:38 +02:00