]> git.proxmox.com Git - pve-manager.git/log
pve-manager.git
5 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>
5 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>
5 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>
5 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>
5 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>
5 months agoui: resource tree: fix extra space inconsistency in some node elements
Dominik Csapak [Thu, 23 Nov 2023 08:25:40 +0000 (09:25 +0100)]
ui: resource tree: fix extra space inconsistency in some node elements

When a node element was updated, it was put through the 'setText'
method which accidentally added a space before it's name.

Fix this by putting the space into the status variable.

Without this patch one could observe a vertical misalignment when some
nodes had guests on them but others had none.

Fixes: 2f414c50 ("ui: resource tree: limit tooltip to icon and text")
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agoui: drop various translations of fixed strings
Thomas Lamprecht [Thu, 23 Nov 2023 08:23:23 +0000 (09:23 +0100)]
ui: drop various translations of fixed strings

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agoui: iso selector: fix layout, stretch items again to full space
Thomas Lamprecht [Wed, 22 Nov 2023 19:40:29 +0000 (20:40 +0100)]
ui: iso selector: fix layout, stretch items again to full space

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agobump version to 8.1.1
Thomas Lamprecht [Wed, 22 Nov 2023 18:37:14 +0000 (19:37 +0100)]
bump version to 8.1.1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agoui: sdn zone base: fix indentation
Thomas Lamprecht [Wed, 22 Nov 2023 18:35:41 +0000 (19:35 +0100)]
ui: sdn zone base: fix indentation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agosdn: zone: fix edit for dns zone
Stefan Hanreich [Wed, 22 Nov 2023 18:05:36 +0000 (19:05 +0100)]
sdn: zone: fix edit for dns zone

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
5 months agosdn: adapt edit panels for new API endpoints
Stefan Hanreich [Wed, 22 Nov 2023 17:41:05 +0000 (18:41 +0100)]
sdn: adapt edit panels for new API endpoints

PUT endpoints have changed so they work like the other SectionConfig
endpoints. Reflect those changes in the UI.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
5 months agoapi: node status: cache boot mode info
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>
5 months agoui: sdn: use all upper case for acronyms
Christian Ebner [Wed, 22 Nov 2023 14:22:07 +0000 (15:22 +0100)]
ui: sdn: use all upper case for acronyms

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
5 months agobump version to 8.1.0
Thomas Lamprecht [Wed, 22 Nov 2023 13:56:12 +0000 (14:56 +0100)]
bump version to 8.1.0

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agod/control: upgrade libpve-network-perl dependency to recommendation
Thomas Lamprecht [Wed, 22 Nov 2023 13:55:46 +0000 (14:55 +0100)]
d/control: upgrade libpve-network-perl dependency to recommendation

could actually be a hard dependency too

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agoipam: send ip to delete endpoint
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>
5 months agoui: node summary: add boot-mode information
Thomas Lamprecht [Wed, 22 Nov 2023 12:45:18 +0000 (13:45 +0100)]
ui: node summary: add boot-mode information

Add a extra row for showing the current boot mode, for that we need to
grow the height of the status panel and graphs to have enough space
again.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agoapi: nodes: add info about current boot mode
Thomas Lamprecht [Wed, 22 Nov 2023 12:19:49 +0000 (13:19 +0100)]
api: nodes: add info about current boot mode

report if the node is booted in EFI or Legacy BIOS mode, for the
former also pass along the secure boot state.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agoui: node summary: reduce noise in current kernel version
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>
5 months agoapi: nodes: add full info about current kernel from uname call
Thomas Lamprecht [Wed, 22 Nov 2023 12:19:34 +0000 (13:19 +0100)]
api: nodes: add full info about current kernel from uname call

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agoui: node summary: drop PVE prefix for manager version
Thomas Lamprecht [Wed, 22 Nov 2023 12:44:34 +0000 (13:44 +0100)]
ui: node summary: drop PVE prefix for manager version

