Commit Graph

5742 Commits

Author SHA1 Message Date
Thomas Lamprecht
aee25c2ed1 api: nodes: simplify appliance download code
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-18 18:57:23 +02:00
Thomas Lamprecht
c3020cf230 api: nodes: fix re-defined rpcenv/user variables regression
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-18 18:40:34 +02:00
Lorenz Stechauner
fac5d57e5b 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>
2021-06-18 18:36:06 +02:00
Thomas Lamprecht
337f7f9eeb d/control: bump versioned dependency for libpve-common-perl
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-18 18:35:26 +02:00
Dominik Csapak
b235a53821 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>
2021-06-18 17:21:52 +02:00
Dominik Csapak
7748b41fa1 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>
2021-06-18 17:18:02 +02:00
Alwin Antreich
0b6a283801 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>
2021-06-18 17:13:05 +02:00
Fabian Ebner
815325da0d 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>
2021-06-18 17:13:05 +02:00
Fabian Ebner
3e10f0fcdb api: ceph: mon: factor out mon_host regex address removal
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-18 17:13:04 +02:00
Fabian Ebner
9e989449ae 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>
2021-06-18 17:13:04 +02:00
Fabian Ebner
4be756f59c 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>
2021-06-18 17:13:04 +02:00
Fabian Ebner
396acb1577 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>
2021-06-18 17:13:04 +02:00
Fabian Ebner
8ecaa0bfbe 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>
2021-06-18 17:13:04 +02:00
Fabian Ebner
57951fc78b 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>
2021-06-18 17:13:04 +02:00
Fabian Ebner
d3b899c144 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>
2021-06-18 17:13:04 +02:00
Fabian Ebner
6e96b07078 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>
2021-06-18 17:13:04 +02:00
Dominik Csapak
aa16ebbb97 ui: dc/ACLView: make the window wider
to accomodate the longer acl paths better

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-06-18 17:06:29 +02:00
Dominik Csapak
80e364cc24 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>
2021-06-18 17:06:29 +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
ff119724ee vdzump: whitespace/extra-lines clean up
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-18 14:35:25 +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
Dominik Csapak
164a86abd5 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>
2021-06-18 13:37:07 +02:00
Thomas Lamprecht
b4546c7ec2 vzdump: log the count of backups we pruned#
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-18 13:31:27 +02:00
Thomas Lamprecht
4922b7a91c vzdump: make log for stop-mode guest-type agnostic
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-18 13:24:47 +02:00
Thomas Lamprecht
e466f896d5 node config: limit description/comment length to 64 KiB
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-18 13:14:34 +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
Thomas Lamprecht
ca155141b0 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>
2021-06-17 17:55:54 +02:00
Thomas Lamprecht
f2e174dacc ui: backup prune: add label for storage prune settings
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-17 17:44:32 +02:00
Fabian Ebner
01a69af40f 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>
2021-06-17 16:29:19 +02:00
Fabian Ebner
170f8fb4e4 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>
2021-06-17 16:29:19 +02:00
Fabian Ebner
0b240dbf6a 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>
2021-06-17 16:29:19 +02:00
Fabian Ebner
bef57f5c65 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>
2021-06-17 16:29:19 +02:00
Fabian Ebner
5ad3fbfad9 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>
2021-06-17 16:29:19 +02:00
Fabian Ebner
b0d716e4eb 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>
2021-06-17 16:29:19 +02:00
Fabian Ebner
6d52223bac 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>
2021-06-17 16:29:19 +02:00
Thomas Lamprecht
b85ef5ab61 ui: parser: make comment single-line
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-17 16:29:00 +02:00
Thomas Lamprecht
0e68b116f3 api: nodes: fix typo
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-17 16:27:55 +02:00
Fabian Ebner
c4aa56eb38 ui: storage: update hint about prune-backups default
and also remove the keepLastEmptyText, which too suggested the old default.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-16 13:28:54 +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
2c55daab85 ui: eslint fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-16 11:22:45 +02:00
Thomas Lamprecht
2e061d8110 ui: ceph: select Pacific as default release
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-15 13:07:35 +02:00
Thomas Lamprecht
4d1bb8e50f add beta text with link to bugtracker 2021-06-15 12:28:41 +02:00
Thomas Lamprecht
260ac8cdb3 ui: TFA: use correct user-id value when creating TOTP QR code
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-10 09:16:50 +02:00
Fabian Ebner
6f0594f442 cli: pveceph: remove outdated comment
Already removed by commit 00fa70bfd9.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-09 11:29:34 +02:00
Fabian Ebner
596bb7b11a api: ceph: osd: create: rename size parameters
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-09 11:29:34 +02:00