]> git.proxmox.com Git - pve-manager.git/log
pve-manager.git
3 years agovzdump: avoid bareword file handles and two argument open
Thomas Lamprecht [Thu, 25 Feb 2021 18:17:40 +0000 (19:17 +0100)]
vzdump: avoid bareword file handles and two argument open

reported by perlcritic. The bareword file handles will be depreacated
in the future in perl, so start replacing now..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agovzdump: PBS: make task log upload error non-fatal
Thomas Lamprecht [Thu, 25 Feb 2021 12:59:42 +0000 (13:59 +0100)]
vzdump: PBS: make task log upload error non-fatal

We want to continue in that case, this is not really essential so
only warn about it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: firewall grid: try balance between flex and good overview
Thomas Lamprecht [Mon, 22 Feb 2021 13:30:53 +0000 (14:30 +0100)]
ui: firewall grid: try balance between flex and good overview

Recently, with the Proxmox Backup sync/verify/.. job grids I had to
change my mind regarding use of flex, overuse of it is as bad as
having all to fixed widths as it spreads out the data a lot on big
screens, making it hard to follow as lots of eye movement is
required.

What we ideally would have is a "maxFlexWidth", i.e., a maximal
auto-flex width which still allows wider columns if a user manually
drags it wider. "maxWidth" comes close, but is a hard limit and so
use it only in cases where its quite clear that wider columns make no
sense (surely someone will disagree even for those, but well...).

Basic solution is to add lots more flex ratio to comment so that the
others won't get to big fast, keeping the actual relevant config of a
rule somewhat close by (thus easier to read/grasp/parse)

Also move the source/destination port columns after their direction
column and abbreviate their header title.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: firewall grid: rename Enable column to shorter On
Thomas Lamprecht [Mon, 22 Feb 2021 13:30:08 +0000 (14:30 +0100)]
ui: firewall grid: rename Enable column to shorter On

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: firewall grid: fix rendering comment, only show tooltip when truncated
Thomas Lamprecht [Mon, 22 Feb 2021 13:28:35 +0000 (14:28 +0100)]
ui: firewall grid: fix rendering comment, only show tooltip when truncated

avoid showing "undefined" if there's no comment, renderer must not
return null or undefined directly, it will converted to string as is,
so always fallback to '' empty string

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: FirewallRules: Add tooltip to comments
Aaron Lauterer [Mon, 22 Feb 2021 10:16:26 +0000 (11:16 +0100)]
ui: FirewallRules: Add tooltip to comments

The comment columns might not be wide enough for longer comments. Since
it is the most right columns, it can be tricky to grab the right pixel
to drag it wider.

A tooltip that shows up on hover should be okay.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
3 years agoui: FirewallRules: make columns flexible
Aaron Lauterer [Mon, 22 Feb 2021 10:16:25 +0000 (11:16 +0100)]
ui: FirewallRules: make columns flexible

Changing the width definitions to use flex will make better use on
larger monitors. Changing the `width` parameter to `minWidth` ensures
that on smaller screens it is still usable, though some horizontal
scrolling might be necessary.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
3 years agod/control: bump versioned depdnency on guest commnon library
Thomas Lamprecht [Fri, 19 Feb 2021 17:16:19 +0000 (18:16 +0100)]
d/control: bump versioned depdnency on guest commnon library

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 6.3-4
Thomas Lamprecht [Fri, 19 Feb 2021 16:53:36 +0000 (17:53 +0100)]
bump version to 6.3-4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: qemu/HardwareView: fix CDRom permission checkss
Aaron Lauterer [Fri, 12 Feb 2021 15:57:51 +0000 (16:57 +0100)]
ui: qemu/HardwareView: fix CDRom permission checkss

There are several types of drives that use the same config keys. Most
notably CDRom and regular VM disks (EFI and cloudinit exist as well).

Since there is a dedicated permission for CDRom drives we need to check
permissions in more detail, depending on what type of drive it actually
is for things like the edit, remove and Add -> CDRom buttons.

