pve-manager.git
5 hours agoappliance info: update apltest for zstd based archives master
Thomas Lamprecht [Wed, 30 Nov 2022 15:20:58 +0000 (16:20 +0100)]
appliance info: update apltest for zstd based archives

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 hours agoappliance info: update shipped index
Thomas Lamprecht [Wed, 30 Nov 2022 15:19:22 +0000 (16:19 +0100)]
appliance info: update shipped index

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 days agofix #4370: ui: fix regression of preselecting tree element on login
Dominik Csapak [Mon, 28 Nov 2022 12:34:00 +0000 (13:34 +0100)]
fix #4370: ui: fix regression of preselecting tree element on login

We want to select a tree element based on the fragment in the url after
a login. For which we must wait for the tree (ResourceStore) to load.

Since we recently introduced the loading of '/cluster/options' to
load the overrides of tags, etc. we fire a 'load' event with the
intention of triggering a rerender of the tree (to include the new
colors). If that triggers before the ResourceStore is loaded,
we try to set the element once (which fails) and nothing is selected.

To fix this, we only trigger it if it was already loaded and is not
currently loading. Otherwise it will be either redrawn after the ongoing
load, or by the first load.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
9 days agobump version to 7.3-3
Thomas Lamprecht [Mon, 21 Nov 2022 14:58:42 +0000 (15:58 +0100)]
bump version to 7.3-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
9 days agoui: qemu disk: honor iothread setting from config
Dominik Csapak [Mon, 21 Nov 2022 14:39:06 +0000 (15:39 +0100)]
ui: qemu disk: honor iothread setting from config

