Thomas Lamprecht [Tue, 10 Jan 2023 11:32:35 +0000 (12:32 +0100)]
ui: config panel: ensure onlineHelp mapping targets are validated
our onlineHelp linter is pretty dumb and scans for used help
references heuristically, so add a small indirection to the mapping
of resource tree type to onlineHelp so that it detects those
references and thus enforces that they exists in pve-docs.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
make task log downloadable in the PVE manager backend
The read_tasklog API call now stream the whole log file if the query
parameter 'download' is set to true.
This is done in preparation for the task log download button to be
added in the TaskViewer.
Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com> Tested-by: Stefan Sterz <s.sterz@proxmox.com> Reviewed-by: Stefan Sterz <s.sterz@proxmox.com>
Stefan Hrdlicka [Wed, 14 Dec 2022 12:43:06 +0000 (13:43 +0100)]
fix #2822: add iscsi, lvm, lvmthin & zfs storage for all cluster nodes
This adds a dropdown box for iSCSI, LVM, LVMThin & ZFS storage options where a
cluster node needs to be chosen. As default the current node is
selected. It restricts the the storage to be only availabe on the
selected node.
Signed-off-by: Stefan Hrdlicka <s.hrdlicka@proxmox.com>
Aaron Lauterer [Wed, 21 Dec 2022 13:30:25 +0000 (14:30 +0100)]
api: ceph: sort and update index sub-directory list
The 'cmd-safety', 'configdb' and 'mgr' items were missing, and while
directly calling the API endpoints worked, the api-viewer and pvesh
where partially broken here.
Sort the whole list alphabetically will make it easier to track in
the future
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
[ T: note which items where missing and reword slightly ] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Tue, 6 Dec 2022 11:06:33 +0000 (12:06 +0100)]
ui: realm: sync: don't use realm defaults for remove-vanished
If we don't manually set it to 'none', it will use the realm default,
which might be unexpected. This way, the sync always does what the
user saw in the sync window.
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.
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.
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>
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
Fixes: c8f2cf4c ("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>
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.
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.
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:
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.
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)
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
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
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)
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
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.
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
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>
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.
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/
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>
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>
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
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>
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>
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>
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.
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.
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.
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>