The permission check in the row definition itself which only checked for
'VM.Config.Disk' permissions (never_delete) had to be removed and finer
grained checks added for the individual buttons. This also meant a bit
of reshuffling in the checks what kind of disk the current one is.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: vm/hardware: cleanup and constify variables
Thomas Lamprecht [Fri, 19 Feb 2021 16:22:24 +0000 (17:22 +0100)]
ui: vm/hardware: cleanup and constify variables

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: qemu/HardwareView: eslint: enforce "no-shadow" rule
Aaron Lauterer [Fri, 12 Feb 2021 15:57:49 +0000 (16:57 +0100)]
ui: qemu/HardwareView: eslint: enforce "no-shadow" rule

By removing global vars 'i' and 'confid' and declaring them with let in the needed
context.

'i' wasn't necessary but had to be touched anyway.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
3 years agoui: qemu/HardwareView: eslint: enforce "no-useless-concat" rule
Aaron Lauterer [Fri, 12 Feb 2021 15:57:48 +0000 (16:57 +0100)]
ui: qemu/HardwareView: eslint: enforce "no-useless-concat" rule

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
3 years agoui: vm/hardware: adapt maxlen fix
Thomas Lamprecht [Fri, 19 Feb 2021 15:45:06 +0000 (16:45 +0100)]
ui: vm/hardware: adapt maxlen fix

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: qemu/HardwareView: eslint: enforce "max-len" rule
Aaron Lauterer [Fri, 12 Feb 2021 15:57:47 +0000 (16:57 +0100)]
ui: qemu/HardwareView: eslint: enforce "max-len" rule

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
3 years agoui: dc/TokenEdit: fix editing existing tokens
Dominik Csapak [Fri, 12 Feb 2021 15:01:15 +0000 (16:01 +0100)]
ui: dc/TokenEdit: fix editing existing tokens

we always have to calculate the url correctly, not only on creation
otherwise we try to edit the token by doing a 'PUT' request on
/access/users
and not on
/access/users/USERID/token/TOKENID

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: window/Settings: fix labelWidth for saved user name
Dominik Csapak [Fri, 19 Feb 2021 14:27:00 +0000 (15:27 +0100)]
ui: window/Settings: fix labelWidth for saved user name

Somewhere during rendering of the window, extjs wants to add 5px to
the labelwidth for the surrounding container. Having a string here
results in the container having a width of 1505px instead of 155px and
the value of the field is far off to the right and not visible.

Changing to a number fixes that.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agotest: vzdump: rename vzdump_new_retention_test.pl to vzdump_new_test.pl
Fabian Ebner [Mon, 15 Feb 2021 12:25:02 +0000 (13:25 +0100)]
test: vzdump: rename vzdump_new_retention_test.pl to vzdump_new_test.pl

as it now also includes tests for new() with non-retention options.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Reviewed-By: Dominik Csapak <d.csapak@proxmox.com>
3 years agotest: vzdump: add tests for mailto
Fabian Ebner [Mon, 15 Feb 2021 12:25:01 +0000 (13:25 +0100)]
test: vzdump: add tests for mailto

Re-use the existing code, by allowing special kinds of 'tests' that just set
the options that are tested for.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Reviewed-By: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agovzdump: refactor parsing mailto so it can be mocked
Fabian Ebner [Mon, 15 Feb 2021 12:25:00 +0000 (13:25 +0100)]
vzdump: refactor parsing mailto so it can be mocked

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Reviewed-By: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: snapshot: show task viewer for progress log
Stefan Reiter [Mon, 8 Feb 2021 11:15:12 +0000 (12:15 +0100)]
ui: snapshot: show task viewer for progress log

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agod/control: bump versioned dependency for libpve-storage-perl
Thomas Lamprecht [Tue, 9 Feb 2021 12:39:16 +0000 (13:39 +0100)]
d/control: bump versioned dependency for libpve-storage-perl

