]> git.proxmox.com Git - pve-manager.git/log
pve-manager.git
3 years agofile-restore: pass in full volume ID
Fabian Grünbichler [Fri, 23 Apr 2021 10:34:24 +0000 (12:34 +0200)]
file-restore: pass in full volume ID

not just the snapshot name.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agogui: add task name for 'pbs-download'
Stefan Reiter [Thu, 22 Apr 2021 15:47:39 +0000 (17:47 +0200)]
gui: add task name for 'pbs-download'

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agobackupview: add file restore button
Stefan Reiter [Thu, 22 Apr 2021 15:47:38 +0000 (17:47 +0200)]
backupview: add file restore button

Adds it for both BackupViews, on VM view and storage view.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoui: set file name for spice console download in chrome
Lorenz Stechauner [Thu, 22 Apr 2021 07:49:02 +0000 (09:49 +0200)]
ui: set file name for spice console download in chrome

When the virt-viewer file is downloaded we already set a file name in
Android, so the file type may be recognized. Also doing this in
Chrome (and Chromium based browsers) allows users to "alyways open
files of this type". So the browser automatically opens the console
window without user interaction.

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: use pmxInfoWidget instead of pveInfoWidget
Dominik Csapak [Fri, 23 Apr 2021 08:27:48 +0000 (10:27 +0200)]
ui: use pmxInfoWidget instead of pveInfoWidget

to prevent that they further diverge than they alread have
(pmxInfoWidget got an additional function that is compatible)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: firewall: rule: maxlength for source and dest
Aaron Lauterer [Thu, 22 Apr 2021 12:30:10 +0000 (14:30 +0200)]
ui: firewall: rule: maxlength for source and dest

Limiting the length of the source and dest paramters helps to avoid
problems with iptables-restore which would not apply a rule if a
parameter is larger than the parameter buffer (1024)[0]. As the API is
already limiting this, we should also reflect that in the GUI and give
people a hint that IP sets are most likely the better approach.

[0] http://git.netfilter.org/iptables/tree/iptables/xshared.c?h=v1.8.7#n469

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
3 years agofix #3385: api: network: check for used ports before writing
Stoiko Ivanov [Mon, 19 Apr 2021 18:11:28 +0000 (20:11 +0200)]
fix #3385: api: network: check for used ports before writing

Currently the check for used ports for bonds and bridges happens
while rendering '/etc/network/interfaces.new' in PVE::Inotify
(pve-common).
However at that stage the new/updated interface is already merged
with the old settings, making it impossible to indicate where a NIC
is currently used.

The code is adapted from the renderer in
PVE::Inotify::__write_etc_network_interfaces.

Tested on a virtual PVE instance.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agod/control: bump versioned proxmox-widget-toolkit dependency
Thomas Lamprecht [Thu, 22 Apr 2021 18:43:37 +0000 (20:43 +0200)]
d/control: bump versioned proxmox-widget-toolkit dependency

bunch of stuff moved over or got added there...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: panel/StatusView: use from widget-toolkit instead
Dominik Csapak [Mon, 19 Apr 2021 11:00:48 +0000 (13:00 +0200)]
ui: panel/StatusView: use from widget-toolkit instead

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: Utils: use updateColumns from widget-toolkit
Dominik Csapak [Mon, 19 Apr 2021 11:00:47 +0000 (13:00 +0200)]
ui: Utils: use updateColumns from widget-toolkit

it was moved there

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: use some icons from widget-toolkit
Dominik Csapak [Mon, 19 Apr 2021 11:00:46 +0000 (13:00 +0200)]
ui: use some icons from widget-toolkit

we moved them there

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: Utils: use render functions from widget-toolkit
Dominik Csapak [Mon, 19 Apr 2021 11:00:45 +0000 (13:00 +0200)]
ui: Utils: use render functions from widget-toolkit

they live there now, so we can delete them here and use the ones from
widget-toolkit instead

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: guest safe destroy: try to be a bit more telling in box/tooltip label
Thomas Lamprecht [Thu, 22 Apr 2021 11:20:43 +0000 (13:20 +0200)]
ui: guest safe destroy: try to be a bit more telling in box/tooltip label

Try to be more clear about what those checkboxes do, hopefully
reducing potential confusion by (newer) users.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: guest safe destroy: fix alias
Thomas Lamprecht [Thu, 22 Apr 2021 11:18:48 +0000 (13:18 +0200)]
ui: guest safe destroy: fix alias

