]> git.proxmox.com Git - pve-manager.git/log
pve-manager.git
2 years agoui: dc: add AuthEditOpenId panel
Dominik Csapak [Thu, 1 Jul 2021 12:25:02 +0000 (14:25 +0200)]
ui: dc: add AuthEditOpenId panel

for adding and editing openid realms, does not support tfa

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: dc/AuthEditBase: only add tfa field on auth modes that support that
Dominik Csapak [Thu, 1 Jul 2021 12:25:01 +0000 (14:25 +0200)]
ui: dc/AuthEditBase: only add tfa field on auth modes that support that

for now that are all, but we will ad one where that is not possible

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: implement OpenId login
Dietmar Maurer [Thu, 24 Jun 2021 08:17:59 +0000 (10:17 +0200)]
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>
2 years agocli: tasks: don't treat warning status as an error status
Fabian Ebner [Fri, 2 Jul 2021 10:35:58 +0000 (12:35 +0200)]
cli: tasks: don't treat warning status as an error status

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agomove BackupInfo module into Cluster
Thomas Lamprecht [Fri, 2 Jul 2021 10:50:47 +0000 (12:50 +0200)]
move BackupInfo module into Cluster

no semantic change regarding API or the like intended

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: backup info: prefer kebab-case
Fabian Ebner [Fri, 2 Jul 2021 09:40:37 +0000 (11:40 +0200)]
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>
2 years agopve6to7: fix description-length warning for guests
Thomas Lamprecht [Fri, 2 Jul 2021 09:49:48 +0000 (11:49 +0200)]
pve6to7: fix description-length warning for guests

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: qemu/HW: reformat comment to better use awailable text-width
Thomas Lamprecht [Fri, 2 Jul 2021 09:46:01 +0000 (11:46 +0200)]
ui: qemu/HW: reformat comment to better use awailable text-width

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: storage selector: code cleanups
Thomas Lamprecht [Fri, 2 Jul 2021 09:45:28 +0000 (11:45 +0200)]
ui: storage selector: code cleanups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopve6to7: drop PASS for Luminous -> Nautilus check
Fabian Grünbichler [Thu, 1 Jul 2021 07:58:57 +0000 (09:58 +0200)]
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>
2 years agopve6to7: reduce number of cluster PASS statements
Fabian Grünbichler [Thu, 1 Jul 2021 07:58:56 +0000 (09:58 +0200)]
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>
2 years agoapi: cluster: add backupinfo to subdirectories
Thomas Lamprecht [Fri, 2 Jul 2021 09:36:21 +0000 (11:36 +0200)]
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>
2 years agoapi: cluster/backupinfo: rework bogus index endpoint
Thomas Lamprecht [Fri, 2 Jul 2021 09:34:32 +0000 (11:34 +0200)]
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>
2 years agoui: node: always show Repositories panel in navigation
Thomas Lamprecht [Thu, 1 Jul 2021 16:40:09 +0000 (18:40 +0200)]
ui: node: always show Repositories panel in navigation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: add panel for listing APT repositories
Fabian Ebner [Wed, 23 Jun 2021 13:39:04 +0000 (15:39 +0200)]
ui: add panel for listing APT repositories

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoapi: apt: add PUT and POST handler for repositories
Fabian Ebner [Wed, 23 Jun 2021 13:39:03 +0000 (15:39 +0200)]
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>
2 years agoapi: apt: add call for repository information
Fabian Ebner [Wed, 23 Jun 2021 13:39:02 +0000 (15:39 +0200)]
api: apt: add call for repository information

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agopve6to7: skip user.cfg if it does not exist
Dominik Csapak [Wed, 30 Jun 2021 13:32:23 +0000 (15:32 +0200)]
pve6to7: skip user.cfg if it does not exist

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agod/postinst: regenerate machine-id also for 4.0 beta ISOs
Thomas Lamprecht [Tue, 29 Jun 2021 15:51:55 +0000 (17:51 +0200)]
d/postinst: regenerate machine-id also for 4.0 beta ISOs