to ensure the diskmanage list disk API supports the
"include-partitions" parameter

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: disk list: include partitions
Fabian Ebner [Mon, 8 Feb 2021 14:23:29 +0000 (15:23 +0100)]
ui: disk list: include partitions

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agofixes #3066: resourcestore: add vm hostcpu/hostmem fields
Alexandre Derumier [Fri, 23 Oct 2020 14:50:50 +0000 (16:50 +0200)]
fixes #3066: resourcestore: add vm hostcpu/hostmem fields

This add new fields with cpu/mem percent usage of vms,
relative to host maxcpu/maxmem.

Currently, we can't sort easily most consumming vm on a host.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
3 years agoceph: add get api call for single pool
Alwin Antreich [Tue, 12 Jan 2021 10:21:47 +0000 (11:21 +0100)]
ceph: add get api call for single pool

Information of a single pool can be queried.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
3 years agoceph: add titles to ceph_pool_common_options
Alwin Antreich [Tue, 12 Jan 2021 10:21:46 +0000 (11:21 +0100)]
ceph: add titles to ceph_pool_common_options

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
3 years agoceph: setpool, use parameter extraction instead
Alwin Antreich [Tue, 12 Jan 2021 10:21:45 +0000 (11:21 +0100)]
ceph: setpool, use parameter extraction instead

of the unneeded ref copy for params.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
3 years agoapi: ceph: subclass pools
Alwin Antreich [Tue, 12 Jan 2021 10:21:44 +0000 (11:21 +0100)]
api: ceph: subclass pools

for better handling and since the pool endpoints got more entries.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
3 years agoapi: Ceph: add reminder to remove 'disks' call
Fabian Ebner [Tue, 26 Jan 2021 11:45:28 +0000 (12:45 +0100)]
api: Ceph: add reminder to remove 'disks' call

This API call is the predecessor of /nodes/{node}/disks/list, which has seen a
few more improvements. The latter API call should be used instead, and the web
UI already does so.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoui: qemu/HardwareView: check EFI Disk button permissions
Aaron Lauterer [Mon, 1 Feb 2021 14:21:30 +0000 (15:21 +0100)]
ui: qemu/HardwareView: check EFI Disk button permissions

Make sure that the `Add EFI Disk` button is disabled if the user does
not have the needed permissions.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
3 years agoui: qemu/HardwareView: change heuristic perms to const
Aaron Lauterer [Mon, 1 Feb 2021 14:21:29 +0000 (15:21 +0100)]
ui: qemu/HardwareView: change heuristic perms to const

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
3 years agoui: qemu/HardwareView: eslint: enforce "no-mixed-operators" rule
Aaron Lauterer [Mon, 1 Feb 2021 14:21:25 +0000 (15:21 +0100)]
ui: qemu/HardwareView: eslint: enforce "no-mixed-operators" rule

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
3 years agoui: dc/MetricServerView: add onlineHelp to edit windows
Dominik Csapak [Wed, 2 Dec 2020 09:21:12 +0000 (10:21 +0100)]
ui: dc/MetricServerView: add onlineHelp to edit windows

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: add necessary fields for influxdb http api
Dominik Csapak [Wed, 2 Dec 2020 09:21:11 +0000 (10:21 +0100)]
ui: add necessary fields for influxdb http api

and en/disable them accordingly to the selected mode

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agostatus/influxdb: remove unnecessary comment
Dominik Csapak [Wed, 2 Dec 2020 09:21:10 +0000 (10:21 +0100)]
status/influxdb: remove unnecessary comment

we already have that information in the reference docs, no need to
have it here as well

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agostatus/influxdb: implement influxdb 2.x http api
Dominik Csapak [Wed, 2 Dec 2020 09:21:09 +0000 (10:21 +0100)]
status/influxdb: implement influxdb 2.x http api

