Thomas Lamprecht [Tue, 12 Mar 2024 13:14:00 +0000 (14:14 +0100)]
ui: guest import: add value-dependent warning for live-import
Use a similar text than we do for the live-restore warning and make it
use the pmx-hint CSS class.
Note that the CSS class order is important here as ExtJS automatically
uses the last one in the list here to add a XYZ-default and XYZ-after
class, so if the hint one is the last in the string, then layout gets
broken.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Mon, 11 Mar 2024 14:10:01 +0000 (15:10 +0100)]
ui: guest import: rework to tab panels
instead of putting all options on a single panel, split into 'general'
and 'advanced'
we move all disk/cd/network related grids to the advanced tab, and
introduce a 'default storage' and 'default bridge' selector to the
general tab.
this way, one can import very quickly when the default are fine or
when only the storage/bridge should change, but can still set the
storage/bridges etc. very fine grained.
also we have the possibility to extend the window in the future with
more tabs.
Dominik Csapak [Fri, 8 Mar 2024 14:38:44 +0000 (15:38 +0100)]
ui: add wizard to allow importing from ESXi attached as storage
Add a new 'import' panel for storages supporting the 'import'
content type that shows a list of configs to import.
When opening the wizard, we query the meta info from the new
import-metadata API endpoint, and pre-fill the fields and shows
potential warnings or things to watch out for, returned by the API.
For disks and networks we allow to select which one to use and which
storage/bridge to import to.
Additionally, users can opt-in to a live-import, where the VM is
immediately started and storage requests are fetched from the target
on demand while importing the rest in the background.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
[ TL: some fixes, clean-ups and commit message rewording ] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Wed, 13 Mar 2024 06:28:44 +0000 (07:28 +0100)]
ui: esxi storage edit: make user and password always editable
Those can change somewhat frequently, e.g., as part of credentials
rotation policies.
Keep the 'server' one for now as is, while it can make sense to change
that too, e.g., from IP to FQDN, it's currently uncommon for PVE to
allow that in the UI, if we should evaluate all storage types for such
things and for that we also should improve the re-mount/activate story
in the storage lib.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Fri, 8 Mar 2024 14:33:20 +0000 (15:33 +0100)]
ui: content view: fix use of external static tbar declaration
when using a declarative `tbar` when instantiating a ContentView,
it is a reference and gets pushed into every time.
instead, copy the given tbar into a local variable and use that
this fixes an issue that we push the same components (e.g. search) into
the toolbar whenever we open a view with a new ContentView
(when using declarative tbar)
Thomas Lamprecht [Mon, 19 Feb 2024 16:36:02 +0000 (17:36 +0100)]
ui: storage: enable download-url button with Sys.AccessNetwork capability
Now that the new Sys.AccessNetwork privilege got added to
access-control and the storage download and manager query API
endpoints, the UI should reflect that change and allow opening the
dialogue to download an image from URL also for the users that are
allowed to do so through the new privilege.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Tested-by: Hannes Duerr <h.duerr@proxmox.com> Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Thomas Lamprecht [Mon, 19 Feb 2024 16:27:46 +0000 (17:27 +0100)]
api: nodes: allow usage of query url metadata with Sys.AccessNetwork
This was restricted to Sys.Modify + Sys.Audit on the whole cluster to
ensure that only trusted users get access to a method that can scan
the (local) network from the POV of the Proxmox VE node, even if only
through HTTP HEAD requests.
Nowadays there's enough user interest [0] to warrant a separate access
privilege to cover such an use case, and while most of the requests
are for the download-url storage API endpoint, this method here is not
only a bit less powerful than the storage one, it's rather tied to the
latter anyway (e.g. for querying the metadata of a URL in the web UI
for name and size before downloading it to a storage).
For backwards compatibility keep the old check and add the new
privilege as alternative to fulfill the permission requirements of
that API endpoint.
Thomas Lamprecht [Mon, 26 Feb 2024 15:55:11 +0000 (16:55 +0100)]
api: node status: document boot-info and current-kernel in return schema
I recently added the same info to PMG and added them to the return
schema, so copying them over here comes for free, and while far from
complete but better than nothing.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Tue, 20 Feb 2024 12:40:31 +0000 (13:40 +0100)]
appliance index: rotate update log if bigger than 256 KiB
50 KiB is really tiny and while this log file is not _that_ important,
spending a few KiB more to keep much older logs around is almost
always a win-win situation, now that root storage size is rather some
hundred GB in most setups.
Drop the unused size variable while touching this, which was the
actual thing that made me look closer here.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Fiona Ebner [Thu, 15 Feb 2024 12:59:30 +0000 (13:59 +0100)]
ui: node: system: avoid using 'Syslog'
Reported in the community forum [0]. Since Proxmox VE 8/Debian 12,
rsyslog is not installed by default for new installations anymore [1].
The information gathered by the API call comes from the systemd
journal. While 'Syslog' could be interpreted as a shorthand for
"System Log", it's better to be explicit to avoid any confusion.
In addition, the systemd journal does much more than plain syslog
messages, as argued by Fabian [2].
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
[TL: Mention and link to Fabian's argument ] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Max Carrara [Mon, 5 Feb 2024 17:54:16 +0000 (18:54 +0100)]
ceph: fix edge case of wrong files being deleted on purge
Having a file named e.g. "60" in your current directory will cause it
to be deleted when executing `pveceph purge`. This commit fixes that
by making the config hash differ between which values represent file
paths and which don't.
Signed-off-by: Max Carrara <m.carrara@proxmox.com>
Lukas Wagner [Thu, 14 Dec 2023 14:11:54 +0000 (15:11 +0100)]
vzdump: make helper functions for sending notifications private
The helpers were split out from the original 'sendmail' function when
migrating to the new notification system. They are not needed anywhere
else and can thus be private.
Stefan Hanreich [Fri, 22 Dec 2023 09:58:06 +0000 (10:58 +0100)]
postinst: filter rbds in lvm
Since LVM 2.03.15 RBD devices are also scanned by default [1]. This
can lead to guest volumes being recognized and displayed on the host
when using KRBD for RBD-backed disks. In order to prevent this we add
an additional filter to the LVM config to avoid scanning rbds.
This also prevents a bug where LVM created a very high amount of
archive entries when there were logical volumes with the same path
available. This could happen when two guests with RBD disks had the
same LVM layout or a guest and host had the same layout.
previous behavior:
If there is no marker in the LVM conf and global_filter does not
contain '/dev/zd.*': replace the global_filter with our version
new behavior:
Replace the global_filter iff:
- There is no marker and global_filter is empty
- The global_filter is exactly the old default
If we don't replace the filter and it is a non-default value: We print
a warning. Addtionally we force this function to run once when
upgrading from older versions.
The previous versions could replace custom global_filters where the
comment had been removed and the zvol directive removed. The new
behavior is slightly more conservative, but works the same in other
cases.
Lukas Wagner [Fri, 1 Dec 2023 13:24:09 +0000 (14:24 +0100)]
api: replication: allow users to enumerate accessible replication jobs
Previously, the /cluster/replication API handler would fail completely
with a HTTP 403 if a user does have VM.Audit permissions for
a single VM/CT. That was due to the 'noerr' parameter not set for
$rpcenv->check()
Fiona Ebner [Mon, 4 Dec 2023 09:29:56 +0000 (10:29 +0100)]
ui: iso selector: disable all fields to avoid bogus validation
The validation logic of the inner fields from the ISO selector was not
disabled, so a user would need to select a valid storage and ISO file
before being able to make any other choice for the general CD-ROM
drive source (no-media or physical-drive).
Call the parent method to ensure all the inner fields get actually
disabled so that their validators also get disarmed if not relevant.
Reported in the communiy forum:
https://forum.proxmox.com/threads/136960/post-611704
Fixes: fc7b556d ("ui: refactor iso-selector out of the cd input panel") Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
[ TL: add more background to commit message/subject ] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Thu, 23 Nov 2023 10:07:19 +0000 (11:07 +0100)]
ui: pool view: fix editing nested pools
for nested pools we have to provide the pool id via a get parameter
instead of in the path, and also we have to extract the data from the
returned array.
To do this, changet the cbind url handler, remove the autoLoad one,
and handle the load ourselves.
Lukas Wagner [Thu, 23 Nov 2023 09:54:03 +0000 (10:54 +0100)]
ui: perm paths: change /mapping/notification to /mapping/notifications
The ACL path was changed during the notification system rework.
This change adapts the list of predefined ACL paths in the
'Add {User,Group,API Token} Permission' dialog window to reflect
this change.
Dominik Csapak [Thu, 23 Nov 2023 08:25:42 +0000 (09:25 +0100)]
ui: resource tree: remove wrong comment
that function is not only there for the storage indicators, but
generally for adding additional information, such as tags, and for
wrapping in a span for making tooltip selection easier.
Thomas Lamprecht [Wed, 22 Nov 2023 15:07:09 +0000 (16:07 +0100)]
api: node status: cache boot mode info
it's not that expensive but we call the endpoint that returns the boot
mode info very frequently, and EFI vars are provided by the firmware,
and there are lots of known cases where firmware was just a plain
mess.
So, don't risk that overly frequent reads will cause some weird side
effect and rather just cache the whole info, it cannot change without
a reboot anyway.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Stefan Hanreich [Wed, 22 Nov 2023 12:29:51 +0000 (13:29 +0100)]
ipam: send ip to delete endpoint
The ip parameter has been added to the delete endpoint, so only a
specific mapping gets deleted instead of all mappings for that mac
address. Reflect this change in the UI.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
Thomas Lamprecht [Wed, 22 Nov 2023 12:24:43 +0000 (13:24 +0100)]
ui: node summary: reduce noise in current kernel version
use the new 'current-kernel' object returned by the node status API to
render a more useable (less noise) version information.
Keep fallback for old one to better work with upgrades (major and
minor) to this version in a cluster, where the web UI one uses might
be the new one, but a node one looks at still have the old manager.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Lukas Wagner [Tue, 21 Nov 2023 12:52:37 +0000 (13:52 +0100)]
vzdump: support 'notification-mode' parameter
This parameter lets us choose between the 'legacy' notification
system (sendmail to some email addresses) and the 'new' notification
system (pub-sub based system with targets and matchers).
'auto' (default) will use the 'legacy' system if a mail address is
provided and the 'new' system if not.
This is allows users to opt-in/opt-out from the new notification
system, which might be a bit chatty by default.
ui: ceph pool edit: rework with controller and formulas
instead of relying purely on listeners that then manually change other
components, we can use binds, formulas and a basic controller.
This makes it quite a bit easier to let multiple components react to
changes.
A cbind is used for the size component to set the initial start value.
Other options, like using setValue in the controller init, will trigger
the change listener and therefore can affect the min size without any
user interaction.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com> Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
fix #2515: ui: ceph pool create: use configured defaults for size and min_size
Instead of hard coded defaults for the size and min_size parameter,
check if we have defaults configured in the ceph.conf or config db and
use those.
There are clusters where different defaults are needed. For example if
the cluster spans two rooms and needs to survive the loss of one. A
size/min_size of 4/2 are common defaults in such a situation.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com> Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This new endpoint allows to get the values of config keys that are
either set in the config db or the ceph.conf file.
Values that are set in the ceph.conf file have priority over values set
in the conifg db via 'ceph config set'.
Expects the --config-keys parameter as a semicolon separated list of
"<section>:<config key>" where the section is a section in the ceph.conf
or config db. For example: global:osd_pool_default_size
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com> Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Tue, 21 Nov 2023 13:16:34 +0000 (14:16 +0100)]
ui: vm wizard: reword label for extra drive for virtio-drivers
while a user can attach anything, we change the defaults for, e.g.,
scsi controller or network to virtio if this is ticked, so try to hint
that a bit better
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>