With some poking around I got the hold of more released ISO files,
while beta it seems that we have some loyal installations setup with
a 4.0 beta and updated to 7.0 beta[0] (cool stuff!)

[0]: https://forum.proxmox.com/threads/proxmox-ve-7-0-beta-released.91388/page-3#post-399500

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopve6to7: more fine-grained detection of misconfigured guest volumes
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.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agopve6to7: content check: fix detecting pass
Fabian Ebner [Wed, 30 Jun 2021 09:16:17 +0000 (11:16 +0200)]
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>
2 years agobump version to 7.0-5
Thomas Lamprecht [Mon, 28 Jun 2021 18:00:39 +0000 (20:00 +0200)]
bump version to 7.0-5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoaplinfo: factoring out regex for vztmpl
Lorenz Stechauner [Tue, 22 Jun 2021 09:19:16 +0000 (11:19 +0200)]
aplinfo: factoring out regex for vztmpl

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
2 years agoapi: cluster/resources: add 'name' property to return schema
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>
2 years agoui: node/Config: add vmid filter to task lists
Dominik Csapak [Thu, 24 Jun 2021 07:16:18 +0000 (09:16 +0200)]
ui: node/Config: add vmid filter to task lists

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years ago{qemu, lxc}/Config: adapt to new proxmoxNodeTasks
Dominik Csapak [Thu, 24 Jun 2021 07:16:17 +0000 (09:16 +0200)]
{qemu, lxc}/Config: adapt to new proxmoxNodeTasks

by adding a preFilter and extraFilter

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoapi: tasks: add 'statusfilter' to task list endpoint
Dominik Csapak [Thu, 24 Jun 2021 07:10:13 +0000 (09:10 +0200)]
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>
2 years agoapi: tasks: add 'since' and 'until' filter for the task list
Dominik Csapak [Thu, 24 Jun 2021 07:10:12 +0000 (09:10 +0200)]
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>
2 years agoapi: apt versions: track proxmox-backup-file-restore
Thomas Lamprecht [Fri, 25 Jun 2021 13:32:38 +0000 (15:32 +0200)]
api: apt versions: track proxmox-backup-file-restore

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi/apt: whitespace/indentation cleanup
Thomas Lamprecht [Fri, 25 Jun 2021 12:07:03 +0000 (14:07 +0200)]
api/apt: whitespace/indentation cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.0-4
Thomas Lamprecht [Thu, 24 Jun 2021 06:54:43 +0000 (08:54 +0200)]
bump version to 7.0-4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/postinst: regenerate machine-id also for internal updated hosts
Thomas Lamprecht [Thu, 24 Jun 2021 06:59:34 +0000 (08:59 +0200)]
d/postinst: regenerate machine-id also for internal updated hosts

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agocli tools: correctly handle warnings status
Fabian Ebner [Wed, 12 May 2021 12:32:54 +0000 (14:32 +0200)]
cli tools: correctly handle warnings status

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agocli: pveam: remove unused private sub
Fabian Ebner [Wed, 12 May 2021 12:32:53 +0000 (14:32 +0200)]
cli: pveam: remove unused private sub

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agonodes: startall: correctly handle warning status for delayed task
Fabian Ebner [Wed, 12 May 2021 12:32:52 +0000 (14:32 +0200)]
nodes: startall: correctly handle warning status for delayed task

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agod/control: bump doc-gen b-dep and storage dep versions
Thomas Lamprecht [Wed, 23 Jun 2021 21:02:25 +0000 (23:02 +0200)]
d/control: bump doc-gen b-dep and storage dep versions

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: storages: add basic BTRFS edit/add window
Thomas Lamprecht [Wed, 23 Jun 2021 20:59:29 +0000 (22:59 +0200)]
ui: storages: add basic BTRFS edit/add window

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/postinst: setup pvetest repo for beta
Thomas Lamprecht [Wed, 23 Jun 2021 20:25:09 +0000 (22:25 +0200)]
d/postinst: setup pvetest repo for beta

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoceph: move bullseye repos over to official ones
Thomas Lamprecht [Wed, 23 Jun 2021 18:47:25 +0000 (20:47 +0200)]
ceph: move bullseye repos over to official ones

