]> git.proxmox.com Git - pve-manager.git/log
pve-manager.git
2 months agobump version to 8.1.8
Thomas Lamprecht [Wed, 27 Mar 2024 13:33:52 +0000 (14:33 +0100)]
bump version to 8.1.8

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agod/control: bump versioned dependencies for libpve-storage-perl
Thomas Lamprecht [Wed, 27 Mar 2024 13:36:00 +0000 (14:36 +0100)]
d/control: bump versioned dependencies for libpve-storage-perl

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoguest import: validate that selected VMID does not exist yet
Thomas Lamprecht [Wed, 27 Mar 2024 13:31:34 +0000 (14:31 +0100)]
guest import: validate that selected VMID does not exist yet

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoguest import: fine tune icons
Thomas Lamprecht [Wed, 27 Mar 2024 11:44:40 +0000 (12:44 +0100)]
guest import: fine tune icons

We switched the storage browser navigation entry to 'Virtual Guests'
recently, but still used the icon for import.

For now switch to use to the one for VMs for this entry, matching the
label, and use the import icon for the "Import" button instead.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: guest import: use box-label style for prepare-for-virtio checkbox
Thomas Lamprecht [Wed, 27 Mar 2024 10:45:31 +0000 (11:45 +0100)]
ui: guest import: use box-label style for prepare-for-virtio checkbox

Aaron originally designed the new "unique MAC address" checkbox after
this one for alignment reasons [0]. I changed it and argued that's
fine if there is a misalignment between those components [1], which I
still think, but tbh. I also like the boxLabel more for the "Prepare
for VirtIO" checkbox, so lets use it there too and hope all are happy
again.

[0]: https://lists.proxmox.com/pipermail/pve-devel/2024-March/062411.html
[1]: https://lists.proxmox.com/pipermail/pve-devel/2024-March/062412.html

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: guest import: fix internal name for the prepare-for-virtIO feature
Thomas Lamprecht [Wed, 27 Mar 2024 10:40:21 +0000 (11:40 +0100)]
ui: guest import: fix internal name for the prepare-for-virtIO feature

Mapping to SATA is only one thing it does, and what we actually want
to do is preparing for VirtIO, the effects are implementation detail,
so name it after the reason not one specific step.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: network card selector: add Intel E1000E as choosable model
Thomas Lamprecht [Wed, 27 Mar 2024 10:38:39 +0000 (11:38 +0100)]
ui: network card selector: add Intel E1000E as choosable model

it's popular in VMware ESXi and so should be available to choose
directly, avoiding a invalid model field in the import wizard.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: guest import: avoid one indentation level in deeply nested widget tree
Thomas Lamprecht [Wed, 27 Mar 2024 09:50:03 +0000 (10:50 +0100)]
ui: guest import: avoid one indentation level in deeply nested widget tree

best viewed with git show --ignore-space-change

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: guest import: use view-model for unique-mac-addr state
Thomas Lamprecht [Wed, 27 Mar 2024 09:33:41 +0000 (10:33 +0100)]
ui: guest import: use view-model for unique-mac-addr state

Avoid some global widget config to store internal state, rather use
the existing viewModel for that.

Also avoid unnecessary references and switch to a boxLabel, drop also
the tooltip, as that doesn't add much here where the effect can be
seen in the grid.

Avoid reconfiguring all grids if only the network one can have changed
due to a change of this check box value.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: guest import: allow setting mac addresses to unique
Aaron Lauterer [Tue, 26 Mar 2024 13:25:56 +0000 (14:25 +0100)]
ui: guest import: allow setting mac addresses to unique

by adding a new checkbox and render the grid accordingly.

If unique MAC addresses are enabled, set them to undefined when getting
the values from the grid.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 months agoui: parser: recognize e1000e as network card
Wolfgang Bumiller [Tue, 26 Mar 2024 10:18:09 +0000 (11:18 +0100)]
ui: parser: recognize e1000e as network card

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 months agobump version to 8.1.7
Thomas Lamprecht [Fri, 22 Mar 2024 10:54:32 +0000 (11:54 +0100)]
bump version to 8.1.7

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agod/control: bump versioned deps for widget-toolkit and access-control
Thomas Lamprecht [Fri, 22 Mar 2024 15:07:41 +0000 (16:07 +0100)]
d/control: bump versioned deps for widget-toolkit and access-control

