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>
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.
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`.
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>
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)
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.
Stefan Sterz [Tue, 8 Nov 2022 15:01:30 +0000 (16:01 +0100)]
ui: add javascript source to `OnlineHelpInfo.js` prerequisites
by adding the javascript files as prerequisites, the
`OnlineHelpInfo.js` will get re-generated if a new `onlineHelp` key
is used. thus, this avoids an issue were valid keys might not get
mapped correctly because the info in `OnlineHelpInfo.js` wasn't
updated.
Fiona Ebner [Fri, 7 Oct 2022 12:41:54 +0000 (14:41 +0200)]
ui: lxc/qemu: cpu edit: use emptyText for cpuunits
This makes it slightly clearer that it's a default value (not being
written to the config explicitly). It's also in preparation to bind
the default based on the cgroup version, where it's a bit nicer to
bind the emptyText instead of the value (or a user set value would be
overwritten when the binding updates).
Fiona Ebner [Fri, 7 Oct 2022 12:41:53 +0000 (14:41 +0200)]
ui: qemu/lxc: cpu edit: fix 'create' parameter for delete_if_default()
For lxc, commit 53395db1 ("lxc/ResoureEdit: move some cpu fields to
advanced options") made the fields available in the create wizard, so
the comment is also wrong.
Both wizards do a 'delete kv.delete' in their onSubmit() function, so
it didn't actually matter in practice.
Fiona Ebner [Fri, 7 Oct 2022 12:41:52 +0000 (14:41 +0200)]
ui: lxc: cpu edit: drop superfluous delete_if_default
Commit bf96f60d ("use IntegerField from widget toolkit") switched to
using an Promxox IntegerField with 'deleteEmpty: true'. This means
that a value of '' already is removed from 'values' and added to
'delete' before onGetValues() is called here.
Thomas Lamprecht [Wed, 19 Oct 2022 13:12:15 +0000 (15:12 +0200)]
ui: node: rework layout of certificate viewer
Move the raw cert into a fieldset and collapse that by default, also
make it render monospace and pre-wrap whitespace.
Use a inputpanel to get top, col 1/2 & bottom layout so that rsa key
type/size and validity range can be rendered more compactly
n addition to that limit the whole windows height but make it
scrollable, this allows to sanely use the viewer on certs with many
SANs even on small window/browser sizes.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Mon, 10 Oct 2022 14:23:52 +0000 (16:23 +0200)]
ui: node certificate: make panel only vertical scrollable
Otherwise, a browser window breaks the responsive horizontal
flex-flow/grid-column resize, and just displays the vertical scroll
bar instead, which can look a bit odd.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Mon, 10 Oct 2022 08:12:01 +0000 (10:12 +0200)]
ui: node certificate: make parent panel scrollable
The `ACME` panel may be rendered out of sight (overflow) when there
are enough SANs on the upper `Certificates` panel to push it down
enough and the browser/display height is too small.
Enable the `scrollable` config for the parent certificate view panel
to make ExtJS automatically add a scrollbar if the content overflows.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Fiona Ebner [Mon, 3 Oct 2022 13:52:07 +0000 (15:52 +0200)]
vzdump: handle new 'performance' property string
Also generalizes the way vzdump property strings are handled for jobs.
Something similar could be done in VZDump.pm, but there the maxfiles
and prune-backups settings are currently coupled, so a dedicated
parse_performance() is used instead. Can be changed once maxfiles is
dropped.
Thomas Lamprecht [Thu, 15 Sep 2022 05:41:39 +0000 (07:41 +0200)]
ui: ceph: use quincy as new default for fresh installations
Note that we still check the cluster for an already used installation
and will select that, if any, so this is really just for setting up a
completely new cluster.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Aaron Lauterer [Wed, 10 Aug 2022 15:10:19 +0000 (17:10 +0200)]
ui: CephInstallWizard: make first mon node static
Removes the possibility to select the node on which to create the first
monitor in the configuration / initialization step and always sets it to
the current node.
This prevents that a user might select another node on which the Ceph
packages have not yet been installed. If a user did that, they would get
an error, but the Ceph config file would have been written. If the user
then does not select a valid node to create the first mon, but aborts
the wizard, they are greeted with a rados_connect error because the
config file exists, but it does not contain any mon infos that are
needed to connect to the Ceph cluster.
Creating a mon manually will remedy such a situation, but especially for
new users, this behavior is not ideal and confusing.
Dominik Csapak [Fri, 12 Aug 2022 09:29:51 +0000 (11:29 +0200)]
ui: improve form/MDevSelector
by
* showing the (optional) name in front of the type
* making the 'availble' column a bit narrower
* enabling 'cellWrap' for the description
* making the dropdown a bit wider (so all the information can fit)
Jobs: fix scheduling after updating job from a different node
since the jobs are configured clusterwide in pmxcfs, a user can use any
node to update the config of them. for some configs (schedule/enabled)
we need to update the last runtime in the state file, but this
is sadly only node-local.
to also update the state file on the other nodes, we introduce
a new 'detect_changed_runtime_props' function that checks and saves relevant
properties from the config to the statefile each round of the scheduler if they
changed.
this way, we can detect changes in those and update the last runtime too.
the only situation where we don't detect a config change is when the
user changes back to the previous configuration in between iterations.
This can be ignored though, since it would not be scheduled then
anyway.
in 'synchronize_job_states_with_config' we switch from reading the
jobstate unconditionally to check the existance of the statefile
(which is the only condition that can return undef anyway)
so that we don't read the file multiple times each round.
Fixes: 0c8d7468 ("fix #4053: don't run vzdump jobs when they change from
disabled->enabled")
Stefan Sterz [Wed, 27 Jul 2022 14:56:11 +0000 (16:56 +0200)]
fix: api2: add return type to nodes/{node}/execute endpoint
since this was missing a proper return type definition the api viewer
couldn't display the endpoint (`retinfs.items` was undefined). also
the `pvesh` command would complain that it cannot properly format the
return type because the variable `$item_type` in `CLIFormatter.pm` was
not defined.
Fiona Ebner [Mon, 13 Jun 2022 10:29:55 +0000 (12:29 +0200)]
pvesr: prepare local job: remove stale replicated volumes immediately
Commit d8cd8e8cf9795dc9c2462a67e9ef89ad31759796 introduced a
regression where only stale replicated volumes with an older
timestamp would be cleaned up. This meant that after removing a volume
from the guest config, it would only be cleaned up the second time the
replication ran afterwards. And the volume could become completely
orphaned in case the relevant storage wasn't used by the job anymore.
Thomas Lamprecht [Tue, 26 Jul 2022 10:00:41 +0000 (12:00 +0200)]
ui: datacenter: use "Name" label for respective part of full rp
as contrary to the property name this is actually only the rather
irrelevant part (auth wise) of the whole relying party, the ID is the
other part, and that one actually matters.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Mon, 25 Jul 2022 14:48:29 +0000 (16:48 +0200)]
ui: datacenter: rework webauthn settings UX
Make origin optional, as it actually is, and its not covered by the
challenge anyway.
Also, not the thing we name rp, but the ID is important for the
validity of existing webauthn records, this error comes from the
confusing use of the same named thing in different ways by browsers,
us and the webauthn rust crate...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
ceph-after-pve-cluster: enable for ceph-volume, disable for ceph-disk
The ceph-disk service seems to have been removed with octopus (v15) and
we did not yet have them for ceph-volume which could lead to some
startup issues in cases where the pve-cluster service did not start fast
enough.
ui: restore: improve warning for restoring container with same ID
It's not clear to users that the "VM data" includes mount point
volumes including those that are not marked for backup. This is
different from VM restore, where volumes attached at drives not
present in the backup will be kept around as unused volumes.
Several (supposedly newer) users got tripped up by this over the
years, the latest report being [0]. The long term plan is to make the
restore dialog more flexible to be able to select actions for disks
individually, but that will take a bit of time. In the mean time, make
the warning more explicit.
Fabian Ebner [Mon, 27 Jun 2022 12:42:42 +0000 (14:42 +0200)]
ui: manual backup: unescape notes template on load
It's escaped in the API result and will be re-escaped upon submit,
leading to confusion as reported in the community forum:
https://forum.proxmox.com/threads/110747/post-480507
Fixes: c4dca88b ("ui: manual backup: also set notes-template default") Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>