the value on the right already includes pve-manager and the user has
already loaded the PVE gui, so this is a bit superfluous

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agosdn: subnet: proper change detect for dhcp range panel
Stefan Hanreich [Tue, 21 Nov 2023 19:46:32 +0000 (20:46 +0100)]
sdn: subnet: proper change detect for dhcp range panel

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
5 months agosdn: Update IPAM API endpoints
Stefan Hanreich [Mon, 20 Nov 2023 16:28:33 +0000 (17:28 +0100)]
sdn: Update IPAM API endpoints

The IPAM-related API endpoints were moved, reflect those changes in
the UI as well.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
5 months agosdn: ipam: add ipam panel
Stefan Hanreich [Fri, 17 Nov 2023 11:39:58 +0000 (12:39 +0100)]
sdn: ipam: add ipam panel

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
5 months agosdn: subnet: add panel for editing dhcp ranges
Stefan Hanreich [Fri, 17 Nov 2023 11:39:57 +0000 (12:39 +0100)]
sdn: subnet: add panel for editing dhcp ranges

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
5 months agosdn: add DHCP option to Zone dialogue
Stefan Hanreich [Fri, 17 Nov 2023 11:39:56 +0000 (12:39 +0100)]
sdn: add DHCP option to Zone dialogue

Co-Authored-by: Stefan Lendl <s.lendl@proxmox.com>
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
5 months agosdn: regenerate DHCP config on reload
Stefan Hanreich [Fri, 17 Nov 2023 11:39:55 +0000 (12:39 +0100)]
sdn: regenerate DHCP config on reload

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
5 months agoui: dc: config: remove onlineHelp for notification config view
Lukas Wagner [Tue, 21 Nov 2023 14:47:57 +0000 (15:47 +0100)]
ui: dc: config: remove onlineHelp for notification config view

The 'onlineHelp' is now set in the component definition in
'proxmox-widget-toolkit'.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
5 months agoui: backup job: change field text for 'mailnotification' field
Lukas Wagner [Tue, 21 Nov 2023 12:52:40 +0000 (13:52 +0100)]
ui: backup job: change field text for 'mailnotification' field

... to highlight that this setting only affects the 'legacy-sendmail'
mail notifications.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
5 months agoui: backup: add 'notification-mode' param for one-shot backup jobs.
Lukas Wagner [Tue, 21 Nov 2023 12:52:39 +0000 (13:52 +0100)]
ui: backup: add 'notification-mode' param for one-shot backup jobs.

This selector allows one to selected between the 'old' (send email
directly via sendmail) or the 'new' notification system.

The default is 'auto', which sends and email if one is configured,
and uses the notification system if no email address is set.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
5 months agoui: backup jobs: add 'notification-mode' selector for backup jobs
Lukas Wagner [Tue, 21 Nov 2023 12:52:38 +0000 (13:52 +0100)]
ui: backup jobs: add 'notification-mode' selector for backup jobs

This selector allows one to selected between the 'old' (send email
directly via sendmail) or the 'new' notification system.

The default is 'auto', which sends and email if one is configured,
and uses the notification system if no email address is set.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
5 months agovzdump: support 'notification-mode' parameter
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.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
5 months agoui: qemu os type edit: eslint fixes
Thomas Lamprecht [Tue, 21 Nov 2023 13:40:20 +0000 (14:40 +0100)]
ui: qemu os type edit: eslint fixes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agoui: ceph pool edit: rework with controller and formulas
Aaron Lauterer [Fri, 29 Sep 2023 13:02:03 +0000 (15:02 +0200)]
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>
5 months agofix #2515: ui: ceph pool create: use configured defaults for size and min_size
Aaron Lauterer [Fri, 29 Sep 2023 13:02:02 +0000 (15:02 +0200)]
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>
5 months agoapi: ceph: add endpoint to fetch config keys
Aaron Lauterer [Fri, 29 Sep 2023 13:02:01 +0000 (15:02 +0200)]
api: ceph: add endpoint to fetch config keys

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>
5 months agoui: vm wizard: reword label for extra drive for virtio-drivers
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>
5 months agoui: qemu wizard: use better boot order for second cd drive
Dominik Csapak [Tue, 21 Nov 2023 08:35:51 +0000 (09:35 +0100)]
ui: qemu wizard: use better boot order for second cd drive