before it gets forgotten..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: user: show user-removal as dangerous
Thomas Lamprecht [Wed, 23 Jun 2021 09:34:20 +0000 (11:34 +0200)]
ui: user: show user-removal as dangerous

While one can re-add a user quite easily, the ACLs and the old
password may still be lost, so not really just like a simple "undo".

That's why it should show the warning triangle and have no selected
as default.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopostinst: set custom LVM settings
Fabian Grünbichler [Wed, 23 Jun 2021 09:00:25 +0000 (11:00 +0200)]
postinst: set custom LVM settings

now that we no longer ship our own LVM packages, set the relevant
filtering options here if they are missing.

for an upgrade from PVE 6.x, the following two scenarios are likely:

A: user edited config provided by our old lvm2 package. it likely
contains our (or a modified) global_filter, but the old scan_lvs
default. in this case we ignore global_filter as long as it contains our
'don't scan zvols' entry, and set scan_lvs to false.

B: config provided by our old lvm2 package was taken over by default
config from stock lvm2 package. scan_lvs defaults to false already, but
global_filter is unset (scan everything), so we need to set our own
global_filter excluding zvols.

other combinations should be handled fine as well.

for new installs (installer, install on top of Debian Bullseye) we are
always in scenario B.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoapi: services: also track systemd-journald, as syslog is not often there anymore
Thomas Lamprecht [Tue, 22 Jun 2021 16:14:12 +0000 (18:14 +0200)]
api: services: also track systemd-journald, as syslog is not often there anymore

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: services: return more information
Thomas Lamprecht [Tue, 22 Jun 2021 16:12:41 +0000 (18:12 +0200)]
api: services: return more information

we have lots of information already parsed and cached, use that and
give the frontend more to work with/display.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/postinst: fix comment regarding removal time of machine-id fixup
Thomas Lamprecht [Tue, 22 Jun 2021 14:49:57 +0000 (16:49 +0200)]
d/postinst: fix comment regarding removal time of machine-id fixup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopostinst: remove outdated calls
Fabian Grünbichler [Tue, 22 Jun 2021 10:16:57 +0000 (12:16 +0200)]
postinst: remove outdated calls

any system upgrading to 7.x was either installed with >= 6.4 in the
first place, or upgraded to >= 6.4 and thus fixed those issues already.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agod/postinst: handle static machine-id from 4.0 <= x <= 5.4
Thomas Lamprecht [Tue, 22 Jun 2021 10:14:53 +0000 (12:14 +0200)]
d/postinst: handle static machine-id from 4.0 <= x <= 5.4

We could also just check the mtime of the machine-id as heuristic,
but extracting the machine-ids from our ISO archive was pretty
straight forward and avoids special handling for from Debian
installed systems, so use that.

The full map:

pve 4.0-62414ad6-11          -> "2ec24eda629a4c8d8c1f8dac50a9ee5f"
pve 4.1-a64d2990-21          -> "bd94244c0da6419a82a383e62dc03b51"
pve 4.2-95d93422-28          -> "45d4e7046c3d4c26af8acd589f358ac6"
pve 4.3-29d03d47-2           -> "8c445f96b3064ff79f825ea78a3eefde"
pve 4.4-f4006904-1           -> "6f9fae0f0a794fd4b89b3abecfd7f182"
pve 4.4-f4006904-2           -> "6f9fae0f0a794fd4b89b3abecfd7f182"
pve 5.0-786da0da-1           -> "285de85759894b3f9ad9844a89045af6"
pve 5.0-786da0da-2           -> "89971dede7b04c98b2b0bc8845f53320"
pve 5.0-20170505-test        -> "4e3b6e9550f24d638bc26211a7b37df5"
pve 5.0-ad98a36-5            -> "bc2f684e31ee4daf95e45c62410a95b1"
pve 5.0-d136f4ad-3           -> "8cc7bc883fd048b78a4af7433c48e341"
pve 5.0-9795f744-4           -> "9b46d99712854566bb02a656a3ff9191"
pve 5.0-22d7548f-1           -> "e7fc055af47048ee884dcb88a7474336"
pve 5.0-273a9671-1           -> "13d879f75e6447a69ed85179bd93759a"
pve 5.1-2                    -> "5b59e448c3e74029af2ac91f572d68a7"
pve 5.1-3                    -> "5a2bd0d11a6c41f9a33fd527751224ea"
pve 5.1-cfaf62cd-1           -> "516afc72013c4b9da85b309aad987df2"
pve 5.1-test-20171019-1      -> "b0ce8d24684845e8ac337c588a7715cb"
pve 5.1-test-20171218        -> "e0af064c16e9463e9fa980eac66427c1"
pve 5.2-1                    -> "6e925d11b497446e8e7f2ff38e7cf891"
pve 5.3-1                    -> "eec280213051474d8bfe7e089a86744a"
pve 5.3-2                    -> "708ded6ee82a46c08b77fecda2284c6c"
pve 5.3-preview-20181123-1   -> "615cb2b78b2240289fef74da610c146f"
pve 5.4-1                    -> "b965b329a7e246d5be66a8d367f5760d"
pve 6.0-1                    -> "5472a49c6436426fbebd7881f7b7f13b"

The 6.0 one should never trigger as there we had the fix already out,
but it may be that some internal installation missed that and it
doesn't hurt to check, so include it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: dc: backup: fix job detail search
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>
2 years agopve6to7: make content-type check output an actual list
Thomas Lamprecht [Mon, 21 Jun 2021 15:09:43 +0000 (17:09 +0200)]
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>
2 years agopve6to7: check for misconfigured content type 'none'
Fabian Ebner [Mon, 21 Jun 2021 14:31:40 +0000 (16:31 +0200)]
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>
2 years agopve6to7: add check for guest images on misconfigured storages
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>
2 years agoui: notes editor: increase edit window size from 600x400 to 800x600
Thomas Lamprecht [Mon, 21 Jun 2021 14:50:11 +0000 (16:50 +0200)]
ui: notes editor: increase edit window size from 600x400 to 800x600

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: services: whitespace cleanup
Thomas Lamprecht [Mon, 21 Jun 2021 14:28:32 +0000 (16:28 +0200)]
api: services: whitespace cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: services: track chrony
Thomas Lamprecht [Mon, 21 Jun 2021 14:25:46 +0000 (16:25 +0200)]
api: services: track chrony

Keep systemd-timesync for now, old installations may have it around
for a while.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: services: code cleanup
Thomas Lamprecht [Mon, 21 Jun 2021 14:25:27 +0000 (16:25 +0200)]
api: services: code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: add HashAlgorithmSelector
Lorenz Stechauner [Wed, 16 Jun 2021 09:36:02 +0000 (11:36 +0200)]
ui: add HashAlgorithmSelector

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
2 years agoui: user view: rework to slightly more modern & code cleanup
Thomas Lamprecht [Mon, 21 Jun 2021 08:19:44 +0000 (10:19 +0200)]
ui: user view: rework to slightly more modern & code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.0-3
Thomas Lamprecht [Fri, 18 Jun 2021 17:33:59 +0000 (19:33 +0200)]
bump version to 7.0-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: notes view: render node and guest notes as Markdown
Thomas Lamprecht [Fri, 18 Jun 2021 17:24:39 +0000 (19:24 +0200)]
ui: notes view: render node and guest notes as Markdown

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: notes edit: set maxLength on text area
Thomas Lamprecht [Fri, 18 Jun 2021 17:23:13 +0000 (19:23 +0200)]
ui: notes edit: set maxLength on text area