needs an organization/bucket (previously db) and an optional token
the http client does not fit exactly in the connect/send/disconnect
scheme, so it simply creates a request in 'connect',
does the actual http connection in 'send' and nothing in 'disconnect'

max-body-size is set to 25.000.000 bytes by default (the influxdb default)
and the timeout to 1 second (same as default graphite tcp timeout)

the token (if given) gets saved in /etc/pve/priv/metricserver/$ID.pw
it is optional, because the 1.8.x compatibility api does not need
authentication (in contrast to influxdb 2.x)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agostatus/plugin: extend with add/update/delete hooks
Dominik Csapak [Wed, 2 Dec 2020 09:21:08 +0000 (10:21 +0100)]
status/plugin: extend with add/update/delete hooks

like we do in it for the storage section configs

we will need this to store the token for influxdbs http api

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agostatus/plugin: extend send/_connect/_disconnect/test_connection
Dominik Csapak [Wed, 2 Dec 2020 09:21:07 +0000 (10:21 +0100)]
status/plugin: extend send/_connect/_disconnect/test_connection

by providing the id or cfg to have better context in those methods
we will need that for influxdb http api

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi: cluster/metricserver: prevent simultaneosly setting and deleting of property
Dominik Csapak [Wed, 2 Dec 2020 09:21:06 +0000 (10:21 +0100)]
api: cluster/metricserver: prevent simultaneosly setting and deleting of property

like we do in other apis of section configs (e.g. storage)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agopvereport: also add .sources files
Fabian Ebner [Wed, 27 Jan 2021 10:43:20 +0000 (11:43 +0100)]
pvereport: also add .sources files

while this format is probably not much in use currently, the plan is to make it
the default format in Debian, see 'man 5 sources.list'.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agovzdump: avoid parsing already parsed option
Fabian Ebner [Fri, 15 Jan 2021 12:49:05 +0000 (13:49 +0100)]
vzdump: avoid parsing already parsed option

When a job is updated, verify_vzdump_parameters() is called twice. This led to
parse_property_string being called with the already parsed option.

Reported on the pve-user mailing list:
https://lists.proxmox.com/pipermail/pve-user/2021-January/172258.html

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agopvereport: add apt sources
Stoiko Ivanov [Tue, 26 Jan 2021 17:31:38 +0000 (18:31 +0100)]
pvereport: add apt sources

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
3 years agoui: ceph: fix keeping selection after operation
Fabian Ebner [Tue, 26 Jan 2021 13:01:12 +0000 (14:01 +0100)]
ui: ceph: fix keeping selection after operation

Found by having the console open and getting a message that 'me' (the
controller) does not have a method getRootNode()

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoui: eslint: some more trailing comma fixes
Thomas Lamprecht [Tue, 19 Jan 2021 16:48:50 +0000 (17:48 +0100)]
ui: eslint: some more trailing comma fixes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: eslint: enforce "dot-notation" rule
Thomas Lamprecht [Tue, 19 Jan 2021 16:45:01 +0000 (17:45 +0100)]
ui: eslint: enforce "dot-notation" rule

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: eslint: enforce "no-extra-boolean-cast" rule
Thomas Lamprecht [Tue, 19 Jan 2021 16:43:40 +0000 (17:43 +0100)]
ui: eslint: enforce "no-extra-boolean-cast" rule

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: eslint: enforce "no-extra-parens" rule
Thomas Lamprecht [Tue, 19 Jan 2021 16:42:36 +0000 (17:42 +0100)]
ui: eslint: enforce "no-extra-parens" rule

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: eslint: enforce "no-unneeded-ternary" rule
Thomas Lamprecht [Tue, 19 Jan 2021 16:41:11 +0000 (17:41 +0100)]
ui: eslint: enforce "no-unneeded-ternary" rule

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: eslint: fix various spacing related issues
Thomas Lamprecht [Tue, 19 Jan 2021 16:39:15 +0000 (17:39 +0100)]
ui: eslint: fix various spacing related issues

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: eslint: fix trailing comma and comma related whitespaces errors
Thomas Lamprecht [Tue, 19 Jan 2021 16:31:03 +0000 (17:31 +0100)]
ui: eslint: fix trailing comma and comma related whitespaces errors

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: eslint: fix trailing spaces
Thomas Lamprecht [Tue, 19 Jan 2021 16:29:55 +0000 (17:29 +0100)]
ui: eslint: fix trailing spaces

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: tfa/totp: fix setting issuer in secret URL
Thomas Lamprecht [Mon, 18 Jan 2021 15:29:51 +0000 (16:29 +0100)]
ui: tfa/totp: fix setting issuer in secret URL