in the case we add a second cd drive (for windows), we don't want the
backend logic to only include the first one, since we cannot know
which is bootable and which is (probably) the virtio iso.

so instead, emulate the backend logic for the wizard but include both cd
drives in that case, otherwise let the backend decide like before

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 months agoui: vm wizard: allow second iso for windows vms
Dominik Csapak [Mon, 20 Nov 2023 15:45:43 +0000 (16:45 +0100)]
ui: vm wizard: allow second iso for windows vms

Having a second CD-drive is useful for adding the virtio-win driver
ISO for new installs, and thus we change the default disk type to scsi
and network type to VirtIO.

Add special logic to the OSTypeInputPanel when 'insideWizard' is true
to add an additional checkbox + iso selector

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agoui: refactor iso-selector out of the cd input panel
Dominik Csapak [Mon, 20 Nov 2023 15:45:42 +0000 (16:45 +0100)]
ui: refactor iso-selector out of the cd input panel

and make it into a proper field.
it's intended to be used like a single field, otherwise exactly as before

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agoui: pools: switch to new API endpoints
Fabian Grünbichler [Mon, 20 Nov 2023 07:22:42 +0000 (08:22 +0100)]
ui: pools: switch to new API endpoints

which support nested pools. mostly straight-forward, only pool deletion and the
members grid need some special attention.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
5 months agofix #1148: api: pools: support nested pools
Fabian Grünbichler [Mon, 20 Nov 2023 07:22:41 +0000 (08:22 +0100)]
fix #1148: api: pools: support nested pools

since poolid can now contain `/`, it's not possible to use it (properly) as
path parameter anymore.

accordingly:
- merge `read_pool` (`GET /pools/{poolid}`) into 'index' (`GET
  /pools/?poolid={poolid}`) (requires clients to extract the only member of the returned array if they want to query an individual pool)
- move `update_pool` to `/pools`, deprecating the old variant with path parameter
- move `delete_pool` to `/pools`, deprecating the old variant with path parameter
- deprecate `read_pool` API endpoint

pool creation is blocked for nested pools where the parent does not already
exist. similarly, the checks for deletion are extended to block deletion if
sub-pools still exist.

the old API endpoints continue to work for non-nested pools. `pvesh ls /pools`
is semi-broken for nested pools, listing the entries, but no methods on them,
since they reference the old API. fixing this would require extending the REST
handling to support a new type of child reference.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
5 months agobump access-control to 8.0.7 for nested pools
Wolfgang Bumiller [Mon, 20 Nov 2023 11:26:12 +0000 (12:26 +0100)]
bump access-control to 8.0.7 for nested pools

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 months agoui: fix zero-sized panels on fresh chrome start
Dominik Csapak [Mon, 20 Nov 2023 08:02:42 +0000 (09:02 +0100)]
ui: fix zero-sized panels on fresh chrome start

it seems in new versions of chrome , this triggers too early on a fresh
start (when autostarting a pve tab), resulting in the
'viewWidth'/'viewHeight' being zero pixels. This means we set the width
of the left and the height of the bottom panel to zero pixels, making
them functionally invisible.

To prevent that, check that the 'viewWidth'/'viewHeight' is big enough
so that the panels still have least 50 pixels left before setting their
size.

Reported in the Forum:
https://forum.proxmox.com/threads/136636/

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ TL: point to forum thread ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agoupdate shipped appliance info index
Thomas Lamprecht [Sun, 19 Nov 2023 18:54:35 +0000 (19:54 +0100)]
update shipped appliance info index

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agobump version to 8.0.9
Thomas Lamprecht [Sat, 18 Nov 2023 11:23:34 +0000 (12:23 +0100)]
bump version to 8.0.9

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agomove default link config to drop-in snippet
Thomas Lamprecht [Sat, 18 Nov 2023 11:14:18 +0000 (12:14 +0100)]
move default link config to drop-in snippet