`proxmoxSafeDestroy` is the one from the parent, also widget. missed
in general...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: remove SafeDestroy window
Fabian Ebner [Mon, 19 Apr 2021 13:14:41 +0000 (15:14 +0200)]
ui: remove SafeDestroy window

which has been moved to proxmox-widget-toolkit.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoui: use safe destroy window from proxmox-widget-toolkit
Fabian Ebner [Mon, 19 Apr 2021 13:14:40 +0000 (15:14 +0200)]
ui: use safe destroy window from proxmox-widget-toolkit

for the remaining (i.e. non-guests) users.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: safe destroy guest: add checkbox for removal of unreferenced disks
Fabian Ebner [Mon, 19 Apr 2021 13:14:39 +0000 (15:14 +0200)]
ui: safe destroy guest: add checkbox for removal of unreferenced disks

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoui: use new SafeDestroyGuest window
Fabian Ebner [Mon, 19 Apr 2021 13:14:38 +0000 (15:14 +0200)]
ui: use new SafeDestroyGuest window

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoui: add SafeDestroyGuest window
Fabian Ebner [Mon, 19 Apr 2021 13:14:37 +0000 (15:14 +0200)]
ui: add SafeDestroyGuest window

The purge parameter is always explicitly set, which is different from the
existing behavior, but it does not rely on what the default in the backend is.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoui: Parser: respect mtu in {parse, print}QemuNetwork
Dominik Csapak [Tue, 23 Mar 2021 12:27:11 +0000 (13:27 +0100)]
ui: Parser: respect mtu in {parse, print}QemuNetwork

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agohttp server: comment and refactor CSRF skip-check logic
Thomas Lamprecht [Thu, 22 Apr 2021 09:10:48 +0000 (11:10 +0200)]
http server: comment and refactor CSRF skip-check logic

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agohttp-server: fix for api token csrf token check
Lorenz Stechauner [Thu, 22 Apr 2021 08:46:34 +0000 (10:46 +0200)]
http-server: fix for api token csrf token check

Do not check any csrf tokens for auth with api tokens.

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
3 years agohttp-server: minor code/indentation/comment cleanups
Thomas Lamprecht [Thu, 22 Apr 2021 07:10:19 +0000 (09:10 +0200)]
http-server: minor code/indentation/comment cleanups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agofix #3389: Skip CSRF token check also for API tokens on file upload
Lorenz Stechauner [Wed, 21 Apr 2021 11:59:43 +0000 (13:59 +0200)]
fix #3389: Skip CSRF token check also for API tokens on file upload

On file upload, the check for CSRF tokens was already skipped when
performing user authentication. This now happens for API tokens also.

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: Utils: change default Console order for vms
Dominik Csapak [Thu, 22 Apr 2021 06:39:02 +0000 (08:39 +0200)]
ui: Utils: change default Console order for vms

we want to use spice for vms more than xtermjs if both are available
(since spice must be chosen as display in that case)
so the resulting order of preference for vms is:
  spice
  xtermjs
  novnc

since all methods work for containers always, there we use
xtermjs by default, or what is chosen in the datacenter option

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi: ceph pool create: replace left-over complex error handling
Thomas Lamprecht [Wed, 21 Apr 2021 15:34:22 +0000 (17:34 +0200)]
api: ceph pool create: replace left-over complex error handling

this was from the time where we had a loop here to add two storages,
one for KRDB-only and one for KRBD-never. Nowadays we can handle the
mixed case just fine, but the patch dropping that forget to cleanup
the error handling..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: add comment about disabling spice/xterm initially
Dominik Csapak [Wed, 21 Apr 2021 13:02:48 +0000 (15:02 +0200)]
ui: add comment about disabling spice/xterm initially

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoceph: pool set: fix printing problematic settings
Thomas Lamprecht [Wed, 21 Apr 2021 14:06:29 +0000 (16:06 +0200)]
ceph: pool set: fix printing problematic settings

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoceph: pool set: print settings as they are applied
Thomas Lamprecht [Wed, 21 Apr 2021 14:05:39 +0000 (16:05 +0200)]
ceph: pool set: print settings as they are applied

a bit of a weird place to print code-wise, but it shows up in the
task log just fine.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoceph: pool set: improve handling "size" parameter
Thomas Lamprecht [Wed, 21 Apr 2021 13:49:38 +0000 (15:49 +0200)]
ceph: pool set: improve handling "size" parameter