it's recommended to set the issuer for both, the get parameter and
the initial issuer label prefix[0].

[0]:
https://github.com/google/google-authenticator/wiki/Key-Uri-Format#label

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: qemu/audio: improve displayed text for backend drivers
Thomas Lamprecht [Tue, 12 Jan 2021 12:09:33 +0000 (13:09 +0100)]
ui: qemu/audio: improve displayed text for backend drivers

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: qemu/audio: submitValue is default true for combobox
Thomas Lamprecht [Tue, 12 Jan 2021 12:08:02 +0000 (13:08 +0100)]
ui: qemu/audio: submitValue is default true for combobox

this was previously a display field, where submitValue defaults to
false, so we required to enable it explicitly. As it changed to a
combo box we can drop that.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: qemu: add the none audio driver as an option
Gilles Pietri [Thu, 7 Jan 2021 17:02:44 +0000 (18:02 +0100)]
ui: qemu: add the none audio driver as an option

Signed-off-by: Gilles Pietri <contact+dev@gilouweb.com>
3 years agoui: add netdevice: fix #3203: Use OS default model
Dominic Jäger [Thu, 7 Jan 2021 10:04:38 +0000 (11:04 +0100)]
ui: add netdevice: fix #3203: Use OS default model

In the VM create wizard we automatically set e1000 for Windows and virtio for
Linux.  We should also do this when adding a network device in the hardware
view.

OSDefaults.generic.networkCard (=e1000) is always available.  Hence, leave this
as default value for the field and then try to get the ostype via API and
overwrite the default e1000.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
3 years agoui: acme: Remove false gettexts
Dominic Jäger [Thu, 7 Jan 2021 08:32:13 +0000 (09:32 +0100)]
ui: acme: Remove false gettexts

Translating these is not useful; e.g. API would be translated to API in German.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
3 years agoreport: fix separation of commands over multiple lines
Thomas Lamprecht [Mon, 21 Dec 2020 16:00:46 +0000 (17:00 +0100)]
report: fix separation of commands over multiple lines

once we get over the allowed line length we must move each atom
(e.g., argument or other value) to a separate line, not pairing a
few.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agopvereport: code cleanup, line length
Aaron Lauterer [Mon, 21 Dec 2020 15:13:51 +0000 (16:13 +0100)]
pvereport: code cleanup, line length

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
3 years agopvereport: rework report contents
Aaron Lauterer [Mon, 21 Dec 2020 15:13:50 +0000 (16:13 +0100)]
pvereport: rework report contents

add:
* HA status
* ceph osd df tree
* ceph conf file and conf db
* ceph versions

removed:
* ceph status, as pveceph status is now printing the same information

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
3 years agopvereport: fix multipath inclusion
Aaron Lauterer [Mon, 21 Dec 2020 15:13:49 +0000 (16:13 +0100)]
pvereport: fix multipath inclusion

we now push it to the correct hash if it is installed

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
3 years agovzdump: fix error format for errors coming from storage_info
Fabian Ebner [Mon, 21 Dec 2020 13:48:18 +0000 (14:48 +0100)]
vzdump: fix error format for errors coming from storage_info