because otherwise we need to house *all* defaults, like the interface
naming policy ones, too.

This can be fine for one release, but easily overlooked if those, or
other important fall-back defaults change.

A user can now also easier override this, e.g., by simply adding a
drop-in file in the respective /etc path.

Fixes failure to rename network names to "predictable" names on boot
as reported in the forum:

https://forum.proxmox.com/threads/135635/page-6#post-606130

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agobump version to 8.0.8
Thomas Lamprecht [Fri, 17 Nov 2023 18:54:57 +0000 (19:54 +0100)]
bump version to 8.0.8

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agod/control: bump versioned dependencies for proxmox-widget-toolkit
Thomas Lamprecht [Fri, 17 Nov 2023 18:56:45 +0000 (19:56 +0100)]
d/control: bump versioned dependencies for proxmox-widget-toolkit

for the UI side of the notification system rework

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agod/control: bump versioned dependencies for pve-cluster and libpve-notify-perl
Thomas Lamprecht [Fri, 17 Nov 2023 18:54:37 +0000 (19:54 +0100)]
d/control: bump versioned dependencies for pve-cluster and libpve-notify-perl

to ensure the rework of the notification system can be used

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agoui: fix backup job create
Dominik Csapak [Thu, 16 Nov 2023 11:52:02 +0000 (12:52 +0100)]
ui: fix backup job create

'delete' is only possible for editing jobs, not creating them

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 months agoapi: notification: simplify ACLs for notification
Lukas Wagner [Tue, 14 Nov 2023 12:59:43 +0000 (13:59 +0100)]
api: notification: simplify ACLs for notification

Use coarse-grained /mapping/notifications for now. We
can always extend later if we need to.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
5 months agoapi: notification: add disable and origin params
Lukas Wagner [Tue, 14 Nov 2023 12:59:42 +0000 (13:59 +0100)]
api: notification: add disable and origin params

'disable' can be set to disable a matcher/target.
'origin' signals whether the configuration entry
was created by the user or whether it was built-in/
built-in-and-modified.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
5 months agonotify: add API routes for smtp endpoints
Lukas Wagner [Tue, 14 Nov 2023 12:59:41 +0000 (13:59 +0100)]
notify: add API routes for smtp endpoints

The Perl part of the API methods primarily defines the API schema,
checks for any needed privileges and then calls the actual Rust
implementation exposed via perlmod. Any errors returned by the Rust
code are translated into PVE::Exception, so that the API call fails
with the correct HTTP error code.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
5 months agoui: dc: config: show notification panel again
Lukas Wagner [Tue, 14 Nov 2023 12:59:40 +0000 (13:59 +0100)]
ui: dc: config: show notification panel again

Rework should be done now.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
5 months agoui: vzdump: remove left-overs from target/policy based notifications
Lukas Wagner [Tue, 14 Nov 2023 12:59:39 +0000 (13:59 +0100)]
ui: vzdump: remove left-overs from target/policy based notifications

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
5 months agotest: fix vzdump notification test
Lukas Wagner [Tue, 14 Nov 2023 12:59:38 +0000 (13:59 +0100)]
test: fix vzdump notification test

The signature of the PVE::Notify functions have changed, this commit
adapts the mocked functions so that the tests work again.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
5 months agoapi: replication: adapt to matcher-based notification system
Lukas Wagner [Tue, 14 Nov 2023 12:59:37 +0000 (13:59 +0100)]
api: replication: adapt to matcher-based notification system

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
5 months agoapi: apt: adapt to matcher-based notifications
Lukas Wagner [Tue, 14 Nov 2023 12:59:36 +0000 (13:59 +0100)]
api: apt: adapt to matcher-based notifications

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
5 months agovzdump: adapt to new matcher based notification system
Lukas Wagner [Tue, 14 Nov 2023 12:59:35 +0000 (13:59 +0100)]
vzdump: adapt to new matcher based notification system