the backend will have actual explicit length limits on the
description properties (was limited indirectly through PUT/POST
request size limit of 64 KiB), so convey that limit also in the GUI.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: notes view: code cleanup/refactoring
Thomas Lamprecht [Fri, 18 Jun 2021 17:22:28 +0000 (19:22 +0200)]
ui: notes view: code cleanup/refactoring

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: nodes: simplify appliance list code
Thomas Lamprecht [Fri, 18 Jun 2021 16:57:30 +0000 (18:57 +0200)]
api: nodes: simplify appliance list code

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: nodes: simplify appliance download code
Thomas Lamprecht [Fri, 18 Jun 2021 16:57:23 +0000 (18:57 +0200)]
api: nodes: simplify appliance download code

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: nodes: fix re-defined rpcenv/user variables regression
Thomas Lamprecht [Fri, 18 Jun 2021 16:40:34 +0000 (18:40 +0200)]
api: nodes: fix re-defined rpcenv/user variables regression

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: nodes: refactor aplinfo to use common download function
Lorenz Stechauner [Wed, 16 Jun 2021 09:36:01 +0000 (11:36 +0200)]
api: nodes: refactor aplinfo to use common download function

a common function to download arbitrary files from urls has been
defined as PVE::Tools::download_file_from_url and is now used.

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
2 years agod/control: bump versioned dependency for libpve-common-perl
Thomas Lamprecht [Fri, 18 Jun 2021 16:35:26 +0000 (18:35 +0200)]
d/control: bump versioned dependency for libpve-common-perl

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix #3470: ui: qemu/CmdMenu: fix confirm message for 'pause' cmd
Dominik Csapak [Wed, 16 Jun 2021 06:01:51 +0000 (08:01 +0200)]
fix #3470: ui: qemu/CmdMenu: fix confirm message for 'pause' cmd

while the command itself is 'suspend', the task description
is 'qmpause', so simply add a parameter and overwrite it for the pause
menu item

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: ceph/Pools: defuse min_size warning
Dominik Csapak [Mon, 7 Jun 2021 10:31:58 +0000 (12:31 +0200)]
ui: ceph/Pools: defuse min_size warning

we should not warn for ceph's built-in default value for min_size as
having the min_size half of the size (rounded up) is ok and even the
default for ceph

Since there seems to be no 'quorum based' pg inconsistency recovery[0],
only a copy from the authoritative osd, there is nothing wrong
with setting that.

0: https://docs.ceph.com/en/latest/rados/operations/pg-repair/

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix #2422: allow multiple Ceph public networks
Alwin Antreich [Mon, 10 May 2021 12:18:26 +0000 (14:18 +0200)]
fix #2422: allow multiple Ceph public networks

Multiple public networks can be defined in the ceph.conf. The networks need to
be routed to each other.

Support handling multiple IPs for a single monitor. By default, one address from
each public network is selected for monitor creation, but, as before, it can be
overwritten with the mon-address parameter, now taking a list of addresses.

On removal, make sure the all addresses are removed from the mon_host entry in
the ceph configuration.

Originally-by: Alwin Antreich <a.antreich@proxmox.com>
[handling of multiple addresses]
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoapi: ceph: mon: fix handling of IPv6 addresses in destroymon
Fabian Ebner [Mon, 10 May 2021 12:18:25 +0000 (14:18 +0200)]
api: ceph: mon: fix handling of IPv6 addresses in destroymon

by also comparing the canonical form to decide when to remove an address. When
getting the IP from the rados information, also drop eventual brackets, so our
existing function can handle it. Add the brackets back within the
remove_addr_from_mon_host function.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoapi: ceph: mon: factor out mon_host regex address removal
Fabian Ebner [Mon, 10 May 2021 12:18:24 +0000 (14:18 +0200)]
api: ceph: mon: factor out mon_host regex address removal

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoapi: ceph: mon: fix handling of IPv6 addresses in assert_mon_prerequisites
Fabian Ebner [Mon, 10 May 2021 12:18:23 +0000 (14:18 +0200)]
api: ceph: mon: fix handling of IPv6 addresses in assert_mon_prerequisites

by comparing their canonical forms.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoapi: ceph: mon: add ips_from_mon_host helper
Fabian Ebner [Mon, 10 May 2021 12:18:22 +0000 (14:18 +0200)]
api: ceph: mon: add ips_from_mon_host helper