Errors from storage_info() are newline-terminated, because perl would append
the line number otherwise. Chomp those errors, because sendmail() relies
on the presence of a newline to decide if it's multiple problems or only one.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agovzdump: sendmail: fix html by closing the tags
Fabian Ebner [Mon, 21 Dec 2020 13:48:17 +0000 (14:48 +0100)]
vzdump: sendmail: fix html by closing the tags

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agovzdump: defaults: convert to prune-backups early enough
Fabian Ebner [Mon, 21 Dec 2020 13:48:16 +0000 (14:48 +0100)]
vzdump: defaults: convert to prune-backups early enough

Fixes the case where reading from /etc/vzdump.conf fails.

Also convert the options read from /etc/vzdump.conf before the loop. That
avoids showing a wrong warning when 'prune-backups' is configured in
/etc/vzdump.conf, and maxfiles isn't. Previously, because 'maxfiles' from the
schema defaults was automatically set, the call to parse_prune_backups_maxfiles
after the loop threw the warning that both options are defined.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agopveceph: add timeout to status command
Thomas Lamprecht [Mon, 21 Dec 2020 14:19:40 +0000 (15:19 +0100)]
pveceph: add timeout to status command

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agopveceph: change status from long JSON to ceph -s
Aaron Lauterer [Mon, 21 Dec 2020 10:07:54 +0000 (11:07 +0100)]
pveceph: change status from long JSON to ceph -s

Printing a lot of very detailed JSON output on the CLI is not very
useful.

Printing the `ceph -s` overview is much more suited to give an overview
of the ceph cluster status.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
3 years agosafe destroy: Add HA to purge tooltip
Dominic Jäger [Thu, 10 Dec 2020 08:16:00 +0000 (09:16 +0100)]
safe destroy: Add HA to purge tooltip

This makes the enumeration complete.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
3 years agoui: improve description of guest-fstrim checkbox
Aaron Lauterer [Tue, 15 Dec 2020 15:22:04 +0000 (16:22 +0100)]
ui: improve description of guest-fstrim checkbox

The phrasing left some room to speculation when this would actually be
run, e.g. after cloning a full VM?

Currently the only instances where it is used is after moving a disk or
migrating a VM.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
3 years agoceph: extend error for wrong config-file link
Stoiko Ivanov [Wed, 16 Dec 2020 11:46:11 +0000 (12:46 +0100)]
ceph: extend error for wrong config-file link

Since I had to look up the cause of the error-message in our source
explaining why exactly ceph-operations fail, because
/etc/ceph/ceph.conf exists.

reported via our community forum:
https://forum.proxmox.com/threads/osd-ersetzen-neu-erstellen.80793/

quickly tested on a virtual ceph cluster

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
3 years agoupdate aplinfo
Thomas Lamprecht [Fri, 11 Dec 2020 08:59:25 +0000 (09:59 +0100)]
update aplinfo

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agostatus/plugin: do not test connection if disabled
Dominik Csapak [Mon, 7 Dec 2020 14:37:07 +0000 (15:37 +0100)]
status/plugin: do not test connection if disabled

so that if one disables the plugin (e.g. because it is offline),
it will work even when the server is not reachable

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agovzdump: use debugmsg instead of warn
Fabian Ebner [Fri, 4 Dec 2020 09:15:18 +0000 (10:15 +0100)]
vzdump: use debugmsg instead of warn

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agovzdump: warn when both storage and dumpdir are defined in vzdump.conf
Fabian Ebner [Fri, 4 Dec 2020 09:15:17 +0000 (10:15 +0100)]
vzdump: warn when both storage and dumpdir are defined in vzdump.conf

and prefer storage, because the storage configuration might contain more
settings. Warning is preferable over dying, because all backups would be
affected (even if they don't use the vzdump.conf parameters) and the settings
could've been compatible (i.e. dumpdir being the storage's dump dir). Previously
one of the two options would randomly be chosen in the loop in new(), because of
perl hash iteration.