instead of fully duplicating the code just order it first if it
exists...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: ceph/pool: fix formatting of API parameters
Thomas Lamprecht [Wed, 21 Apr 2021 13:45:35 +0000 (15:45 +0200)]
api: ceph/pool: fix formatting of API parameters

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: ceph/pool: fix setting target ratio/size (back) to zero
Thomas Lamprecht [Wed, 21 Apr 2021 13:44:47 +0000 (15:44 +0200)]
ui: ceph/pool: fix setting target ratio/size (back) to zero

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: ceph/pool: fix minWidths for columns to support 720p without scrolling
Thomas Lamprecht [Wed, 21 Apr 2021 13:41:03 +0000 (15:41 +0200)]
ui: ceph/pool: fix minWidths for columns to support 720p without scrolling

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoceph: pool: make min_size constrain check more general
Thomas Lamprecht [Wed, 21 Apr 2021 12:19:50 +0000 (14:19 +0200)]
ceph: pool: make min_size constrain check more general

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoceph: pool: min_size should be auto-set to > size/2
Thomas Lamprecht [Wed, 21 Apr 2021 12:18:36 +0000 (14:18 +0200)]
ceph: pool: min_size should be auto-set to > size/2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoceph: pool edit: improve UX of target size/ratio fields
Thomas Lamprecht [Wed, 21 Apr 2021 11:27:30 +0000 (13:27 +0200)]
ceph: pool edit: improve UX of target size/ratio fields

s/Target Size Ratio/Target Ratio/, shorter and ceph docs call it also
that way, allows do drop the non-standard label width.

Add tooltips to explain both, target size and ratio, a bit.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoceph: pools: use sizeField, nicer UX and less code
Thomas Lamprecht [Wed, 21 Apr 2021 11:15:32 +0000 (13:15 +0200)]
ceph: pools: use sizeField, nicer UX and less code

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: size-field: add more units
Thomas Lamprecht [Wed, 21 Apr 2021 11:11:39 +0000 (13:11 +0200)]
ui: size-field: add more units

This would probably benefit from being an object alá:
```
'GiB': {
    base: 2,
    order: 30,
},
```
but that would be a transparent internal change, and the current way
isn't yet a limitation, so ...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: transform bandwidth-field to generic size-field & derive bandwidth from that
Thomas Lamprecht [Wed, 21 Apr 2021 11:03:36 +0000 (13:03 +0200)]
ui: transform bandwidth-field to generic size-field & derive bandwidth from that

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: bandwidth field: make unit postfix configurable
Thomas Lamprecht [Wed, 21 Apr 2021 11:00:51 +0000 (13:00 +0200)]
ui: bandwidth field: make unit postfix configurable

preparation for making this widget more general, for sizes (not over
time) too

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: bandwidth field: fix eslint complaints and slight readability improvements
Thomas Lamprecht [Wed, 21 Apr 2021 10:59:13 +0000 (12:59 +0200)]
ui: bandwidth field: fix eslint complaints and slight readability improvements

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: ceph/pools: refactor to more declarative style
Thomas Lamprecht [Wed, 21 Apr 2021 10:56:04 +0000 (12:56 +0200)]
ui: ceph/pools: refactor to more declarative style

no semantic changes intended, fixes a few eslint issues along the
way.

This could be further improved by using a ViewController, but lets
keep it at this compromise for now due to work time ROI.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: ceph/Pool: show progress on pool edit/create
Dominik Csapak [Tue, 20 Apr 2021 08:15:23 +0000 (10:15 +0200)]
ui: ceph/Pool: show progress on pool edit/create

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: ceph/Pools: improve number checking for target_size
Dominik Csapak [Tue, 20 Apr 2021 08:15:22 +0000 (10:15 +0200)]
ui: ceph/Pools: improve number checking for target_size

the field gives us a string, so the second condition could never
be true, instead parse to a float instead

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoAPI2/Ceph/Pools: remove unnecessary boolean conversion
Dominik Csapak [Tue, 20 Apr 2021 08:15:21 +0000 (10:15 +0200)]
API2/Ceph/Pools: remove unnecessary boolean conversion

we do nothing with that field, so leave it like it is

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agofix: ceph: always set pool size first
Alwin Antreich [Tue, 20 Apr 2021 08:15:20 +0000 (10:15 +0200)]
fix: ceph: always set pool size first