Partially based on pve-storage's CephConfig.pm get_monaddr_list, but the
interface is not the best for the use case here.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoapi: ceph: mon: fix handling of IPv6 addresses in find_mon_ip
Fabian Ebner [Mon, 10 May 2021 12:18:21 +0000 (14:18 +0200)]
api: ceph: mon: fix handling of IPv6 addresses in find_mon_ip

by comparing their canonical forms.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoapi: ceph: create mon: explicitly add subsequent monitors to the monmap
Fabian Ebner [Mon, 10 May 2021 12:18:20 +0000 (14:18 +0200)]
api: ceph: create mon: explicitly add subsequent monitors to the monmap

in preparation for supporting multiple addresses. The config section does not
allow more than one public_addr.

Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoapi: ceph: create mon: factor out monmaptool command
Fabian Ebner [Mon, 10 May 2021 12:18:19 +0000 (14:18 +0200)]
api: ceph: create mon: factor out monmaptool command

so it's easier to re-use for a future variant.

Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoapi: ceph: create mon: handle ms_bind_ipv* options more generally
Fabian Ebner [Mon, 10 May 2021 12:18:18 +0000 (14:18 +0200)]
api: ceph: create mon: handle ms_bind_ipv* options more generally

mostly relevant to prepare support for IPv4/IPv6 dual stack mode as a special
case of the planned support for mutliple public networks.

As before, only set the false value when we are dealing with the first address,
but also be explicit about the IPv4 case as the defaults might change in the
future.

Then, when an address of a different type comes along later, set the relevant
bind option to true.

Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoapi: ceph: mon: split up arguments for run_command
Fabian Ebner [Mon, 10 May 2021 12:18:17 +0000 (14:18 +0200)]
api: ceph: mon: split up arguments for run_command

no functional change is intended.

Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: dc/ACLView: make the window wider
Dominik Csapak [Thu, 17 Jun 2021 13:32:03 +0000 (15:32 +0200)]
ui: dc/ACLView: make the window wider

to accomodate the longer acl paths better

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: data/PermPathStore: add missing basic acl paths to acl selector
Dominik Csapak [Thu, 17 Jun 2021 13:32:00 +0000 (15:32 +0200)]
ui: data/PermPathStore: add missing basic acl paths to acl selector

those two static acl paths were missing in the selector

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agopve6to7: re-work output of description length check and add passes too
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>
2 years agopve6to7: add check for guest and node description length
Lorenz Stechauner [Fri, 18 Jun 2021 13:34:23 +0000 (15:34 +0200)]
pve6to7: add check for guest and node description length

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
2 years agovdzump: whitespace/extra-lines clean up
Thomas Lamprecht [Fri, 18 Jun 2021 12:35:25 +0000 (14:35 +0200)]
vdzump: whitespace/extra-lines clean up

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopve6to7: bump free space requirement to 4 GiB
Thomas Lamprecht [Fri, 18 Jun 2021 12:27:00 +0000 (14:27 +0200)]
pve6to7: bump free space requirement to 4 GiB

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: fix Guest Summary Notes height
Dominik Csapak [Fri, 18 Jun 2021 11:34:09 +0000 (13:34 +0200)]
ui: fix Guest Summary Notes height

fixes 'infinite' height of the guest notes, by setting the height on the
container a level up

the notes view itself is already scrollable, so if it is too large,
there'll be a scrollbar

this does not change anything for templates, as there we show nothing
under the notes and thus there the infinite height is ok

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agovzdump: log the count of backups we pruned#
Thomas Lamprecht [Fri, 18 Jun 2021 11:31:27 +0000 (13:31 +0200)]
vzdump: log the count of backups we pruned#

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agovzdump: make log for stop-mode guest-type agnostic
Thomas Lamprecht [Fri, 18 Jun 2021 11:24:47 +0000 (13:24 +0200)]
vzdump: make log for stop-mode guest-type agnostic

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agonode config: limit description/comment length to 64 KiB
Thomas Lamprecht [Fri, 18 Jun 2021 11:13:24 +0000 (13:13 +0200)]
node config: limit description/comment length to 64 KiB

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopve6to7: use file_get_contents
Fabian Grünbichler [Fri, 18 Jun 2021 08:57:10 +0000 (10:57 +0200)]
pve6to7: use file_get_contents

