Commit Graph

6492 Commits

Author SHA1 Message Date
Dominik Csapak
b7f4cb7cf9 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>
2022-11-17 18:20:12 +01:00
Dominik Csapak
1f6d7f7fbf 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>
2022-11-17 18:16:43 +01:00
Dominik Csapak
d18b69822e 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>
2022-11-17 18:16:24 +01:00
Thomas Lamprecht
4523e5c6db 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>
2022-11-17 11:56:26 +01:00
Thomas Lamprecht
ea9b86f81f 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>
2022-11-17 11:53:57 +01:00
Thomas Lamprecht
5c63f8a1fe ui: qemu hardware: fix eslint error
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-17 10:38:05 +01:00
Alexandre Derumier
689410588b 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>
2022-11-17 09:27:17 +01:00
Dominik Csapak
95f624b277 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>
2022-11-17 09:03:26 +01:00
Leo Nunner
ad1d539e43 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>
2022-11-17 08:36:58 +01:00
Fiona Ebner
5f1b4ea387 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>
2022-11-16 20:38:57 +01:00
Stefan Sterz
eba38fa4b2 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>
2022-11-16 20:24:12 +01:00
Stefan Sterz
7818083008 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>
2022-11-16 20:24:12 +01:00
Thomas Lamprecht
8b0bb902e6 ui: qemu monitor: rework comment about how (starting) trimming works
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-16 20:22:07 +01:00
Dominik Csapak
66937c6256 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>
2022-11-16 20:15:14 +01:00
Matthias Heiserer
0c3baeef0b 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>
2022-11-16 20:13:48 +01:00
Daniel Tschlatscher
37985d657c 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>
2022-11-16 20:07:29 +01:00
Daniel Tschlatscher
4e192f9df8 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>
2022-11-16 20:07:22 +01:00
Oguz Bektas
c8f2cf4c1a 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>
2022-11-16 19:55:29 +01:00
Thomas Lamprecht
e46b90149b bump version to 7.2-13
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-16 18:33:33 +01:00
Thomas Lamprecht
b66db67183 d/control: bump qemu-server dependency to 7.2-8
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-16 12:42:04 +01:00
Fiona Ebner
573e832067 vzdump: send mail if job-abort hook fails
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2022-11-16 11:25:58 +01:00
Fiona Ebner
268c642826 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>
2022-11-16 11:25:58 +01:00
Dominik Csapak
2389b2fa05 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>
2022-11-15 14:28:57 +01:00
Fiona Ebner
5a2e333c9e 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>
2022-11-15 14:08:55 +01:00
Fiona Ebner
7060a39316 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>
2022-11-15 14:08:55 +01:00
Fiona Ebner
955912c54e 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>
2022-11-15 14:07:56 +01:00
Thomas Lamprecht
63d389bc51 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>
2022-11-15 14:07:39 +01:00
Thomas Lamprecht
fc9991245f api: backup info: code/style cleanup/rework/modernization
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-15 14:07:39 +01:00
Thomas Lamprecht
730d5a0f42 api: backup info: drop querying rrd_dump, not used
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-15 14:07:39 +01:00
Thomas Lamprecht
0d3f86f2a4 api: backup info: rework get_included_vmids code style
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-15 14:07:39 +01:00
Thomas Lamprecht
2b5f3f98cd api vzdump: split/sort module usage
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-15 14:07:39 +01:00
Fiona Ebner
7a516cbfd1 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>
2022-11-15 13:58:29 +01:00
Fiona Ebner
082e029758 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>
2022-11-15 13:29:34 +01:00
Thomas Lamprecht
16a194d89e 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>
2022-11-14 20:35:27 +01:00
Stefan Sterz
dd6de395dc 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>
2022-11-14 19:51:00 +01:00
Thomas Lamprecht
90a7d2cda9 bump version to 7.2-12
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-13 15:59:32 +01:00
Thomas Lamprecht
8c791952d5 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>
2022-11-13 15:59:32 +01:00
Thomas Lamprecht
e3a1782e34 d/control: bump versioned dependencies for pve-common & pve-guest-common
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-13 15:59:32 +01:00
Thomas Lamprecht
6f2e57c050 jobs: move base registry to pve-common & split vzdump base out to guest-common
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-12 16:59:38 +01:00
Thomas Lamprecht
42a6d6cc77 update shipped aplinfo
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-11 17:37:33 +01:00
Dominik Csapak
17dcba38dd 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>
2022-11-10 17:06:41 +01:00
Dominik Csapak
988898a625 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>
2022-11-10 17:06:41 +01:00
Fiona Ebner
380871e59c 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>
2022-11-10 11:56:52 +01:00
Fiona Ebner
de59191b45 remove pvemailforward binary
which was replaced by proxmox-mail-forward living in its own package.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2022-11-10 11:56:47 +01:00
Fiona Ebner
b632562c08 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>
2022-11-10 11:56:45 +01:00
Fiona Ebner
d2c78d138e d/control: depend on proxmox-mail-forward
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2022-11-10 11:56:41 +01:00
Wolfgang Bumiller
310f32b7a9 Merge branch 'taskset' into taskset-merged 2022-11-10 09:43:32 +01:00
Daniel Bowder
9599d1f02e fix #3593: add js input for affinity
Adds a textfield for the affinity value. Delete that affinity value
when the textbox is empty.

Signed-off-by: Daniel Bowder <daniel@bowdernet.com>
2022-11-10 09:42:07 +01:00
Thomas Lamprecht
073bd99f96 apl info: update index to current repository state
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-09 17:57:16 +01:00
Thomas Lamprecht
fb2dc1b5f2 apl info: update index to current repository state
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-09 17:19:43 +01:00