To ease the migration from old-style mailto/mailnotification paramters
for backup jobs, the code will add a ephemeral sendmail endpoint and
a matcher.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
5 months agoui: dc: remove unneeded notification events panel
Lukas Wagner [Tue, 14 Nov 2023 12:59:34 +0000 (13:59 +0100)]
ui: dc: remove unneeded notification events panel

The notification event settings are replaced by notification matchers,
which will combine the notification routing and filtering into a
single concept.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
5 months agoapi: notification: add new matcher-based notification API
Lukas Wagner [Tue, 14 Nov 2023 12:59:33 +0000 (13:59 +0100)]
api: notification: add new matcher-based notification API

This renames filters -> matchers and adds new configuration options
needed by matchers (e.g. match-field, match-calendar, etc.)

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
5 months agoapi: notification: remove notification groups
Lukas Wagner [Tue, 14 Nov 2023 12:59:32 +0000 (13:59 +0100)]
api: notification: remove notification groups

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
5 months agopvesh: proxy handler: fix handling array parameters
Fiona Ebner [Fri, 17 Nov 2023 14:58:05 +0000 (15:58 +0100)]
pvesh: proxy handler: fix handling array parameters

As reported in the community forum and reproduced locally, issuing a
QEMU guest agent command would lead to an error when proxying to
another node:

> root@pve8a2 ~ # pvesh create /nodes/pve8a1/qemu/126/agent/exec --command 'whoami'
> Wide character in die at /usr/share/perl5/PVE/RESTHandler.pm line 918.
> proxy handler failed: Agent error: Guest agent command failed, error was 'Failed to execute child process “ARRAY(0x55842bb161a0)” (No such file or directory)'

Fix it, by splitting up array references correctly.