Reported here: https://forum.proxmox.com/threads/vzdump-times-out-very-often-on-zfs-storage-pool.80035/post-354277

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agobump version to 6.3-3
Thomas Lamprecht [Thu, 3 Dec 2020 17:14:49 +0000 (18:14 +0100)]
bump version to 6.3-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agopvestatd: fix container cpuset scheduling
Dominik Csapak [Thu, 3 Dec 2020 15:01:40 +0000 (16:01 +0100)]
pvestatd: fix container cpuset scheduling

Since pve-container commit

c48a25452dccca37b3915e49b7618f6880aeafb1

the code to get the cpuset controller path lives in pve-commons PVE::CGroup.
Use that and improve the logging in case some error happens in the future.
Such an error will only be logged once per pvestatd run,
so it does not spam the log.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agofix #3182 #3183: change backup retention mask logic
Dominik Csapak [Wed, 2 Dec 2020 12:56:31 +0000 (13:56 +0100)]
fix #3182 #3183: change backup retention mask logic

instead of relying on the contentTypeField (which does not need to
exists, e.g. for iscsi), explicitely write it into the panel/icon
mapping and check that

better would be if we query the backend about storage capabilities,
but such an api call does not exist yet, so this should be ok for now

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agotest: allow running replication tests in parallel
Thomas Lamprecht [Wed, 2 Dec 2020 17:00:44 +0000 (18:00 +0100)]
test: allow running replication tests in parallel

running multiple workers reduces built time from >3s to ~0.6s here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agotest: replication: cleanup use statements
Thomas Lamprecht [Wed, 2 Dec 2020 16:57:18 +0000 (17:57 +0100)]
test: replication: cleanup use statements

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agotest: buildsys: allow to execute vzdump tests in parallel
Thomas Lamprecht [Wed, 2 Dec 2020 15:19:34 +0000 (16:19 +0100)]
test: buildsys: allow to execute vzdump tests in parallel

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agotest: buildsys: rework target names, prefix with test
Thomas Lamprecht [Wed, 2 Dec 2020 15:18:41 +0000 (16:18 +0100)]
test: buildsys: rework target names, prefix with test

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agovzdump: defaults: correctly parse prune-backups and convert maxfiles
Fabian Ebner [Tue, 1 Dec 2020 08:24:21 +0000 (09:24 +0100)]
vzdump: defaults: correctly parse prune-backups and convert maxfiles

Also simplify handling in new(), now that we never have maxfiles there anymore.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agovzdump: convert maxfiles CLI parameter to prune-backups
Fabian Ebner [Tue, 1 Dec 2020 08:24:20 +0000 (09:24 +0100)]
vzdump: convert maxfiles CLI parameter to prune-backups

in preparation to clean up handling in new().

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agovzdump: storage_info: adapt to new maxfiles backend behavior
Fabian Ebner [Tue, 1 Dec 2020 08:24:19 +0000 (09:24 +0100)]
vzdump: storage_info: adapt to new maxfiles backend behavior

It's automatically converted to prune-backups when using storage_config() now.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agotest: add tests for retention parameters for vzdump's new()
Fabian Ebner [Tue, 1 Dec 2020 08:24:18 +0000 (09:24 +0100)]
test: add tests for retention parameters for vzdump's new()

To get a more complete picture, instead of mocking storage_config,
PVE::Cluster's get_config is mocked. This ensures that the prune-backups
validation and the maxfiles conversion are also called.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoapi: fixup: commit change to storage module
Thomas Lamprecht [Wed, 2 Dec 2020 10:45:33 +0000 (11:45 +0100)]
api: fixup: commit change to storage module

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: USB selector: use new API endpoint
Thomas Lamprecht [Wed, 2 Dec 2020 10:28:39 +0000 (11:28 +0100)]
ui: USB selector: use new API endpoint

so that we can sunset the usbscan from pve-storage's scan API, which
was never fitting there anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: add usb list in hardware endpoint
Thomas Lamprecht [Wed, 2 Dec 2020 10:26:57 +0000 (11:26 +0100)]
api: add usb list in hardware endpoint