Since Ceph Nautilus 14.2.10 and Octopus 15.2.2 the min_size of a pool is
calculated by the size (round(size / 2)). When size is applied after
min_size to the pool, the manual specified min_size will be overwritten.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoceph: gui: add min num of PG
Alwin Antreich [Tue, 20 Apr 2021 08:15:19 +0000 (10:15 +0200)]
ceph: gui: add min num of PG

this is used to fine-tune the ceph autoscaler

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoceph: gui: rework pool input panel
Alwin Antreich [Tue, 20 Apr 2021 08:15:18 +0000 (10:15 +0200)]
ceph: gui: rework pool input panel

* add the ability to edit an existing pool
* allow adjustment of autoscale settings
* warn if user specifies min_size 1
* disallow min_size 1 on pool create
* calculate min_size replica by size

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoceph: set allowed minimal pg_num down to 1
Alwin Antreich [Tue, 20 Apr 2021 08:15:17 +0000 (10:15 +0200)]
ceph: set allowed minimal pg_num down to 1

In Ceph Octopus the device_health_metrics pool is auto-created with 1
PG. Since Ceph has the ability to split/merge PGs, hitting the wrong PG
count is now less of an issue anyhow.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoceph: gui: add autoscale & flatten pool view
Alwin Antreich [Tue, 20 Apr 2021 08:15:16 +0000 (10:15 +0200)]
ceph: gui: add autoscale & flatten pool view

Letting the columns flex needs a flat column head structure.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoceph: add autoscale_status to api calls
Alwin Antreich [Tue, 20 Apr 2021 08:15:15 +0000 (10:15 +0200)]
ceph: add autoscale_status to api calls

the properties target_size_ratio, target_size_bytes and pg_num_min are
used to fine-tune the pg_autoscaler and are set on a pool. The updated
pool list shows now autoscale settings & status. Including the new
(optimal) target PGs. To make it easier for new users to get/set the
correct amount of PGs.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: qemu/Config: disable xtermjs and spice until status is loaded
Dominik Csapak [Tue, 20 Apr 2021 14:35:45 +0000 (16:35 +0200)]
ui: qemu/Config: disable xtermjs and spice until status is loaded

We enable/disable spice/xtermjs for the console button in the 'load'
callback of the statusstore, depending on the vms capabilities,
but until the first load there, the only safe option is novnc.

So we have to disable xtermjs and spice on start, else a click on
the button might open a window that cannot connect to the vm.

a forum user probably triggered this:
https://forum.proxmox.com/threads/unable-to-find-serial-interface-console-problem.87705

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoceph: osd_belongs_to_node: only check tree-entries of type host, refactor
Thomas Lamprecht [Tue, 20 Apr 2021 16:05:56 +0000 (18:05 +0200)]
ceph: osd_belongs_to_node: only check tree-entries of type host, refactor

We want to check explicitly for type host, so filter for that first
and create a hash map for easier usage afterwards.

Drop the error when there's no tree, as either RADOS error'd on bad
command already, or there really is no tree (but RADOS worked OK), in
which case we simply return that the OSD did not belong to this node.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoAdd tests for OSD-belongs-to-node helper
Dominic Jäger [Mon, 11 Jan 2021 11:42:59 +0000 (12:42 +0100)]
Add tests for OSD-belongs-to-node helper

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
3 years agoFix #2053: OSD destroy only on specified node
Dominic Jäger [Mon, 11 Jan 2021 11:42:58 +0000 (12:42 +0100)]
Fix #2053: OSD destroy only on specified node

Allow destroying only OSDs that belong to the node that has been specified in
the API path.

So if
 - OSD 1 belongs to node A and
 - OSD 2 belongs to node B
then
 - pvesh delete nodes/A/ceph/osd/1 is allowed but
 - pvesh delete nodes/A/ceph/osd/2 is not

Destroying an OSD via GUI automatically inserts the correct node
into the API path.