instead of File::Slurp

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agopve6to7: improve user.cfg parser
Fabian Grünbichler [Fri, 18 Jun 2021 08:52:32 +0000 (10:52 +0200)]
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>
2 years agopve6to7: add check for pool permissions
Lorenz Stechauner [Thu, 17 Jun 2021 08:39:18 +0000 (10:39 +0200)]
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>
2 years agovdzump: log with what retention settings we prune
Thomas Lamprecht [Thu, 17 Jun 2021 15:55:50 +0000 (17:55 +0200)]
vdzump: log with what retention settings we prune

may not be obvious from the task log alone if we're relying on the
retention setting configured on a storage or the ones from local
node's vzdump.conf

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: backup prune: add label for storage prune settings
Thomas Lamprecht [Thu, 17 Jun 2021 15:44:32 +0000 (17:44 +0200)]
ui: backup prune: add label for storage prune settings

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: backup window: also reset removal fields when defaults API call fails
Fabian Ebner [Fri, 7 May 2021 06:56:52 +0000 (08:56 +0200)]
ui: backup window: also reset removal fields when defaults API call fails

to avoid showing settings for the wrong storage.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agofix #2745: ui: backup window: allow specifying remove parameter for manual backup
Fabian Ebner [Thu, 6 May 2021 12:16:32 +0000 (14:16 +0200)]
fix #2745: ui: backup window: allow specifying remove parameter for manual backup

and also show the retention options that will be used for a given storage. A
user with Datastore.AllocateSpace and VM.Backup can already remove backups from
the GUI manually, so it shouldn't be a problem if they can set the remove flag
when starting a manual backup in the GUI.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: backup window: switch to two-column layout
Fabian Ebner [Thu, 6 May 2021 12:16:31 +0000 (14:16 +0200)]
ui: backup window: switch to two-column layout

in preparation to add more items in the future, e.g. removal settings, note
container.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: backup window: switch to proxmox input panel
Fabian Ebner [Thu, 6 May 2021 12:16:30 +0000 (14:16 +0200)]
ui: backup window: switch to proxmox input panel

It's not an Ext.form.Panel, so there is no fieldDefaults.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: backup window: set loading mask early enough
Fabian Ebner [Thu, 6 May 2021 12:16:29 +0000 (14:16 +0200)]
ui: backup window: set loading mask early enough

but not too early. Because of an ExtJS bug/limitation, it can only happen after
the window is rendered, so use an afterrender listener. Without setting the
mask there, the window will be active already before the storage selectors
change listener triggers, which can only happen after the storage selectors
store is loaded.

Made noticable by the new "filling in defaults" behavior, but the issue was
already present earlier, where the compression selector for PBS storages would
be disabled late, after the window was already active.

Also move the setValue call into the afterrender listener, so ordering is easy
to verify/more stable.

Reported-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: backup window: also set initialDefaults variable in failure case
Fabian Ebner [Thu, 6 May 2021 12:16:28 +0000 (14:16 +0200)]
ui: backup window: also set initialDefaults variable in failure case

so that mailto and mode are not overwritten if the first /vzdump/defaults call
failed, but a later one succeeds.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: backup window: avoid issuing API call with null/empty parameter
Fabian Ebner [Thu, 6 May 2021 12:16:27 +0000 (14:16 +0200)]
ui: backup window: avoid issuing API call with null/empty parameter

could be triggered when there are no backup storages at all configured or if
the 'Backup now' button is clicked before the storage selector from the guests
'Backup' tab could load its store.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: parser: make comment single-line
Thomas Lamprecht [Thu, 17 Jun 2021 14:29:00 +0000 (16:29 +0200)]
ui: parser: make comment single-line

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>