Commit 114e5f2c ("pve7to8: sync over from stable-7 branch")
accidentally got rid of the correct value 0 here and also the new TODO
message to improve the situation. But the TODO is actually easy,
because there already is the $upgraded variable. Just rely on that
instead of hard-coding and forgetting about it again.
Max Carrara [Wed, 5 Jul 2023 18:02:40 +0000 (20:02 +0200)]
fix #4364: pveceph: add confirmation dialogue for ceph installation
Displays a confirmation dialogue if the user didn't explicitly
provide a valid ceph version via the `--version` flag and if
stdout is connected to a tty.
Signed-off-by: Max Carrara <m.carrara@proxmox.com>
fix #4551: ui: use gettext on hardcoded byte units
Since some languages translate byte units like 'GiB' or write them in their
own script, this patch wraps units in the `gettext` function.
While most occurrences of byte strings can be translated within the
`format_size` function in `proxmox-widget-toolkit/src/Utils.js`, this patch
catches those instances that are not translated.
Dominik Csapak [Thu, 22 Jun 2023 12:15:12 +0000 (14:15 +0200)]
ui: migrate: fix disabled migrate button glitch
under certain circumstances, the migrate button stays disabled, even
when a valid target node was selected:
* the first node that gets autoselected (most likely the second)
is not a valid migration target
* the user changes to a migration target that is a valid one
if that happens, the migration button would stay disabled.
switching once to a non valid target and would enable the button.
To fix it, we have to do two things here:
'checkQemuPreconditions' is actually an async function that awaits an
api call and uses the result to set the 'migration.allowedNodes'
property
'checkMigratePreconditions' calls 'checkQemuPreconditions' and uses the
'migration.allowedNodes' property afterwards.
but since 'checkMigratePreconditions' is not async, that happens before
the api call can return the valid data and thus leaves it empty, making
all nodes valid in the selector. (thus the initial selected node is
valid)
instead make 'checkMigratePreconditions' also async and await the result
of 'checkQemuPreconditions'
this unearthed another issue, namely we access an object that is
possibly undefined (worked out before due to race conditions) so
fallback to an empty object.
and lastly, since we want the 'disallowedNodes' set before actually
checking the qemu preconditions, we move the setting of that on
the node selector above the qemu preconditions check
(this is the only place where we set it anyway, and the source does not
change, we probably could move that out of that function altogether)
Stoiko Ivanov [Wed, 21 Jun 2023 17:35:57 +0000 (19:35 +0200)]
pve7to8: add check for systemd-boot presence where needed
since the package won't get installed for systems upgraded from 7 to 8
we warn users who need systemd-boot - to be able to initialize new
ESPs - that they need to install it
The check for package installation is based on existance of the
changelog, since the package information used in pve7to8 comes from
the API-modules, which limit it to the pve-relevant packages.
tested in VMs with uefi and legacy mode, with existing
proxmox-boot-uuids both with and w/o systemd-boot being installed
Fiona Ebner [Wed, 21 Jun 2023 15:02:01 +0000 (17:02 +0200)]
pve7to8: avoid confusing warning about required setting 'storage' for vzdump
It's required in the schema for notes-template and protected, but when
parsing vzdump.conf, it shouldn't matter whether the storage parameter
is set or not.
The warning is ugly and users might interpret it as something that
needs to be acted upon for the upgrade:
parse error in '/etc/vzdump.conf' - 'storage': missing property - 'notes-template' requires this property\nmissing property - 'protected' requires this property
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
(cherry picked from commit 517abd0cd28a613598e2a3a8d5d8d057578c14b6) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Friedrich Weber [Thu, 15 Jun 2023 13:22:31 +0000 (15:22 +0200)]
pve7to8: content-dirs check: skip paths that cannot be resolved
The current inequality check for content-dirs does not correctly
handle the case in which `abs_path` returns undef. This can result in
confusing warnings:
storage [...] uses directory for multiple content types [...]
Fix this by skipping paths for which `abs_path` returns undef. This
matches the behavior of the actual content-dirs check in PVE 8 [0].
Fixes: ea0a4f1943ffafe94282afc800d5720db45df198 Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
(cherry picked from commit 20fb9aa3f15f9d3ef89bfc3784d72a791c55b757) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Wed, 21 Jun 2023 10:05:09 +0000 (12:05 +0200)]
api: resource usb mapping: add missing proxyto_callback
i have added it to the pci api call, but forgot to add it for usb
otherwise adding a mapped usb device only works on the node where the
gui is connected to
Dominik Csapak [Wed, 21 Jun 2023 07:41:42 +0000 (09:41 +0200)]
ui: pci/usb mapping: rework mapping panel for better user experience
by removing the confusing buttons in the toolbar and adding them as
actions in an actioncolumn. There a only relevant actions are visible
and get a more expressive tooltip
with this, we now differentiate between 4 modes of the edit window:
* create a new mapping altogether
- shows all fields
* edit existing mapping on top level
- show only 'global' fields (comment, mdev), so no mappings
* add new host mapping
- shows nodeselector, mapping (and mdev, but disabled)
(informational only)
* edit existing host mapping
- show selected node (displayfield) mdev and mappings, but only
mappings are editable
we have to split the nodeselector into two fields, since the disabling
cbind does not pass through to the editconfig (and thus makes the form
invalid if we try that)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Wed, 21 Jun 2023 07:41:39 +0000 (09:41 +0200)]
ui: pci map edit: reintroduce warnings checks
they got lost in my last rebase/refactor.
the onLoadCallBack is used to check by the window if there are iommu
groups at all, and the checkIsolated function checks if the selected
ones are in a separate group (in regards to the other devices)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Mon, 19 Jun 2023 09:13:34 +0000 (11:13 +0200)]
d/postinst: actively remove pvetest repository (added for beta) again
in theory we'd need to be more cautios but this was added only during
beta, which is when we do not really provided any stability
guarantee, further, it's rather unlikely that one added very
important repos that, when removed, break something (again *during*
beta).
The new APT repo management makes it also easy to see when one does
not gets any PVE updates, and one can add the pvetest repo there
again easily too.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Mon, 19 Jun 2023 09:13:33 +0000 (11:13 +0200)]
ui: pci map edit: make top fields more clear
by
* moving the node to the left column and changing the label
* moving the mdev filter to the right column
* show only the create button for new node mappings (otherwise we'd have
a reset button here that cannot do anything useful)
Dominik Csapak [Mon, 19 Jun 2023 09:13:32 +0000 (11:13 +0200)]
ui: multi pci selector: indent functions multifunction devices
when there is more than one function for a device, indent the individual
functions. This sets them visually apart from the 'pass all through as
one' entry
We have to use a html entity here, as extjs trims the normal whitespace.
Dominik Csapak [Fri, 16 Jun 2023 13:05:39 +0000 (15:05 +0200)]
ui: allow configuring pci and usb mapping
uses the new ResourceMapTree to add the CRUD interfaces for the
mappings.
We add both of them into a single panel, since the datacenter menu
already has many entries, and without a proper summary for the group, we
cannot really put them in a category
Dominik Csapak [Fri, 16 Jun 2023 13:05:36 +0000 (15:05 +0200)]
ui: add edit window for pci mappings
This contains the window to edit a PCI mapping for a single host.
It is designed to work in 3 modes:
* without an id and a nodename: for new mappings
* with an id but without nodename: for adding new host mappings to an
existing one
* with id and nodename: when editing an existing host mapping
Dominik Csapak [Fri, 16 Jun 2023 13:05:35 +0000 (15:05 +0200)]
ui: form: add MultiPCISelector
this is a grid field for selecting multiple pci devices at once, like we
need for the mapped pci ui. There we want to be able to select multiple
devices such that one gets selected automatically
we can select a whole slot here, but that disables selecting the
individual functions of that device.
Dominik Csapak [Fri, 16 Jun 2023 13:05:33 +0000 (15:05 +0200)]
ui: qemu/PCIEdit: rework panel to add a mapped configuration
reworks the panel to use a controller, so that we can easily
add the selector for mapped pci devices
shows now a selection between 'raw' and 'mapped' devices, where
'raw' ones work like before, and 'mapped' ones take the values
form the hardware map config
Dominik Csapak [Fri, 16 Jun 2023 13:05:28 +0000 (15:05 +0200)]
api: add resource map api endpoints for PCI and USB
this adds the typical section config crud API calls for
USB and PCI resource mapping to /cluster/mapping/{TYPE}
the only special thing that this series does is the list call
for both has a special 'check-node' parameter that uses the
'proxyto_callback' to reroute the api call to the given node
so that it can check the validity of the mapping for that node
in the future when we e.g. broadcast the lspci output via pmxcfs
we drop the proxyto_callback and directly use the info from
pmxcfs (or we drop the parameter and always check all nodes)
Dominik Csapak [Wed, 14 Jun 2023 08:46:07 +0000 (10:46 +0200)]
pvesh: fix parameters for proxyto_callback
in pve-http-server the proxyto_callback always has a complete list of
parameters, not only the ones in the url, so adapt the implementation
here to do the same
Thomas Lamprecht [Wed, 14 Jun 2023 15:37:45 +0000 (17:37 +0200)]
ui: realm sync job: clarify the function of the two enable checkboxes
Most of the time this isn't an issue for job edits, but here we have
two "enable" checkboxes that control enabling newly synced users and
enabling the job itself, try to be absolutely clear on both to avoid
potential confusion.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Wed, 14 Jun 2023 15:33:38 +0000 (17:33 +0200)]
ui: realm: clarify that the sync jobs really are for the realm
it's somewhat redundant as onbe is already at the realm view, but for
panel titles it slightly helps if one doesn't have to string together
such "clues" oneself, i.e., it's easier to see where one is - e.g.,
if switching from some other task back to the web UI again, and we
have enough space here, so we ain't winning anything if keeping it
short.
Also add an emptyText to the grid, mostly as view's without anything
always look a bit off (like an error happened on load and one forgot
to mask)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
One must not call gettext on the already formatted string, as we
cannot translate it for any possible value, rather the format string
it self needs to be gettext'd, then the translator can position the
variable template placeholders however it's correct for their
language without having to care about any value this could be called
with.
Fixes: d057929f ("ui: user view: fix calling order of gettext") Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Christoph Heiss [Thu, 23 Mar 2023 11:02:47 +0000 (12:02 +0100)]
ui: qga: Add option to turn off QGA fs-freeze/-thaw on backup
Adds a default-on checkbox to the QEMU Guest Agent feature selector
controlling the 'fs-freeze-on-backup' option. If unchecked, an
additional warning is displayed that backups can potentially corrupt
with this setting off.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>