to ensure the new password confirmation API and UI is available

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoapi: ceph monitor: rework some code style to modern
Max Carrara [Thu, 14 Mar 2024 10:19:30 +0000 (11:19 +0100)]
api: ceph monitor: rework some code style to modern

Signed-off-by: Max Carrara <m.carrara@proxmox.com>
 [ TL: also improve if-expression wrapping ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agofix #5198: ceph: mon: fix mon existence check in mon removal assertion
Max Carrara [Thu, 14 Mar 2024 10:19:29 +0000 (11:19 +0100)]
fix #5198: ceph: mon: fix mon existence check in mon removal assertion

The Ceph monitor removal assertion contains a condition that checks
whether the given mon ID actually exists and thus may be removed.

The first part of the condition checks whether the hash returned by
`get_services_info` [0] contains the key "mon.$monid". However, the
hash's keys are never prefixed with "mon.", which makes this check
incorrect.

This is fixed by just using "$monid" directly.

The second part checks whether the mon hashes returned by
Ceph contain the "name" key before comparing the key with the given
mon ID. This key existence check is also incorrect; in particular:
  * If the lookup `$_->{name}` evaluates to e.g. "foo", the check
    passes, because "foo" is truthy. [1]
  * If the lookup `$_->{name}` evaluates to "0", the check fails,
    because "0" is falsy (due to it being equivalent to the number 0,
    according to Perl [1]).

This is solved by using the inbuilt `defined()` instead of relying on
Perl's definition of truthiness.

[0]: https://git.proxmox.com/?p=pve-manager.git;a=blob;f=PVE/Ceph/Services.pm;h=e0f31e8eb6bc9b3777b3d0d548497276efaa5c41;hb=HEAD#l112
[1]: https://perldoc.perl.org/perldata#Scalar-values

Fixes: https://bugzilla.proxmox.com/show_bug.cgi?id=5198
Signed-off-by: Max Carrara <m.carrara@proxmox.com>
2 months agoui: vm: guest-agent network view: make text in grid selectable
Aaron Lauterer [Thu, 21 Mar 2024 09:25:32 +0000 (10:25 +0100)]
ui: vm: guest-agent network view: make text in grid selectable

This makes it possible to select any of the IP addresses listed in the
full view window to copy & paste it.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
 [ TL: reworked subject ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: user: password change: require a confirmation-password
Wolfgang Bumiller [Fri, 15 Mar 2024 12:47:43 +0000 (13:47 +0100)]
ui: user: password change: require a confirmation-password

To hedge against a scenario where an attacker has local or even
physical access to a computer where a user is logged in.

While that general scenario cannot neither get detected nor really
secured against, at least not without requiring re-authentication on
every API call that can have side-effect (i.e., all but GET method),
it still makes sense to ensure that credentials cannot be modified,
which would allow denial of service.

See the related pve-access-control commit 5bcf553 ("user: password
change: require confirmation-password parameter")

Reported-by: Wouter Arts <security@wth-security.nl>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 months agoui: parse VM network: support floats without trailing zero
Thomas Lamprecht [Thu, 21 Mar 2024 09:40:35 +0000 (10:40 +0100)]
ui: parse VM network: support floats without trailing zero

While on simple cases the frontend will translate a `.5` to `0.5` the
backend really doesn't care and takes either.
And it seems that editing from an exiting `0.5` to `.75` will often
cause this to submitted as is.

Independent of how such a value comes into the config, it broke parsing
the network rate property in the UI, where we assumed that there's
always a digit on the left side of the floating point separator.

Simply extend the regex to allow parsing those floats that directly
start with a separator too.

Link: https://forum.proxmox.com/threads/143525/
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: guest import: add warning for losing efi state
Dominik Csapak [Tue, 19 Mar 2024 13:00:32 +0000 (14:00 +0100)]
ui: guest import: add warning for losing efi state

and add a link to recreate the boot entries in ovmf

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ TL: break up String.format to avoid overly long line ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: guest import: correctly set default scsihw value
Dominik Csapak [Tue, 19 Mar 2024 13:00:31 +0000 (14:00 +0100)]
ui: guest import: correctly set default scsihw value

we have to set it to '__default__' if we didn't get one from the API

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ TL: fix-up eslint warning ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: guest import: auto activate virtio preparation for win + ovmf
Dominik Csapak [Tue, 19 Mar 2024 13:00:30 +0000 (14:00 +0100)]
ui: guest import: auto activate virtio preparation for win + ovmf

it seems on esxi, most windows vms with uefi are automatically
configured with an lsi scsi controller, which we can't currently support
(ovmf driver issue) so automatically activate the sata mapping + virtio
preparation in this case

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: guest import: fix isWindows check
Dominik Csapak [Tue, 19 Mar 2024 13:00:29 +0000 (14:00 +0100)]
ui: guest import: fix isWindows check

while most of our 'windiows' ostypes start with 'win' not all of them do
(wxp, wvista), so just shorten the condition to 'starts with `w`', this
covers all our windows ostypes, while not including others.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agofix #5293: ceph status: fix division-by-zero when calculating usage
Christoph Heiss [Tue, 12 Mar 2024 09:13:46 +0000 (10:13 +0100)]
fix #5293: ceph status: fix division-by-zero when calculating usage

Fixes #5293 [0]. This happens when no OSDs are created yet and thus the
total space is 0, which leads to a division-by-zero.

Add a simple check if the total space is greater than 0.

[0] https://bugzilla.proxmox.com/show_bug.cgi?id=5293

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agobump version to 8.1.6
Thomas Lamprecht [Thu, 14 Mar 2024 14:26:40 +0000 (15:26 +0100)]
bump version to 8.1.6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: guest import: avoid view-model race on setting os type
Thomas Lamprecht [Wed, 13 Mar 2024 13:52:31 +0000 (14:52 +0100)]
ui: guest import: avoid view-model race on setting os type

Use the default value of the field also as start value in the
viewModel, as other wise the two-way binding can cause the empty
string to be set to the field's value, not vice-versa.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: guest import: fine-tune text on labels and button
Thomas Lamprecht [Wed, 13 Mar 2024 13:50:15 +0000 (14:50 +0100)]
ui: guest import: fine-tune text on labels and button

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: storage browser: add item double-click handler for guest import
Thomas Lamprecht [Wed, 13 Mar 2024 13:47:13 +0000 (14:47 +0100)]
ui: storage browser: add item double-click handler for guest import

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: import: fix top-padding of CD-ROM label
Thomas Lamprecht [Wed, 13 Mar 2024 12:01:45 +0000 (13:01 +0100)]
ui: import: fix top-padding of CD-ROM label

While it was required before commit ca9dce9e8 ("ui: guest import:
rework windows virtio-scsi preparation") to avoid making this crowded,
after that commit we already got the top-padding from the columnT
here, so no need for adding extra padding to that.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: import: improve grouping of fields with more spacers
Thomas Lamprecht [Wed, 13 Mar 2024 11:59:28 +0000 (12:59 +0100)]
ui: import: improve grouping of fields with more spacers

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: import: increase CPU limits to better match ESXi
Thomas Lamprecht [Wed, 13 Mar 2024 11:54:06 +0000 (12:54 +0100)]
ui: import: increase CPU limits to better match ESXi

On ESXi one can have at max 768 vCPUs and that over maximal 128
sockets. Further, by default ESXi will favor adding single-cpu
sockets, so if one just enters "give me 8 vCPUs", it will be 8
single-core sockets.

As we only supported up to 4 sockets in the web UI, which caused this
field to show up as invalid on initial load for such VMs, which is not
nice.

Having that many sockets is rather odd, so for us it doesn't make
sense to allow more than the ESXi limit that, but having more vCPUs
might make sense, so allow up to 1024 for that for now.

Note that QEMU and our API backend doesn't really cares, the kernels
NR_MAX_CPU is the limit there. Albeit it is questionable if using more
vCPU threads as there are host threads has some sense in any setup.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: guest import: rework windows virtio-scsi preparation
Dominik Csapak [Wed, 13 Mar 2024 08:35:57 +0000 (09:35 +0100)]
ui: guest import: rework windows virtio-scsi preparation

instead of having a separate iso selector that shows with an enabled
checkbox, just add a CDROM drive when windows is selected and there is
no such drive available yet.
The idea here is that the VM's OS is already fully set up, so a single
CDROM drive is enough to be used for installing VirtIO drivers, unlike
the VM create case, where the first one is already used for the
installation medium.

Also, rename the 'map to sata' checkbox to 'prepare for virtio-scsi'
that also changes the scsi controller to virtio-scsi-single

Additionally, change the positioning of the checkbox/scsihw selector
to be below the disk grid
With that we then only disable prepare-for-virtio checkbox for
non-windows OS types, as the scsi controller on the right looks like
it hangs in the air without any field on the left otherwise.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ TL: rework commit message, squash in some fixes ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: guest import: style clean-ups
Thomas Lamprecht [Wed, 13 Mar 2024 07:16:47 +0000 (08:16 +0100)]
ui: guest import: style clean-ups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: guest import: prevent accidental form field submission on second panel
Dominik Csapak [Tue, 12 Mar 2024 14:13:36 +0000 (15:13 +0100)]
ui: guest import: prevent accidental form field submission on second panel

by overwriting the onGetValues to always return nothing

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 months agoui: guest import: add checkbox for virtio drive
Dominik Csapak [Tue, 12 Mar 2024 14:12:39 +0000 (15:12 +0100)]
ui: guest import: add checkbox for virtio drive

similar to what we have in the wizard.

in the case we cannot find a suitable slot (ide0/2, sata0-6), we
continue, but print a warning into the javascript log

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 months agoui: iso selector: make labelWidth and Align configurable
Dominik Csapak [Tue, 12 Mar 2024 14:10:12 +0000 (15:10 +0100)]
ui: iso selector: make labelWidth and Align configurable

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 months agoui: guest import: add field for scsi controller
Dominik Csapak [Tue, 12 Mar 2024 13:37:01 +0000 (14:37 +0100)]
ui: guest import: add field for scsi controller

so that one can overwrite it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 months agoui: guest import: implement 'map-to-sata' checkbox
Dominik Csapak [Tue, 12 Mar 2024 13:25:39 +0000 (14:25 +0100)]
ui: guest import: implement 'map-to-sata' checkbox

this is useful when wanting to change to virtioscsi for windows vms,
since we cannot have multiple different scsi controllers.

we assume here that all assigned sata disks/cds have a continuous range,
so sata0, sata1, etc. without any holes

with that assumption, we can use the maximum sata index and simply put
the scsi ones after that.

when there are too many disks to map correctly to sata, show a warning
with the disk id that contains a tooltip.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 months agoui: guest import: fine-tune paddings and heights in advanced tab
Thomas Lamprecht [Tue, 12 Mar 2024 13:21:09 +0000 (14:21 +0100)]
ui: guest import: fine-tune paddings and heights in advanced tab

To make the UI appear slightly less crowded

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: guest import: add value-dependent warning for live-import
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>
2 months agoui: guest import: add text for guest-is-running warning
Thomas Lamprecht [Tue, 12 Mar 2024 13:13:36 +0000 (14:13 +0100)]
ui: guest import: add text for guest-is-running warning

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: guest import: update text for cdrom-image-ignored warning
Thomas Lamprecht [Tue, 12 Mar 2024 13:13:01 +0000 (14:13 +0100)]
ui: guest import: update text for cdrom-image-ignored warning

one can now override this already in the import UI's Advanced tab.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: guest import: handle new disk api format
Dominik Csapak [Mon, 11 Mar 2024 14:35:49 +0000 (15:35 +0100)]
ui: guest import: handle new disk api format

and render the size if we have it (for disks that make sense)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 months agoui: guest import: add config tab
Dominik Csapak [Mon, 11 Mar 2024 14:15:24 +0000 (15:15 +0100)]
ui: guest import: add config tab

that shows the current config. Recalculates whenever one changes to its
tab

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 months agoui: guest import: move live import checkbox into panel
Dominik Csapak [Mon, 11 Mar 2024 14:14:27 +0000 (15:14 +0100)]
ui: guest import: move live import checkbox into panel

From the footer-bar, so make it a bit more apparent, and also to add
the 'Experimental' text to it.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 months agoui: guest import: make window wider
Dominik Csapak [Mon, 11 Mar 2024 14:13:36 +0000 (15:13 +0100)]
ui: guest import: make window wider

so we have more space to show e.g. columns in the grids

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 months agoui: guest import: rework to tab panels
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.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 months agoui: guest import: network grid: allow selecting hardware type
Dominik Csapak [Mon, 11 Mar 2024 10:59:38 +0000 (11:59 +0100)]
ui: guest import: network grid: allow selecting hardware type

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 months agoui: guest import: network grid: display 'auto' instead of nothing
Dominik Csapak [Mon, 11 Mar 2024 10:59:05 +0000 (11:59 +0100)]
ui: guest import: network grid: display 'auto' instead of nothing

when there is not mac address on the source side

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 months agoui: guest import: sort grids by id
Dominik Csapak [Mon, 11 Mar 2024 10:58:48 +0000 (11:58 +0100)]
ui: guest import: sort grids by id

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 months agoui: guest import: add cdrom grid
Dominik Csapak [Mon, 11 Mar 2024 10:58:23 +0000 (11:58 +0100)]
ui: guest import: add cdrom grid

so that one can already select an iso from here

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 months agoui: guest import: add ostype selector
Dominik Csapak [Mon, 11 Mar 2024 10:57:57 +0000 (11:57 +0100)]
ui: guest import: add ostype selector

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 months agoui: esxi import: support rendering structured warnings
Thomas Lamprecht [Sun, 10 Mar 2024 18:48:43 +0000 (19:48 +0100)]
ui: esxi import: support rendering structured warnings

Render warnings as list to allowing one to better distinguish multiple
ones.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: add wizard to allow importing from ESXi attached as storage
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>
2 months agoui: esxi storage edit: add checkbox for skipping certificate validation
Thomas Lamprecht [Wed, 13 Mar 2024 06:47:37 +0000 (07:47 +0100)]
ui: esxi storage edit: add checkbox for skipping certificate validation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: esxi storage edit: make user and password always editable
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>
2 months agoui: allow adding the esxi storage type
Dominik Csapak [Fri, 8 Mar 2024 14:37:28 +0000 (15:37 +0100)]
ui: allow adding the esxi storage type

also change the icon to 'fa-cloud-download', hide the 'unknown' status
in the tree, and hide the Summary info from the storage browser

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 months agoui: content view: fix use of external static tbar declaration
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)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 months agoui: content view: use modern simplified object delcaration
Dominik Csapak [Fri, 8 Mar 2024 14:32:24 +0000 (15:32 +0100)]
ui: content view: use modern simplified object delcaration

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 months agoui: storage content view: allow to define handler for item double-click
Thomas Lamprecht [Wed, 13 Mar 2024 13:45:41 +0000 (14:45 +0100)]
ui: storage content view: allow to define handler for item double-click

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agobump version to 8.1.5
Thomas Lamprecht [Thu, 14 Mar 2024 14:13:30 +0000 (15:13 +0100)]
bump version to 8.1.5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agod/control: bump versioned dependency for libpve-access-control
Thomas Lamprecht [Wed, 28 Feb 2024 14:53:49 +0000 (15:53 +0100)]
d/control: bump versioned dependency for libpve-access-control

to ensure the newly checked Sys.AccessNetwork privilege is available.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoui: storage: enable download-url button with Sys.AccessNetwork capability
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>
2 months agoapi: nodes: allow usage of query url metadata with Sys.AccessNetwork
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.

[0]: https://bugzilla.proxmox.com/show_bug.cgi?id=5254

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>
2 months agoappliance index: use upper case for constant like variables
Thomas Lamprecht [Wed, 28 Feb 2024 13:28:09 +0000 (14:28 +0100)]
appliance index: use upper case for constant like variables

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoappliance index: warn if log rotation fails
Thomas Lamprecht [Wed, 28 Feb 2024 13:27:19 +0000 (14:27 +0100)]
appliance index: warn if log rotation fails

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 months agoappliance index: fix precedence in size check for log rotation
Fiona Ebner [Wed, 28 Feb 2024 12:07:08 +0000 (13:07 +0100)]
appliance index: fix precedence in size check for log rotation

In Perl, > takes precedence over ||, see perldoc perlop, so currently
the check will trigger with any size.

Fixes: 805cae93 ("appliance index: rotate update log if bigger than 256 KiB")
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2 months agoui: IP set: fix indentation and whitespace issues
Thomas Lamprecht [Mon, 26 Feb 2024 18:08:01 +0000 (19:08 +0100)]
ui: IP set: fix indentation and whitespace issues

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 months agoapi: node status: document boot-info and current-kernel in return schema
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>
3 months agoui: qemu: bump max cores to 256 by socket
Alexandre Derumier [Fri, 12 Jan 2024 20:08:06 +0000 (21:08 +0100)]
ui: qemu: bump max cores to 256 by socket

New AMD Epyc CPUs already supports 168 threads and QEMU 8.1 support
1024 cores with q35.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 months agoappliance index: rotate update log if bigger than 256 KiB
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>
3 months agofix #5106: ui: ceph status: make column wrap the summary text on expand
Dominik Csapak [Thu, 7 Dec 2023 13:35:58 +0000 (14:35 +0100)]
fix #5106: ui: ceph status: make column wrap the summary text on expand

with this the title is now completely visible when the column is
expanded, even if it's originally too narrow.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
 [TL: fix eslint warning for missing space after comma ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 months agoui: node: system: avoid using 'Syslog'
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].

[0]: https://forum.proxmox.com/threads/141631/post-634675
[1]: https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#changes-to-system-logging
[2]: https://lists.proxmox.com/pipermail/pve-devel/2024-February/061765.html

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>
3 months agobuild-sys: allow a multi-digit release number
Thomas Lamprecht [Fri, 9 Feb 2024 11:04:07 +0000 (12:04 +0100)]
build-sys: allow a multi-digit release number

future proofing at this point, but let's rather fix this already
before we forget...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 months agoceph: config hash fallback style improvement
Fabian Grünbichler [Mon, 12 Feb 2024 13:06:55 +0000 (14:06 +0100)]
ceph: config hash fallback style improvement

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 months agoceph: fix edge case of wrong files being deleted on purge
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>
3 months agopvesubscription: add missing return statement
Alexander Zeidler [Mon, 29 Jan 2024 09:47:05 +0000 (10:47 +0100)]
pvesubscription: add missing return statement

to avoid a failing null check and its error message. This confused
users since the activation was successful anyway.

Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
3 months agoui: lvm: expose saferemove setting
Fiona Ebner [Thu, 1 Feb 2024 15:12:38 +0000 (16:12 +0100)]
ui: lvm: expose saferemove setting

It can be security-relevant in some environments. The LVM storage
documentation can be reached via the "Help" button and contains a few
more details.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
3 months agoui: adapt to fix of Korean language code
Thomas Lamprecht [Thu, 18 Jan 2024 13:11:28 +0000 (14:11 +0100)]
ui: adapt to fix of Korean language code

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 months agoui: storage: zfs: set blocksize placeholder to 16k
Aaron Lauterer [Mon, 29 Jan 2024 14:42:06 +0000 (15:42 +0100)]
ui: storage: zfs: set blocksize placeholder to 16k

to reflect current ZFS defaults.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
3 months agovzdump: make helper functions for sending notifications private
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.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
3 months agofix #5067: vzdump: include total backup size in notification
Lukas Wagner [Thu, 14 Dec 2023 14:11:53 +0000 (15:11 +0100)]
fix #5067: vzdump: include total backup size in notification

The old backup job notification mails from before the notification
system overhaul included the total time as well as the total size.

The total size was missing from the new, template-based backup report,
thus we add it back in this commit.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
[FE: style fix - use parentheses for returning list]
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
4 months agoadd missing library packages
Hannes Duerr [Fri, 12 Jan 2024 13:41:51 +0000 (14:41 +0100)]
add missing library packages

Signed-off-by: Hannes Duerr <h.duerr@proxmox.com>
4 months agoreport: format iptables output for readability
Alexander Zeidler [Tue, 9 Jan 2024 14:23:56 +0000 (15:23 +0100)]
report: format iptables output for readability

Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
4 months agopvesubscription: update set-offline-key description
Alexander Zeidler [Tue, 9 Jan 2024 14:23:55 +0000 (15:23 +0100)]
pvesubscription: update set-offline-key description

and point users to proxmox-offline-mirror-helper

Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
4 months agod/postinst: fix up whitespace indentation
Thomas Lamprecht [Wed, 10 Jan 2024 09:35:41 +0000 (10:35 +0100)]
d/postinst: fix up whitespace indentation

we actually use a sane one here so do not mess with that

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 months agobump version to 8.1.4
Thomas Lamprecht [Thu, 14 Dec 2023 14:20:10 +0000 (15:20 +0100)]
bump version to 8.1.4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 months agopostinst: filter rbds in lvm
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.

[1] https://gitlab.com/lvmteam/lvm2/-/commit/6a431eb24241caf2277d3e5b4718782d92650a2a

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
4 months agoui: DirEdit: LVMEdit: add hint when to enable shared
Aaron Lauterer [Tue, 10 Oct 2023 13:24:52 +0000 (15:24 +0200)]
ui: DirEdit: LVMEdit: add hint when to enable shared

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
4 months agoreport: add packet counter to iptables output
Hannes Duerr [Wed, 3 Jan 2024 08:53:30 +0000 (09:53 +0100)]
report: add packet counter to iptables output

Signed-off-by: Hannes Duerr <h.duerr@proxmox.com>
5 months agofix #5121: ui: node status: avoid invalid array access for certain foreign kernels
Fiona Ebner [Thu, 14 Dec 2023 10:34:44 +0000 (11:34 +0100)]
fix #5121: ui: node status: avoid invalid array access for certain foreign kernels

with custom build date format, which would prevent the panel from loading.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
5 months agoapi: replication: allow users to enumerate accessible replication jobs
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()

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
5 months agoui: iso selector: disable all fields to avoid bogus validation
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>
5 months agonode: add guard for missing secure-boot efi var
Fabian Grünbichler [Tue, 28 Nov 2023 06:58:49 +0000 (07:58 +0100)]
node: add guard for missing secure-boot efi var

some (old) systems might have efivars, but don't have the SecureBoot one.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 months agoapi: apt versions: track dnsmasq and frr-pythontools as optional packages
Thomas Lamprecht [Thu, 23 Nov 2023 10:33:58 +0000 (11:33 +0100)]
api: apt versions: track dnsmasq and frr-pythontools as optional packages

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agobump version to 8.1.3
Thomas Lamprecht [Thu, 23 Nov 2023 10:20:06 +0000 (11:20 +0100)]
bump version to 8.1.3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: pool view: fix editing nested pools
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.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 months agobump version to 8.1.2
Thomas Lamprecht [Thu, 23 Nov 2023 09:23:11 +0000 (10:23 +0100)]
bump version to 8.1.2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: perm paths: change /mapping/notification to /mapping/notifications
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.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
6 months agod/control: bump versioned dependency for libpve-guest-common-perl
Thomas Lamprecht [Thu, 23 Nov 2023 09:40:13 +0000 (10:40 +0100)]
d/control: bump versioned dependency for libpve-guest-common-perl

Ensure new notification-mode property is recognized for backup jobs.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: resource tree: remove wrong comment
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.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>