As envisioned in[0][1], better late than never.

[0]: commit 523d5f486ba2d3830d1575327b550ddc1b2ef131
[1]: https://lists.proxmox.com/pipermail/pve-devel/2018-November/034694.html

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: use storage scan module from pve-storage
Thomas Lamprecht [Tue, 1 Dec 2020 18:30:13 +0000 (19:30 +0100)]
api: use storage scan module from pve-storage

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: fix usage of findRecord
Dominik Csapak [Thu, 26 Nov 2020 08:19:53 +0000 (09:19 +0100)]
ui: fix usage of findRecord

findRecord does not match exactly, but only at the beginning and
case insensitive, by default. Change all calls to be case sensitive
and an exactmatch (we never want the default behaviour afaics).

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: storage: find the correct storage record
Dominik Csapak [Thu, 26 Nov 2020 07:58:25 +0000 (08:58 +0100)]
ui: storage: find the correct storage record

by default, findRecord only anchors at the beginning, e.g.
findRecord('id', 'foo');
could find either an entry with id 'foo', 'foobar', 'foobaz', etc.

extend the call to set 'exactMatch' to true, else we sometimes
used the content types of storage e.g., 'local-lvm' for showing
the panels for 'local'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: don't refer to enc key as 'master key'
Fabian Grünbichler [Thu, 26 Nov 2020 09:42:18 +0000 (10:42 +0100)]
ui: don't refer to enc key as 'master key'

the master key is something entirely different, this might confuse
users..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agobump version to 6.3-2
Thomas Lamprecht [Wed, 25 Nov 2020 15:19:56 +0000 (16:19 +0100)]
bump version to 6.3-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: pbs: set onlineHelp (again)
Thomas Lamprecht [Wed, 25 Nov 2020 15:19:50 +0000 (16:19 +0100)]
ui: pbs: set onlineHelp (again)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: bootorder: add onlineHelp link
Stefan Reiter [Tue, 24 Nov 2020 16:52:05 +0000 (17:52 +0100)]
ui: bootorder: add onlineHelp link

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoapi: metrics/server: test connection on add/update
Dominik Csapak [Wed, 25 Nov 2020 12:56:40 +0000 (13:56 +0100)]
api: metrics/server: test connection on add/update

just a basic check, but better than not checking at all

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: storage edit: ensure to set keep-all by default
Thomas Lamprecht [Wed, 25 Nov 2020 13:49:23 +0000 (14:49 +0100)]
ui: storage edit: ensure to set keep-all by default

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: pbs key show: improve labelWidth for 'Key' in translations
Dominik Csapak [Wed, 25 Nov 2020 12:04:37 +0000 (13:04 +0100)]
ui: pbs key show: improve labelWidth for 'Key' in translations

it is not that short in other languages, e.g. German

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: storage: pbsedit: Fix spelling
Dominic Jäger [Wed, 25 Nov 2020 12:15:19 +0000 (13:15 +0100)]
ui: storage: pbsedit: Fix spelling

No e in unusable.

to loose means to free from restraint, or to make less tight or strict [1].
to lose means to fail to keep, or to miss something from one's possession [2].
So "losing" (instead of "loosing") would be bad.

[0] https://www.merriam-webster.com/dictionary/unusable
[1] https://www.merriam-webster.com/dictionary/loose
[2] https://www.merriam-webster.com/dictionary/lose

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
3 years agoui: storage edit: avoid returning prune values if unsupported
Thomas Lamprecht [Wed, 25 Nov 2020 12:15:19 +0000 (13:15 +0100)]
ui: storage edit: avoid returning prune values if unsupported

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoad #3140: allow interface suffix in dns entries
Wolfgang Bumiller [Wed, 25 Nov 2020 10:36:43 +0000 (11:36 +0100)]
ad #3140: allow interface suffix in dns entries

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>