[0]: https://forum.proxmox.com/threads/136520/

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
5 months agogitignore: also make glob for sencha touch build more specific
Thomas Lamprecht [Fri, 17 Nov 2023 15:02:06 +0000 (16:02 +0100)]
gitignore: also make glob for sencha touch build more specific

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agogitignore: add more build artefacts to ignore list and anchor to root
Stefan Lendl [Fri, 17 Nov 2023 14:26:13 +0000 (15:26 +0100)]
gitignore: add more build artefacts to ignore list and anchor to root

Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
 [ TL: fix subject & use more specific glob ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agoapi: osd: destroy: remove mclock max iops settings
Aaron Lauterer [Wed, 8 Nov 2023 12:10:34 +0000 (13:10 +0100)]
api: osd: destroy: remove mclock max iops settings

Ceph does a quick benchmark when creating a new OSD and stores the
osd_mclock_max_capacity_iops_{ssd,hdd} settings in the config DB.

When destroying the OSD, Ceph does not automatically remove these
settings. Keeping them can be problematic if a new OSD with potentially
more performance is added and ends up getting the same OSD ID.

Therefore, we remove these settings ourselves when destroying an OSD.
Removing both variants, hdd and ssd should be fine, as the MON does not
complain if the setting does not exist.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
6 months agoship default link config to disable systemd link mac-policy
Alexandre Derumier [Sun, 17 Sep 2023 13:44:44 +0000 (15:44 +0200)]
ship default link config to disable systemd link mac-policy

since debian 11, systemd is changing behaviour of MAC address of
bridge, but also bond, where the mac is generated randomly instead
inherit from the first slave.

We tried to fix that with ifupdown2, but that seems to produce some
regressions and independent of that there was still another problem.
Namely, if a bridge don't have any slaves, systemd is keeping bridge
offline.

https://www.justinsteven.com/posts/2023/03/26/virtualbox-bridge-ports-none-no-carrier-debian-11/

That mean that a dhcp daemon like kea can't bind on a standalone
bridge (used for s-nat for example), until a tap interface is started.

So, set up a systemd link config to disable the systemd mac policy by
default (this don't break already fixed ifupdown2 mac).

Funnily CentOS && Fedora also disable it already:
https://fedoraproject.org/wiki/Changes/MAC_Address_Policy_none
https://gitlab.com/redhat/centos-stream/rpms/systemd/-/blob/c8953519504bf2e694bfbc2b02a456c1056f252e/0028-udev-net-setup-link-change-the-default-MACAddressPol.patch#L43

Before this patch:
```
~ ip a sh dev vmbr1
vmbr1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 10
```

After this patch:
```
~ ip a sh dev vmbr1
vmbr1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
```

Signed-off-by: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
 [ TL: move to /usr/lib/.. where distro files belong and add comment ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agod/control: bump versioned dependencies for proxmox-widget-toolkit to 4.1.0
Thomas Lamprecht [Tue, 14 Nov 2023 13:57:13 +0000 (14:57 +0100)]
d/control: bump versioned dependencies for proxmox-widget-toolkit to 4.1.0

to ensure new combo grid default value and firewall log (date time
range stuff) is available

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: don't set the default value of combogrids to []
Dominik Csapak [Wed, 19 Jul 2023 12:11:12 +0000 (14:11 +0200)]
ui: don't set the default value of combogrids to []

the combogrid sets the default itself correctly

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 months agoui: don't set the default value of combogrids to ''
Dominik Csapak [Wed, 19 Jul 2023 12:11:11 +0000 (14:11 +0200)]
ui: don't set the default value of combogrids to ''

the combogrid does that itself already

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 months agoui: ipset: make ip/cidr required
Dominik Csapak [Wed, 19 Jul 2023 12:11:10 +0000 (14:11 +0200)]
ui: ipset: make ip/cidr required

it is in the backend, so make it required in the gui too

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 months agoapt: use `apt changelog` for changelog fetching
Fabian Grünbichler [Tue, 4 Jul 2023 09:45:07 +0000 (11:45 +0200)]
apt: use `apt changelog` for changelog fetching

support for it got added to Proxmox repositories, so there is no need to use
custom logic and manual fetching for this anymore.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 months agoui: ceph status: rename working state into busy
Thomas Lamprecht [Mon, 13 Nov 2023 15:20:53 +0000 (16:20 +0100)]
ui: ceph status: rename working state into busy

Working could be confused with "being ok", which isn't what we want to
convey here, as the lack of this status doesn't mean something "isn't
working".

So use busy, not 100% perfect but a bit closer to what we want to
convey while not taking up a whole paragraph or the like.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: ceph status: add pg warning state
Alexandre Derumier [Fri, 23 Jun 2023 09:45:12 +0000 (11:45 +0200)]
ui: ceph status: add pg warning state

Like ceph mgr dashboard, we need a warning state.

- set degraded as warning instead working
- set undersized as warning instead error
- rename error as critical
- add "busy" (info-blue) color for working state
- use warning (orange) color for warning state

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-By: Aaron Lauterer <a.lauterer@proxmox.com>
 [ TL: fold in CSS class addition ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agofix #4442: Add date-time filtering for firewall logs
Christian Ebner [Wed, 9 Aug 2023 10:55:28 +0000 (12:55 +0200)]
fix #4442: Add date-time filtering for firewall logs

Extend the current firewall log view to add date time based filtering.
The user can switch between live view, which shows logs from the
unrotated log file, or to filter mode, where date time based filtering,
including rotated logs can be performed.

Enable the feature by setting the property and the submit format
for since and until timestamps expected by the api.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
6 months agoacme: mark caaIdentities as an array
Folke Gleumes [Mon, 13 Nov 2023 14:11:25 +0000 (15:11 +0100)]
acme: mark caaIdentities as an array

caaIdentities was mistakenly labled as a string in a previous patch
and not as an array of strings, as it is defined in the rfc [0].

[0] https://datatracker.ietf.org/doc/html/rfc8555#section-7.1.1

Signed-off-by: Folke Gleumes <f.gleumes@proxmox.com>
6 months agoapi: bulk suspension: log if VMs are skipped due to not running
Thomas Lamprecht [Mon, 13 Nov 2023 13:12:16 +0000 (14:12 +0100)]
api: bulk suspension: log if VMs are skipped due to not running

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoapi: bulk suspension: code clean-ups
Thomas Lamprecht [Mon, 13 Nov 2023 13:06:01 +0000 (14:06 +0100)]
api: bulk suspension: code clean-ups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoapi: bulk suspension: increase log severity to warn when guest is not a VM
Thomas Lamprecht [Mon, 13 Nov 2023 13:04:25 +0000 (14:04 +0100)]
api: bulk suspension: increase log severity to warn when guest is not a VM

That way it shows up in the task-log that something was requested that
cannot work currently.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: add bulk suspend support
Hannes Laimer [Mon, 13 Nov 2023 10:20:46 +0000 (11:20 +0100)]
ui: add bulk suspend support

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
6 months agoapi: add suspendall endpoint
Hannes Laimer [Mon, 13 Nov 2023 10:20:45 +0000 (11:20 +0100)]
api: add suspendall endpoint

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
6 months agoapi: acme meta: require Sys.Audit on the node
Thomas Lamprecht [Mon, 13 Nov 2023 13:12:33 +0000 (14:12 +0100)]
api: acme meta: require Sys.Audit on the node

As even though restricted to some specific endpoints and formats, one
can still scan HTTP, potentially also on the LAN.

We can do this here as the API call is new and was never packaged
since introduced, so this isn't a breaking change.
The TOS one will be removed with the next major release, so not a
problem anymore from then one.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoapi: fixup missing trailing commas
Thomas Lamprecht [Mon, 13 Nov 2023 11:28:34 +0000 (12:28 +0100)]
api: fixup missing trailing commas

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoapi: acme: move description to the top
Thomas Lamprecht [Mon, 13 Nov 2023 11:22:59 +0000 (12:22 +0100)]
api: acme: move description to the top

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agofix #4497: cli/acme: detect eab and ask for credentials
Folke Gleumes [Tue, 31 Oct 2023 09:05:13 +0000 (10:05 +0100)]
fix #4497: cli/acme: detect eab and ask for credentials

Since external account binding is advertised the same way as the ToS,
it can be detected when creating an account and asked for if needed.

Signed-off-by: Folke Gleumes <f.gleumes@proxmox.com>
Reviewed-by: Fabian.Grünbichler <f.gruenbichler@proxmox.com>
Tested-by: Fabian.Grünbichler <f.gruenbichler@proxmox.com>
6 months agoui/acme: switch to new meta endpoint
Folke Gleumes [Tue, 31 Oct 2023 09:05:14 +0000 (10:05 +0100)]
ui/acme: switch to new meta endpoint

Besides the switch from tos to meta endpoint, this fixes a visual bug,
where the 'Accept TOS' button would show up, even if no ToS was needed.

Signed-off-by: Folke Gleumes <f.gleumes@proxmox.com>
Reviewed-by: Fabian.Grünbichler <f.gruenbichler@proxmox.com>
Tested-by: Fabian.Grünbichler <f.gruenbichler@proxmox.com>
6 months agoapi/acme: deprecate tos endpoint in favor of meta
Folke Gleumes [Tue, 31 Oct 2023 09:05:12 +0000 (10:05 +0100)]
api/acme: deprecate tos endpoint in favor of meta

The ToS endpoint ignored data that is needed to detect if EAB needs to
be used. Instead of adding a new endpoint that does the same request,
the tos endpoint is deprecated and replaced by the meta endpoint,
that returns all information returned by the directory.

Signed-off-by: Folke Gleumes <f.gleumes@proxmox.com>
Reviewed-by: Fabian.Grünbichler <f.gruenbichler@proxmox.com>
Tested-by: Fabian.Grünbichler <f.gruenbichler@proxmox.com>
6 months agofix #4497: acme: add support for external account bindings
Folke Gleumes [Tue, 31 Oct 2023 09:05:11 +0000 (10:05 +0100)]
fix #4497: acme: add support for external account bindings

Signed-off-by: Folke Gleumes <f.gleumes@proxmox.com>
Reviewed-by: Fabian.Grünbichler <f.gruenbichler@proxmox.com>
Tested-by: Fabian.Grünbichler <f.gruenbichler@proxmox.com>
6 months agoui: hide bulk migrate options on standalone nodes
Dominik Csapak [Mon, 13 Nov 2023 08:59:31 +0000 (09:59 +0100)]
ui: hide bulk migrate options on standalone nodes

since there is nowhere to migrate to and we hide the regular migrate
buttons/options too.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 months agoui: factor out standalone node check
Dominik Csapak [Mon, 13 Nov 2023 08:59:30 +0000 (09:59 +0100)]
ui: factor out standalone node check

into Utils and use it where we manually checked that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 months agoceph: api: use snake_case when setting options
Maximiliano Sandoval [Fri, 22 Sep 2023 09:25:26 +0000 (11:25 +0200)]
ceph: api: use snake_case when setting options

Continuation of ab70343982f36a5343d3fcf4a1a6489bd3f52a66. Discussion at
https://lists.proxmox.com/pipermail/pve-devel/2023-September/059013.html.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
6 months agoceph: mark global pg bits setting as deprecated
Maximiliano Sandoval [Fri, 22 Sep 2023 09:25:25 +0000 (11:25 +0200)]
ceph: mark global pg bits setting as deprecated

This setting was removed in [1] as part of the v13.0.2 tag. Running

    ceph config set global osd_pg_bits 42

results in

    Error EINVAL: unrecognized config option 'osd_pg_bits'

So we mark this api as deprecated and make it a no-op operation.

[1] https://github.com/ceph/ceph/commit/e6acf2d1d528a2395947d446a57bec04a3a002dc

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
6 months agoui: resource tree: add usage percentage to storage tooltip
Dominik Csapak [Fri, 10 Nov 2023 10:13:00 +0000 (11:13 +0100)]
ui: resource tree: add usage percentage to storage tooltip

it is a bit more verbose than the usage bar

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 months agoui: resource tree: fix showing empty tooltips
Dominik Csapak [Fri, 10 Nov 2023 10:12:59 +0000 (11:12 +0100)]
ui: resource tree: fix showing empty tooltips

stop the tooltip show when the there is no text
this could happen for e.g. nodes that should not have a tooltip

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 months agoui: resource tree: don't save the tooltip
Dominik Csapak [Fri, 10 Nov 2023 10:12:58 +0000 (11:12 +0100)]
ui: resource tree: don't save the tooltip

it shouldn't be called that often, and if we save it, it gets outdated,
e.g. when starting/stopping a guest

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 months agoui: add tooltips to non-full tags globally
Dominik Csapak [Thu, 9 Nov 2023 10:56:24 +0000 (11:56 +0100)]
ui: add tooltips to non-full tags globally

by using the delegate function of ExtJS' tooltips on the global
Workspace element and using the proper css selectors

this way, we can limit the tooltips to the non-full ones
(in contrast to using data-qtip on the element, which would
always be show, even for tags with the 'full' style)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 months agoui: resource tree: limit tooltip to icon and text
Dominik Csapak [Thu, 9 Nov 2023 10:56:23 +0000 (11:56 +0100)]
ui: resource tree: limit tooltip to icon and text

and exclude the tags for that, since we want the tags to have their own
tooltips

we use the delegate function of the tooltips for that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 months agoui: bulk actions: add clear filters button
Dominik Csapak [Thu, 9 Nov 2023 10:48:00 +0000 (11:48 +0100)]
ui: bulk actions: add clear filters button

to be able to clear all of them at once

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