pveceph automatically insert the local node into the API call, too.
Consequently, it can now only destroy local OSDs (fix #2053).
 - pveceph osd destroy 1 is allowed on node A but
 - pveceph osd destroy 2 is not

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
3 years agoreport: add multipath.conf and wwids file
Mira Limbeck [Fri, 16 Apr 2021 13:15:54 +0000 (15:15 +0200)]
report: add multipath.conf and wwids file

These 2 files can be helpful for issues with multipath. The multipath -v3
output is too large most of the time and not required for analyzing and
solving the issues.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
3 years agobump version to 6.3-7
Thomas Lamprecht [Thu, 15 Apr 2021 17:57:14 +0000 (19:57 +0200)]
bump version to 6.3-7

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: resources: only get guest lock after real access check
Thomas Lamprecht [Thu, 15 Apr 2021 17:44:59 +0000 (19:44 +0200)]
api: resources: only get guest lock after real access check

The guest iteration is slightly confusing as we also handle the
accumulated pool settings there, so we only check the VM.Audit privs.
for a specific VM and skip to the next if the permissions is not
there after those pool handling.

So, move operations which are only required when VM privs. are there
below this check.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: resources: push guest, pool and sdn info sorted
Thomas Lamprecht [Thu, 15 Apr 2021 17:33:26 +0000 (19:33 +0200)]
api: resources: push guest, pool and sdn info sorted

makes it easier to compare in API responses, and those list are not
huge, seldom over a few thousands, which is peanut crumbs compared to
all the other thing in this perl stack.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: use byte unit and power-of-two base for memory rrd graphs
Thomas Lamprecht [Thu, 15 Apr 2021 17:31:00 +0000 (19:31 +0200)]
ui: use byte unit and power-of-two base for memory rrd graphs

To better match the gauge in the current status infobox in the same
summary panel, which is already using a format where KiB is 1024

the latter needs a (not yet bumped) widget toolkit update to 2.5-2 or
newer, just setting now to avoid forgetting it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: live restore: make warning to a shorter note
Thomas Lamprecht [Thu, 15 Apr 2021 15:21:47 +0000 (17:21 +0200)]
ui: live restore: make warning to a shorter note

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: restore: add live-restore checkbox
Stefan Reiter [Wed, 3 Mar 2021 09:56:12 +0000 (10:56 +0100)]
ui: restore: add live-restore checkbox

Add 'isPBS' parameter for Restore window so we can detect when to show
the 'live-restore' checkbox.

Includes a warning about this feature being experimental for now.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agovzdump: getlock: return lock file handle and let the caller close it
Fabian Ebner [Mon, 12 Apr 2021 08:47:31 +0000 (10:47 +0200)]
vzdump: getlock: return lock file handle and let the caller close it

so it doesn't get out of scope too early.

Regression introduced by 5620e5761efc6617ee8e8b004cfdd604547125fc as pointed
out by Fabian Grünbichler.

Reported in the community forum:
https://forum.proxmox.com/threads/limit-simultaneous-backup-jobs.87489

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agovzdump: storage info: move out activate storage call
Fabian Ebner [Thu, 11 Mar 2021 09:22:05 +0000 (10:22 +0100)]
vzdump: storage info: move out activate storage call

Otherwise storage_info() cannot be used for (at least) PBS storages from an API
call without 'protected => 1', because the password cannot be read from
'/etc/pve/priv'. Note that the function itself does not need the storage to be
active, because it only uses storage_config() and get_backup_dir().

AFAICT new() is the only existing user of this function and can be responsible
for activating the storage itself.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agojs: readd SLAAC option to IPConfig
Mira Limbeck [Mon, 29 Mar 2021 12:07:16 +0000 (14:07 +0200)]
js: readd SLAAC option to IPConfig

Now that SLAAC is supported, we can revert commit 793f2cf4.
SLAAC requires cloud-init 19.4 or newer.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
3 years agoui: backups: enable editing notes for Proxmox Backup Server
Dominik Csapak [Tue, 24 Nov 2020 09:09:36 +0000 (10:09 +0100)]
ui: backups: enable editing notes for Proxmox Backup Server

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: cluster task log: eslint fixes
Fabian Ebner [Fri, 12 Mar 2021 12:53:26 +0000 (13:53 +0100)]
ui: cluster task log: eslint fixes

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agometrix: influx: fix default api_prefix
Dominik Csapak [Mon, 15 Mar 2021 14:28:11 +0000 (15:28 +0100)]
metrix: influx: fix default api_prefix

we set the api prefix by default to '/' so we always triggered
the the replacement and added '///' which is wrong and does not
work for the 'health' api path
(influxdb returns 404 for 'https://ip:port///health')

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agometrics: influx: special case 'health' api path i _get_v2url
Dominik Csapak [Mon, 15 Mar 2021 14:26:46 +0000 (15:26 +0100)]
metrics: influx: special case 'health' api path i _get_v2url

the forwards compatible api of 1.8 only contains this path
(not api/v2/health) and it it also contained in the v2 api

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoui: metrics: influxdb: add support for new api-path-prefix field
Thomas Lamprecht [Mon, 15 Mar 2021 08:14:57 +0000 (09:14 +0100)]
ui: metrics: influxdb: add support for new api-path-prefix field

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agometrics: influx: allow one to add an API URL-path prefix
Thomas Lamprecht [Mon, 15 Mar 2021 08:14:56 +0000 (09:14 +0100)]
metrics: influx: allow one to add an API URL-path prefix

I normally use a reverse proxy in front of my influxdb instances,
proxying all from the /influx/ path to the only locally listening
influxdb. So here I'd need to set "influx" as api-path-prefix.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agometrics: influx: do not error out when credendtials could not be loaded
Thomas Lamprecht [Mon, 15 Mar 2021 08:14:55 +0000 (09:14 +0100)]
metrics: influx: do not error out when credendtials could not be loaded

Not a hard error, some network box (proxy) down the line could add it
for us, or it could be just not required, so ...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agometrics: influx: send along auth token on connection test too
Thomas Lamprecht [Mon, 15 Mar 2021 08:14:54 +0000 (09:14 +0100)]
metrics: influx: send along auth token on connection test too

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agometrics: influx: include unrecognized protocol value in error
Thomas Lamprecht [Mon, 15 Mar 2021 08:14:53 +0000 (09:14 +0100)]
metrics: influx: include unrecognized protocol value in error

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: avoid errors when 'template' property is not present in guest status
Fabian Ebner [Thu, 11 Mar 2021 10:26:46 +0000 (11:26 +0100)]
ui: avoid errors when 'template' property is not present in guest status

The API doesn't advertise the property as non-optional and it's safer and more
in line with the surrounding code.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoui: restore: fix bandwidth limit behavior
Fabian Ebner [Mon, 15 Mar 2021 11:57:29 +0000 (12:57 +0100)]
ui: restore: fix bandwidth limit behavior

by allowing zero and updating the field name. Otherwise the hint mentioning zero
is wrong. Also, it's not only a read limit as the emptyText already indicates.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoui: bandwidth limit selector: make it possible to allow zero
Fabian Ebner [Mon, 15 Mar 2021 11:57:28 +0000 (12:57 +0100)]
ui: bandwidth limit selector: make it possible to allow zero

The initial value is '' and in getSubmitValue(), previously the branch
   if (v == 0 || v == 0.0) return null;
was taken, because of the lax '==' comparision. Make sure we still return null
for '' by explicitly checking for it.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoext. metris. fixup InfluxDB spelling in schema and code style
Thomas Lamprecht [Sat, 13 Mar 2021 20:30:03 +0000 (21:30 +0100)]
ext. metris. fixup InfluxDB spelling in schema and code style

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 6.3-6
Thomas Lamprecht [Tue, 9 Mar 2021 07:34:03 +0000 (08:34 +0100)]
bump version to 6.3-6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui/hardware: extend machine renderer to show pinned Windows versions
Stefan Reiter [Mon, 8 Mar 2021 10:01:51 +0000 (11:01 +0100)]
ui/hardware: extend machine renderer to show pinned Windows versions

The default is not just "i440fx", this hides the fact that the version
will be pinned to 5.1, unless one deliberately opens the editor.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoUtils: add is_windows and use in MachineEdit
Stefan Reiter [Mon, 8 Mar 2021 10:01:50 +0000 (11:01 +0100)]
Utils: add is_windows and use in MachineEdit

A bit more future proof and reuseable than a regex match.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoui/machine: fix eslint warning (unnecessary parentheses)
Stefan Reiter [Mon, 8 Mar 2021 10:01:49 +0000 (11:01 +0100)]
ui/machine: fix eslint warning (unnecessary parentheses)

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoui/machine: fix Windows pinning and detect "pc" as non-pinned
Stefan Reiter [Mon, 8 Mar 2021 10:01:48 +0000 (11:01 +0100)]
ui/machine: fix Windows pinning and detect "pc" as non-pinned

We need to detect "isWindows" before splitting a pinned version into
.version/.machine, otherwise .machine will always be "pc" or "q35", and
the check in "isWindows" will succeed even for pinned versions. This
resulted in "5.1" being shown even if a different version has been set
for a Windows machine.

Also alias "pc" directly to "__default__", as they have the same
meaning, but "pc" is not a valid entry in the "machine" combobox,
leading to an invalid state when editing the (valid) configuration of
"machine: pc" on a VM.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoui: add onlineHelp to rng
Stefan Reiter [Mon, 8 Mar 2021 10:01:47 +0000 (11:01 +0100)]
ui: add onlineHelp to rng

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agobump version to 6.3-5
Thomas Lamprecht [Fri, 5 Mar 2021 20:50:08 +0000 (21:50 +0100)]
bump version to 6.3-5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: vm/machine: show autopinned version for win VM
Thomas Lamprecht [Fri, 5 Mar 2021 21:21:41 +0000 (22:21 +0100)]
ui: vm/machine: show autopinned version for win VM

and improve switchting machine type and keeping same version for
the windows based VMs, as we cannot do the same as for other
OS-Types, just select the "latest" magic version.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agopartially fix #2745: vzdump: use default for remove parameter
Fabian Ebner [Wed, 3 Mar 2021 11:50:41 +0000 (12:50 +0100)]
partially fix #2745: vzdump: use default for remove parameter

The initial default from the $confdesc is 1 anyways, and like
this changing the default in /etc/vzdump.conf to 0 actually works.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: vm/machine: show notice about effects of machine version change
Thomas Lamprecht [Fri, 5 Mar 2021 20:13:48 +0000 (21:13 +0100)]
ui: vm/machine: show notice about effects of machine version change

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: vm/machine: allow blank to avoid invalidity and show Latest as empty text
Thomas Lamprecht [Fri, 5 Mar 2021 19:44:05 +0000 (20:44 +0100)]
ui: vm/machine: allow blank to avoid invalidity and show Latest as empty text

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: vm/machine: only set advanced temporary visible for pinned machines
Thomas Lamprecht [Fri, 5 Mar 2021 19:41:44 +0000 (20:41 +0100)]
ui: vm/machine: only set advanced temporary visible for pinned machines

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: vm/machine: avoid showing latest for windows VMs
Thomas Lamprecht [Fri, 5 Mar 2021 19:03:34 +0000 (20:03 +0100)]
ui: vm/machine: avoid showing latest for windows VMs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: style followup cleanup
Thomas Lamprecht [Fri, 5 Mar 2021 19:01:46 +0000 (20:01 +0100)]
ui: style followup cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: vm/machine: adapt to API changes
Thomas Lamprecht [Fri, 5 Mar 2021 16:40:52 +0000 (17:40 +0100)]
ui: vm/machine: adapt to API changes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: MachineEdit: add option for machine version pinning
Stefan Reiter [Thu, 4 Mar 2021 12:52:09 +0000 (13:52 +0100)]
ui: MachineEdit: add option for machine version pinning

Hidden behind "Advanced" options, as to not confuse inexperienced users.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoui: create MachineEdit window
Stefan Reiter [Thu, 4 Mar 2021 12:52:08 +0000 (13:52 +0100)]
ui: create MachineEdit window

no functional change intended

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: node: add capabilities path and move qemu machines over
Thomas Lamprecht [Fri, 5 Mar 2021 16:07:17 +0000 (17:07 +0100)]
api: node: add capabilities path and move qemu machines over

avoid further crowding the top-level node API path with such
"what can some part of the node currently do" stuff, rather move it
down.

The QEMU cpu stuff should move also down there.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: nodes: sort use statements
Thomas Lamprecht [Fri, 5 Mar 2021 15:57:42 +0000 (16:57 +0100)]
api: nodes: sort use statements

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: register Qemu::Machine call
Stefan Reiter [Thu, 4 Mar 2021 12:52:07 +0000 (13:52 +0100)]
api: register Qemu::Machine call

as 'machine-types', so it is clear this refers to QEMU machines, not the
local machine (as one might think, this being a 'node' API call).

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobuildsys: api: sort sources
Thomas Lamprecht [Fri, 5 Mar 2021 15:52:37 +0000 (16:52 +0100)]
buildsys: api: sort sources

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoapi: nodes: sort index
Thomas Lamprecht [Fri, 5 Mar 2021 15:50:28 +0000 (16:50 +0100)]
api: nodes: sort index

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