To have a IOThread on by default in the wizard and on disk add, we
added a 'bind' for the value here. This also changes the value for
existing VM disks, and if one does not notice, modifies it away again
(since we don't have the controller here and isSCSISingle is false)

Simply don't bind value when we edit a VM disk from config

Note that this is only an issue in Chromium based browsers.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
9 days agoupdate aplinfo
Thomas Lamprecht [Mon, 21 Nov 2022 13:25:07 +0000 (14:25 +0100)]
update aplinfo

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
9 days agobump version to 7.3-2
Thomas Lamprecht [Mon, 21 Nov 2022 13:23:59 +0000 (14:23 +0100)]
bump version to 7.3-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
9 days agoapi: vzdump: soften parameter permission checks
Fiona Ebner [Wed, 16 Nov 2022 14:04:30 +0000 (15:04 +0100)]
api: vzdump: soften parameter permission checks

Allows sufficiently privileged users to pass-in retention and
performance parameters for manual backup, but keeps tmpdir, dumpdir
and script root-only. Such users could already edit the job
accordingly, so essentially not granting anything new.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
9 days agoui: workspace: increase initial resource tree width from 200 to 300 px
Thomas Lamprecht [Mon, 21 Nov 2022 12:38:11 +0000 (13:38 +0100)]
ui: workspace: increase initial resource tree width from 200 to 300 px

we got much more wide screens and higher resolutions nowadays than
when this width was decided (before the famous imported from SVN
commit in 2011).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
9 days agoui: dc options: support setting case sensitive
Thomas Lamprecht [Mon, 21 Nov 2022 07:49:13 +0000 (08:49 +0100)]
ui: dc options: support setting case sensitive

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
9 days agoui: dc options: add Color-Overrides text to render, if any
Thomas Lamprecht [Mon, 21 Nov 2022 07:48:53 +0000 (08:48 +0100)]
ui: dc options: add Color-Overrides text to render, if any

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 days agofix #4245: api: node HW: allow to get PCI info with Sys.Audit on /
Thomas Lamprecht [Sun, 20 Nov 2022 12:27:27 +0000 (13:27 +0100)]
fix #4245: api: node HW: allow to get PCI info with Sys.Audit on /

keep Sys.Modify only for backward compat, as it does not make really
much sense to ask for that on an informative GET call.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 days agobump version to 7.3-1
Thomas Lamprecht [Sat, 19 Nov 2022 14:57:53 +0000 (15:57 +0100)]
bump version to 7.3-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 days agoui: improve ZFS pool name validator accuracy
Thomas Lamprecht [Sat, 19 Nov 2022 14:56:42 +0000 (15:56 +0100)]
ui: improve ZFS pool name validator accuracy

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
12 days agoui: node disk manage: mark using ZFS reserved pool names as invalid
Thomas Lamprecht [Fri, 18 Nov 2022 17:27:54 +0000 (18:27 +0100)]
ui: node disk manage: mark using ZFS reserved pool names as invalid

ZFS will die anyway later so catch this earlier for better UX

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
12 days agoui: utils fix typos in tag tree styles
Thomas Lamprecht [Fri, 18 Nov 2022 16:56:50 +0000 (17:56 +0100)]
ui: utils fix typos in tag tree styles

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
12 days agobump version to 7.2-15
Thomas Lamprecht [Fri, 18 Nov 2022 16:27:30 +0000 (17:27 +0100)]
bump version to 7.2-15

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
12 days agoui: datacenter options: add Cluster Resource Scheduling editor
Thomas Lamprecht [Fri, 18 Nov 2022 16:26:34 +0000 (17:26 +0100)]
ui: datacenter options: add Cluster Resource Scheduling editor

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
12 days agoui: tags: highlight finish inline editing button
Dominik Csapak [Fri, 18 Nov 2022 11:59:18 +0000 (12:59 +0100)]
ui: tags: highlight finish inline editing button

by making it a 'regular' blue button instead of a toolbar button

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
12 days agoui: tags: implement dirty tracking for inline editing
Dominik Csapak [Fri, 18 Nov 2022 11:59:17 +0000 (12:59 +0100)]
ui: tags: implement dirty tracking for inline editing

similar to how regular forms are tracked

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
12 days agoui: tags: shortcut accept&cancel with keypresses
Dominik Csapak [Fri, 18 Nov 2022 11:59:16 +0000 (12:59 +0100)]
ui: tags: shortcut accept&cancel with keypresses

pressing 'Enter' accepts the current tags and
'Escape' cancels editing

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
12 days agoui: hide 'no tags' field and edit icon without VM.Config.Options
Dominik Csapak [Fri, 18 Nov 2022 11:59:15 +0000 (12:59 +0100)]
ui: hide 'no tags' field and edit icon without VM.Config.Options

they cannot edit them anyway, so no point in showing them that
there is no tag

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
12 days agoui: fix datacenter tags options inputs
Dominik Csapak [Fri, 18 Nov 2022 08:09:37 +0000 (09:09 +0100)]
ui: fix datacenter tags options inputs

* dont allow blank for tree shape
* allow completely removing registered tags and user-tag-access properties
* correctly check validity for the listfield
* use correct gettexts
* don't inject empty field in the listfield when setting an empty string

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
12 days agoui: vm network edit: use the correct default model
Matthias Heiserer [Fri, 18 Nov 2022 10:29:55 +0000 (11:29 +0100)]
ui: vm network edit: use the correct default model

commit eb1a09647d25d6d588260a971187a8803453a9ed broke the preselected
Model by setting it to ''. The GUI displays/selects an empty field
as default.

Fixes: eb1a0964 ("ui: vm network: allow to override MTU for virtio devices")
Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
12 days agoui: vm vNIC: make MTU validation more fine-grained for better UX
Thomas Lamprecht [Fri, 18 Nov 2022 10:44:43 +0000 (11:44 +0100)]
ui: vm vNIC: make MTU validation more fine-grained for better UX

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
12 days agoui: vm vNIC: add empty text for MTU field
Thomas Lamprecht [Fri, 18 Nov 2022 10:44:29 +0000 (11:44 +0100)]
ui: vm vNIC: add empty text for MTU field

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 days agobump version to 7.2-14
Thomas Lamprecht [Thu, 17 Nov 2022 18:45:26 +0000 (19:45 +0100)]
bump version to 7.2-14

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 days agod/control: bump versioned dependency for libpve-storage-perl to 7.2-12
Thomas Lamprecht [Thu, 17 Nov 2022 18:36:39 +0000 (19:36 +0100)]
d/control: bump versioned dependency for libpve-storage-perl to 7.2-12

ensuring we got all ready for dRAID

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 days agoui: disk manage: move dRAID options into field set
Thomas Lamprecht [Thu, 17 Nov 2022 18:29:19 +0000 (19:29 +0100)]
ui: disk manage: move dRAID options into field set

to avoid an overly asymmetric form field balance

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 days agoui: disk manage: rework assembling dRAID options
Thomas Lamprecht [Thu, 17 Nov 2022 18:14:04 +0000 (19:14 +0100)]
ui: disk manage: rework assembling dRAID options

Simply use onGetValues to assemble the dRAID config, if any.

We do not need to bother with setting values as this is only for
creates, never for edit/displays.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 days agofix #3967: enable ZFS dRAID creation in WebGUI
Stefan Hrdlicka [Thu, 10 Nov 2022 13:24:49 +0000 (14:24 +0100)]
fix #3967: enable ZFS dRAID creation in WebGUI

add fields for additional settings required by ZFS dRAID

Signed-off-by: Stefan Hrdlicka <s.hrdlicka@proxmox.com>
13 days agod/control: bump versioned dependency for librados2-perl to 1.3-1
Thomas Lamprecht [Thu, 17 Nov 2022 17:43:11 +0000 (18:43 +0100)]
d/control: bump versioned dependency for librados2-perl to 1.3-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 days agoui: tags: reduce opacity of "No Tags" hint
Thomas Lamprecht [Thu, 17 Nov 2022 17:36:52 +0000 (18:36 +0100)]
ui: tags: reduce opacity of "No Tags" hint

make it less stand out, it's just a hint not primary information

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 days agoui: osd: mon: mds: warn if stop/destroy actions are problematic
Aaron Lauterer [Thu, 17 Nov 2022 14:10:02 +0000 (15:10 +0100)]
ui: osd: mon: mds: warn if stop/destroy actions are problematic

Check if stopping of a service (OSD, MON, MDS) will be problematic for
Ceph. The warning still allows the user to proceed.

Ceph also has a check if the destruction of a MON is okay, so let's use
it.

Instead of the common OK button, label it with `Stop OSD` and so forth
to hopefully reduce the "click OK by habit" incidents.

This will not catch it every time as Ceph can need a few moments after a
change to establish its current status. For example, stopping one of 3
MONs and then right away destroying one of the last two running MONs
will most likely not trigger the warning. Doing so after a few seconds
should show the warning though.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
13 days agoui: osd: warn if removal could be problematic
Aaron Lauterer [Thu, 17 Nov 2022 14:10:01 +0000 (15:10 +0100)]
ui: osd: warn if removal could be problematic

If an OSD is removed during the wrong conditions, it could lead to
blocked IO or worst case data loss.

Check against global flags that limit the capabilities of Ceph to heal
itself (norebalance, norecover, noout) and if there are degraded
objects.

Unfortunately, the 'safe-to-destroy' Ceph API endpoint will not help
here as it only works as long as the OSD is still running. By the time
the destroy button is enabled, the OSD will already be stopped.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
13 days agoapi: ceph: add cmd-safety endpoint
Aaron Lauterer [Thu, 17 Nov 2022 14:10:00 +0000 (15:10 +0100)]
api: ceph: add cmd-safety endpoint

Ceph provides us with several safety checks to verify that an action is
safe to perform. This endpoint provides means to acces them.
The actual mon commands are not exposed directly. Instead the two
actions "stop" and "destroy" are offered.

In case it is not okay to perform an action, Ceph provides a status
message explaining why. This message is part of the returned values.

For now there are the following checks for these services:

MON:
  - ok-to-stop
  - ok-to-rm
OSD:
  - ok-to-stop
  - safe-to-destroy
MDS:
  - ok-to-stop

Even though OSDs have a check if it is okay to destroy them, it is for
now not really usable in our workflow because it needs the OSD to be up
and running to return useful information. Our workflow in the GUI
currently is that the OSD needs to be stopped in order to destroy it.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
13 days agod/control: bump versioned pve-cluster dependency to 7.2-3
Thomas Lamprecht [Thu, 17 Nov 2022 17:26:56 +0000 (18:26 +0100)]
d/control: bump versioned pve-cluster dependency to 7.2-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 days agoui: eslint auto-fixes
Thomas Lamprecht [Thu, 17 Nov 2022 16:59:45 +0000 (17:59 +0100)]
ui: eslint auto-fixes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 days agoui: tags: add preview to tag shape option
Dominik Csapak [Thu, 17 Nov 2022 14:56:23 +0000 (15:56 +0100)]
ui: tags: add preview to tag shape option

with a combogrid and the example text 'preview'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
13 days agoui: change style of ListField
Dominik Csapak [Thu, 17 Nov 2022 14:56:22 +0000 (15:56 +0100)]
ui: change style of ListField

and make it more like the 'traffic control' time grid in pbs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
13 days agoui: tags: hide already set tags in dropdown
Dominik Csapak [Thu, 17 Nov 2022 14:56:21 +0000 (15:56 +0100)]
ui: tags: hide already set tags in dropdown

on every change, collect all tags and update the filter of all tag
fields

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
13 days agoui: tags: make sorting more natural
Dominik Csapak [Thu, 17 Nov 2022 14:56:20 +0000 (15:56 +0100)]
ui: tags: make sorting more natural

by sorting the lower cased variants, and only if they are identical
sort the original values with 'localeCompare'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
13 days agoui: rework inline tag editing
Dominik Csapak [Thu, 17 Nov 2022 14:56:19 +0000 (15:56 +0100)]
ui: rework inline tag editing

things that changed:
* removed 'add Tag' inline button with proper button that adds
  empty tag
* don't require to confirm each tag, simply update the color "live"
* set a minimum width for the editing box, so that it's easier to click
* replace cancel/finish icons with proper buttons
* fix tagCharRegex for multichar text (necessary for paste)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
13 days agoui: implement tag ordering as configured in datacenter config
Dominik Csapak [Wed, 16 Nov 2022 15:48:15 +0000 (16:48 +0100)]
ui: implement tag ordering as configured in datacenter config

datacenter.cfg returns an 'ordering' option. parse that and
use it to order the tags when viewing. default is alphabetical.

With alphabetical ordering, drag & drop when editing is disabled and the
tags will be inserted at the right place. When saving, the sorted
order will be written into the config

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
13 days agoui: add tags to ResourceGrid and GlobalSearchField
Dominik Csapak [Wed, 16 Nov 2022 15:48:14 +0000 (16:48 +0100)]
ui: add tags to ResourceGrid and GlobalSearchField

also allows to search for tags in the GlobalSearchField where each tag is
treated like a seperate field, so it weighs more if the user searches for
the exact string of a single tag

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
ui: ResourceGrid: render tags

with the 'full' styling

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
13 days agoui: tree/ResourceTree: show Tags in tree
Dominik Csapak [Wed, 16 Nov 2022 15:48:13 +0000 (16:48 +0100)]
ui: tree/ResourceTree: show Tags in tree

and update the treenodes when the tags change.
since we change the vm node text (which we pass through to the config
panel), we have to change how we generate the text there slightly
(otherwise that would include the rendered tags)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
13 days agoui: {lxc, qemu}/Config: show Tags and make them editable
Dominik Csapak [Wed, 16 Nov 2022 15:48:12 +0000 (16:48 +0100)]
ui: {lxc, qemu}/Config: show Tags and make them editable

add the tags in the status line, and add a button for adding new ones

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
13 days agoui: add form for editing tags
Dominik Csapak [Wed, 16 Nov 2022 15:48:11 +0000 (16:48 +0100)]
ui: add form for editing tags

This is a wrapper container for holding a list of (editable) tags
intended to be used in the lxc/qemu status toolbar

To add a new tag, we reuse the 'pveTag' class, but overwrite some of
its behaviour and css classes so that it properly adds tags

Also handles the drag/drop feature for the tags in the list

When done with editing (by clicking the checkmark), sends a 'change'
event with the new tags

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
13 days agoui: add form/Tag
Dominik Csapak [Wed, 16 Nov 2022 15:48:10 +0000 (16:48 +0100)]
ui: add form/Tag

displays a single tag, with the ability to edit inline on click (when
the mode is set to editable). This brings up a list of globally available tags
for simple selection.

this is a basic ext component, with 'i' tags for the icons (handle and
add/remove button) and a span (for the tag text)

shows the tag by default, and if put in editable mode, makes the
span editable. when actually starting the edit, shows a picker
with available tags to select from

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
13 days agoui: dc/OptionView: add editors for tag settings
Dominik Csapak [Wed, 16 Nov 2022 15:48:09 +0000 (16:48 +0100)]
ui: dc/OptionView: add editors for tag settings

namely for 'tag-tree-style' and 'tag-colors'.
display the tag overrides directly as they will appear as tags

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
13 days agoui: add PVE.form.ListField
Dominik Csapak [Wed, 16 Nov 2022 15:48:08 +0000 (16:48 +0100)]
ui: add PVE.form.ListField

a field which contains just a list of textfields, e.g. useful for a list
of simple tags

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
13 days agoui: add grid form for mapping tags to foreground/background colors
Dominik Csapak [Wed, 16 Nov 2022 15:48:07 +0000 (16:48 +0100)]
ui: add grid form for mapping tags to foreground/background colors

This provides a basic grid to edit a list of tag color overrides.
We'll use this for editing the datacenter.cfg overrides and the
browser storage overrides.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
13 days agoui: parse and save tag infos from /cluster/options
Dominik Csapak [Wed, 16 Nov 2022 15:48:06 +0000 (16:48 +0100)]
ui: parse and save tag infos from /cluster/options

stores the color-map into a global list of overrides. on update, also parse
the values from the browser localstore. Also emits a GlobalEvent
'loadedUiOptions' so that e.g. the tags can listen to that and refresh their
colors

also saves the list of 'allowed-tags' into PVE.Utils

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
13 days agoui: save ui options from /cluster/options instead of version
Dominik Csapak [Wed, 16 Nov 2022 15:48:05 +0000 (16:48 +0100)]
ui: save ui options from /cluster/options instead of version

/cluster/options is now the go to place for getting these options
(until we have more options unrelated to the datacenter.cfg)

Also move the use of the console from VersionInfo to here, since
this will be the future place for ui related backend options.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
13 days agoapi: open up /cluster/options call over injecting info into /version
Dominik Csapak [Wed, 16 Nov 2022 15:48:04 +0000 (16:48 +0100)]
api: open up /cluster/options call over injecting info into /version

To avoid returning unrelated information in the /version api call in
the future use the API endpoint that'd return the relevant
information basically anyway.

It contains most ui relevant options, like the console preference and
tag-style so allow these for users without 'Sys.Audit' on '/', for
others its unchanged, they still get the whole datacenter config.

We also add the list of allowed tags, while not strictly a datacenter
config, it's derived from the current users privileges and the
datacenter config.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 days agoapi: /cluster/resources: add tags to returned properties
Dominik Csapak [Wed, 16 Nov 2022 15:48:03 +0000 (16:48 +0100)]
api: /cluster/resources: add tags to returned properties

by querying 'lock' and 'tags' with 'get_guest_config_properties'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
13 days agoui: qemu hardware: avoid manual deletion handling for vCPU affinity
Thomas Lamprecht [Thu, 17 Nov 2022 10:55:19 +0000 (11:55 +0100)]
ui: qemu hardware: avoid manual deletion handling for vCPU affinity

Switch to the `proxmoxtextfield` widget and enable its `deleteEmpty`
option, which gives us that all for free and better.

Fix label/emptyText to title casing while at it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 days agoui: qemu hardware: only enable affinity form field for root@pam
Thomas Lamprecht [Thu, 17 Nov 2022 10:53:55 +0000 (11:53 +0100)]
ui: qemu hardware: only enable affinity form field for root@pam

that then also ensures it isn't submitted, which would fail
permission checks for non-root users when editing the vCPU.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 days agoui: qemu hardware: fix eslint error
Thomas Lamprecht [Thu, 17 Nov 2022 09:38:05 +0000 (10:38 +0100)]
ui: qemu hardware: fix eslint error

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 days agoui: qemu: network: increase max queues to 64
Alexandre Derumier [Wed, 16 Nov 2022 04:13:48 +0000 (05:13 +0100)]
ui: qemu: network: increase max queues to 64

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
 [T: 128 -> 64, see qemu-server commit]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 days agoui: cloudinit: disable remove button without VM.Config.Cloudinit
Dominik Csapak [Thu, 17 Nov 2022 07:55:35 +0000 (08:55 +0100)]
ui: cloudinit: disable remove button without VM.Config.Cloudinit

since it also needs both VM.Config.CDROM and VM.Config.Cloudinit

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
13 days agofix #4321: properly check cloud-init drive permissions
Leo Nunner [Wed, 16 Nov 2022 17:34:28 +0000 (18:34 +0100)]
fix #4321: properly check cloud-init drive permissions

Checking for only Sys.Console prevents users who actually have the
correct permissions (VM.Config.CDROM, VM.Config.Cloudinit) from adding
a new cloud-init drive. Some checks needed to be adapted so that editing
cloud-init devices was possible with VM.Config.CDROM instead of
VM.Config.Disk.

Signed-off-by: Leo Nunner <l.nunner@proxmox.com>
2 weeks agoui: qemu: options: use 'first disk' for legacy 'c' boot setting
Fiona Ebner [Wed, 28 Sep 2022 07:54:52 +0000 (09:54 +0200)]
ui: qemu: options: use 'first disk' for legacy 'c' boot setting

The kvm man page mentions that using 'c' will try booting from the
first hard disk, so the current '(no bootdisk)' text in the UI is not
accurate, and boot can still succeed.

Reported in the community forum:
https://forum.proxmox.com/threads/115800/

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2 weeks agoui: only allow rbd pools to be added as rbd storage
Stefan Sterz [Tue, 25 Oct 2022 08:10:46 +0000 (10:10 +0200)]
ui: only allow rbd pools to be added as rbd storage

previously the ui would allow adding all pools (even the default
ceph-mon pools) as storage. this could lead to issues when users did
use these pools as storage (e.g.: vms missing their disks after a
migration). hence, restrict the pool selector to rbd pools.

fails gracefully by reverting to the previous behavior if a pool has
no application assigned to it.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
Tested-By:  Aaron Lauterer <a.lauterer@proxmox.com>
2 weeks agoapi: ceph: add applications of each pool to the lspools endpoint
Stefan Sterz [Tue, 25 Oct 2022 08:10:45 +0000 (10:10 +0200)]
api: ceph: add applications of each pool to the lspools endpoint

since ceph luminous (ceph 12) pools need to be associated with at
least one applicaton. expose this information here too so that clients
of this endpoint can use it.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
Tested-By:  Aaron Lauterer <a.lauterer@proxmox.com>
2 weeks agoui: qemu monitor: rework comment about how (starting) trimming works
Thomas Lamprecht [Wed, 16 Nov 2022 19:22:05 +0000 (20:22 +0100)]
ui: qemu monitor: rework comment about how (starting) trimming works

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 weeks agofix #4318: ui: qemu/Monitor: rework output retention mechanism
Dominik Csapak [Wed, 2 Nov 2022 11:28:37 +0000 (12:28 +0100)]
fix #4318: ui: qemu/Monitor: rework output retention mechanism

instead of saving maximum 500 lines, count commands + lines, and only
if both are over the limit, truncate the command list

this way, at least the last 10 commands + output are always visible, and
no visible output is truncated, while still not letting the log
grow infinitely

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 weeks agoui: LXC template upload: allow zstd compressed (.tar.zst) images
Matthias Heiserer [Wed, 2 Nov 2022 15:16:41 +0000 (16:16 +0100)]
ui: LXC template upload: allow zstd compressed (.tar.zst) images

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 weeks agogui: move rate limit field to advanced section
Daniel Tschlatscher [Thu, 3 Nov 2022 15:38:09 +0000 (16:38 +0100)]
gui: move rate limit field to advanced section

The new MTU field and the rate limit field are now in the advanced
section of the NetworkInputPanel to parallel the layout of the
NetworkEdit for VMs.

Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
Reviewed-by:  Stefan Hanreich <s.hanreich@proxmox.com>
Tested-by:  Stefan Hanreich <s.hanreich@proxmox.com>
2 weeks agofix #3719: gui: expose LXC MTU option in web UI
Daniel Tschlatscher [Thu, 3 Nov 2022 15:38:08 +0000 (16:38 +0100)]
fix #3719: gui: expose LXC MTU option in web UI

The option to set the mtu parameter for lxc containers already exists
in the backend. It just has to be exposed in the web UI as well.

Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
Reviewed-by:  Stefan Hanreich <s.hanreich@proxmox.com>
Tested-by:  Stefan Hanreich <s.hanreich@proxmox.com>
2 weeks agoui: vm network: allow to override MTU for virtio devices
Oguz Bektas [Wed, 9 Nov 2022 15:37:09 +0000 (16:37 +0100)]
ui: vm network: allow to override MTU for virtio devices

we already have the 'mtu' option in the API, so we can just expose
that option inside the 'Advanced' menu for virtio network interfaces.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
Moved the message tooltip below the advanced columns to avoid the line
break and make it more visually pleasing.

Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
2 weeks agobump version to 7.2-13
Thomas Lamprecht [Wed, 16 Nov 2022 17:33:33 +0000 (18:33 +0100)]
bump version to 7.2-13

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 weeks agod/control: bump qemu-server dependency to 7.2-8
Thomas Lamprecht [Wed, 16 Nov 2022 11:42:04 +0000 (12:42 +0100)]
d/control: bump qemu-server dependency to 7.2-8

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 weeks agovzdump: send mail if job-abort hook fails
Fiona Ebner [Wed, 16 Nov 2022 08:30:14 +0000 (09:30 +0100)]
vzdump: send mail if job-abort hook fails

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2 weeks agofix #4351: vzdump: send mail if job-end hook fails with mailnotification=failure
Fiona Ebner [Wed, 16 Nov 2022 08:30:13 +0000 (09:30 +0100)]
fix #4351: vzdump: send mail if job-end hook fails with mailnotification=failure

Since all tasks succeeded, previously no mail was sent in that case.

Note that the error passed to $self->sendmail() is added to the
subject of the mail if it is a single line or the beginning of the
mail otherwise. Thus changing the mail slightly compared to previously
for the case where the job-start hook fails and the case where the
job-end hook fails with mailnotification=always. But can be considered
an improvement, because the user sees the error right away.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2 weeks agoui: backup job edit: fix form reset tracking
Dominik Csapak [Tue, 15 Nov 2022 13:23:12 +0000 (14:23 +0100)]
ui: backup job edit: fix form reset tracking

When the mode changes, we set the pool selector visible/hidden, but
we never disabled/enabled it. This tripped up the dirty state of the
form always showing the reset button as enabled.

Properly enabling and disabling the pool field fixes the dirty state
tracking.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 weeks agoui: lxc/qemu: cpu edit: make cpuunits depend on node's cgroup version
Fiona Ebner [Thu, 10 Nov 2022 14:37:47 +0000 (15:37 +0100)]
ui: lxc/qemu: cpu edit: make cpuunits depend on node's cgroup version

so that the default value and limits actually correspond to what will
be used. Defaults to values for cgroup v2, because that is the more
common scenario.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2 weeks agocluster resources: add cgroup-mode to node properties
Fiona Ebner [Thu, 10 Nov 2022 14:37:46 +0000 (15:37 +0100)]
cluster resources: add cgroup-mode to node properties

so the frontend has the information readily available.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2 weeks agopvestatd: broadcast static node information
Fiona Ebner [Thu, 10 Nov 2022 14:37:45 +0000 (15:37 +0100)]
pvestatd: broadcast static node information

Planned to be used for static resource scheduling in the HA manager.

It's enough to broadcast the values whenever they are outdated or not
set in the node's local kv store, because pmxcfs will re-broadcast the
local kv store whenever the quorate partition changes. This is already
relied upon for the 'ceph-versions' kv pair.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2 weeks agoapi: backup info: make "name" property truly optional in response struct
Thomas Lamprecht [Tue, 15 Nov 2022 13:07:09 +0000 (14:07 +0100)]
api: backup info: make "name" property truly optional in response struct

avoid returning a nullish/undef value if not specified

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 weeks agoapi: backup info: code/style cleanup/rework/modernization
Thomas Lamprecht [Tue, 15 Nov 2022 13:06:42 +0000 (14:06 +0100)]
api: backup info: code/style cleanup/rework/modernization

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 weeks agoapi: backup info: drop querying rrd_dump, not used
Thomas Lamprecht [Tue, 15 Nov 2022 13:05:57 +0000 (14:05 +0100)]
api: backup info: drop querying rrd_dump, not used

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 weeks agoapi: backup info: rework get_included_vmids code style
Thomas Lamprecht [Tue, 15 Nov 2022 13:04:29 +0000 (14:04 +0100)]
api: backup info: rework get_included_vmids code style

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 weeks agoapi vzdump: split/sort module usage
Thomas Lamprecht [Tue, 15 Nov 2022 12:48:51 +0000 (13:48 +0100)]
api vzdump: split/sort module usage

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 weeks agoapi: vzdump: also check for default storage permission
Fiona Ebner [Tue, 15 Nov 2022 12:33:05 +0000 (13:33 +0100)]
api: vzdump: also check for default storage permission

Acked-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2 weeks agoapi: backup: auto-inject job id where expected by the API
Fiona Ebner [Tue, 15 Nov 2022 10:18:29 +0000 (11:18 +0100)]
api: backup: auto-inject job id where expected by the API

for backwards compatibility. Otherwise, e.g. listing backup jobs with
pvesh get /cluster/backup is broken. And suddenly not having the
property anymore would be a breaking API change.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2 weeks agod/control: bump versioned dependency to pve-doc-generator
Thomas Lamprecht [Mon, 14 Nov 2022 19:35:26 +0000 (20:35 +0100)]
d/control: bump versioned dependency to pve-doc-generator

ensuring that the onlineHelp reference parser is new enough to not
choke on widget-toolkit.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 weeks agofix #4328: ui: add widget toolkit to dependencies of OnlineHelpInfo.js
Stefan Sterz [Mon, 14 Nov 2022 11:38:28 +0000 (12:38 +0100)]
fix #4328: ui: add widget toolkit to dependencies of OnlineHelpInfo.js

previously the widget toolkit was not scanned when creating the
mapping between `onlineHelp` keys and pve-doc anchors. this could
lead to cases where help buttons didn't work because the necessary
mapping wasn't present in `OnlineHelpInfo.js`.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2 weeks agobump version to 7.2-12
Thomas Lamprecht [Sat, 12 Nov 2022 16:03:20 +0000 (17:03 +0100)]
bump version to 7.2-12

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 weeks agojob manager: run cfs_update before starting a job
Thomas Lamprecht [Sun, 13 Nov 2022 14:57:24 +0000 (15:57 +0100)]
job manager: run cfs_update before starting a job

we may want to even do this only once, before the loop, but for now
this is basically the same as it was previously but avoids the need
for every (future) plugin to do this manually; which is just the
wrong place.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 weeks agod/control: bump versioned dependencies for pve-common & pve-guest-common
Thomas Lamprecht [Sat, 12 Nov 2022 15:57:51 +0000 (16:57 +0100)]
d/control: bump versioned dependencies for pve-common & pve-guest-common

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 weeks agojobs: move base registry to pve-common & split vzdump base out to guest-common
Thomas Lamprecht [Sat, 12 Nov 2022 15:56:23 +0000 (16:56 +0100)]
jobs: move base registry to pve-common & split vzdump base out to guest-common

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 weeks agoupdate shipped aplinfo
Thomas Lamprecht [Fri, 11 Nov 2022 16:37:33 +0000 (17:37 +0100)]
update shipped aplinfo

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 weeks agoui: qemu: increase available usb ports depending on machine and ostype
Dominik Csapak [Thu, 10 Nov 2022 14:36:00 +0000 (15:36 +0100)]
ui: qemu: increase available usb ports depending on machine and ostype

in the backend, we allow up to 14 usb ports, but only if the vm can
use the qemu-xhci controller which is only possible since machine
version 7.1 and if the ostype is l26 or windows > 7

for this we introduce two helpers:
* qemu_min_version: modeled after the signature of 'min_version' from
  qemu-server, expects two arrays of versions and returns true if
  the first parameter is equal or greater than the second version
* get_max_usb_count looks at the given ostype and machine string
  and returns the proper maximum number

since we don't currently have the actual running version of the vm in
the gui, this is only a heuristic for running vms. but since the actual
running version could only be lower if none is set (e.g. for
migrated/long-running vms) we allow more in the gui and the backend will
do the proper thing (either hotplug it, or make it a pending change)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 weeks agoui: USBInputPanel: use correct maximum usb index
Dominik Csapak [Thu, 10 Nov 2022 14:35:59 +0000 (15:35 +0100)]
ui: USBInputPanel: use correct maximum usb index

We already have that factored out in PVE.Utils, so use that.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 weeks agod/control: drop ${shlibs:Depends} for pve-manager
Fiona Ebner [Fri, 21 Oct 2022 13:02:52 +0000 (15:02 +0200)]
d/control: drop ${shlibs:Depends} for pve-manager

Now that the pvemailforward binary was dropped, there is a lintian
warning that it's not defined anymore.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2 weeks agoremove pvemailforward binary
Fiona Ebner [Fri, 21 Oct 2022 13:02:51 +0000 (15:02 +0200)]
remove pvemailforward binary

which was replaced by proxmox-mail-forward living in its own package.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2 weeks agod/postinst: replace pvemailforward with proxmox-mail-forward
Fiona Ebner [Fri, 21 Oct 2022 13:02:50 +0000 (15:02 +0200)]
d/postinst: replace pvemailforward with proxmox-mail-forward

proxmox-mail-forward is a new helper binary in Rust intended to behave
essentially the same on PVE installations. It can also handle mixed
PBS+PVE installations.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2 weeks agod/control: depend on proxmox-mail-forward
Fiona Ebner [Fri, 21 Oct 2022 13:02:49 +0000 (15:02 +0200)]
d/control: depend on proxmox-mail-forward

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2 weeks agoMerge branch 'taskset' into taskset-merged
Wolfgang Bumiller [Thu, 10 Nov 2022 08:43:32 +0000 (09:43 +0100)]
Merge branch 'taskset' into taskset-merged