Commit Graph

7360 Commits

Author SHA1 Message Date
Thomas Lamprecht
81fd95cf63 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>
2023-11-22 13:45:42 +01:00
Thomas Lamprecht
be04f8ee8a 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>
2023-11-22 13:45:42 +01:00
Thomas Lamprecht
20ad4e0e01 api: nodes: add full info about current kernel from uname call
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-22 13:45:42 +01:00
Thomas Lamprecht
fd6fb85870 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>
2023-11-22 13:45:42 +01:00
Stefan Hanreich
ad1278fae8 sdn: subnet: proper change detect for dhcp range panel
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-11-21 21:02:45 +01:00
Stefan Hanreich
14f46dbb97 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>
2023-11-21 20:54:11 +01:00
Stefan Hanreich
a3c059c559 sdn: ipam: add ipam panel
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-11-21 20:27:38 +01:00
Stefan Hanreich
1d2ee4a255 sdn: subnet: add panel for editing dhcp ranges
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-11-21 20:27:38 +01:00
Stefan Hanreich
4977ff7f50 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>
2023-11-21 20:27:38 +01:00
Stefan Hanreich
c216d1d288 sdn: regenerate DHCP config on reload
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-11-21 20:27:38 +01:00
Lukas Wagner
464ef9f6c4 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>
2023-11-21 17:38:09 +01:00
Lukas Wagner
fb5b81796f 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>
2023-11-21 14:41:15 +01:00
Lukas Wagner
c202b169f5 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>
2023-11-21 14:41:15 +01:00
Lukas Wagner
66b2086269 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>
2023-11-21 14:41:15 +01:00
Lukas Wagner
38035bdf60 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>
2023-11-21 14:41:15 +01:00
Thomas Lamprecht
571bc9e2f7 ui: qemu os type edit: eslint fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-21 14:40:20 +01:00
Aaron Lauterer
cfcb74ab96 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>
2023-11-21 14:39:28 +01:00
Aaron Lauterer
b555a41208 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>
2023-11-21 14:39:25 +01:00
Aaron Lauterer
1572e97358 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>
2023-11-21 14:39:17 +01:00
Thomas Lamprecht
76543c7397 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>
2023-11-21 14:16:35 +01:00
Dominik Csapak
fc3a88ad0d 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>
2023-11-21 09:47:56 +01:00
Dominik Csapak
5b2e8bd4d1 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>
2023-11-21 09:34:41 +01:00
Dominik Csapak
fc7b556d4f 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>
2023-11-21 09:34:12 +01:00
Fabian Grünbichler
cd731902b7 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>
2023-11-20 12:26:21 +01:00
Fabian Grünbichler
4448f8d3fa 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>
2023-11-20 12:26:21 +01:00
Wolfgang Bumiller
c5026e4687 bump access-control to 8.0.7 for nested pools
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-11-20 12:26:13 +01:00
Dominik Csapak
a5216e22bd 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>
2023-11-20 10:14:28 +01:00
Thomas Lamprecht
4f4941f77b update shipped appliance info index
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-19 19:54:39 +01:00
Thomas Lamprecht
fd1a0ae1b3 bump version to 8.0.9
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-18 12:24:14 +01:00
Thomas Lamprecht
27ba78f8b1 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>
2023-11-18 12:14:20 +01:00
Thomas Lamprecht
f58ecd9d4e bump version to 8.0.8
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-17 19:57:07 +01:00
Thomas Lamprecht
856eafa3c7 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>
2023-11-17 19:57:07 +01:00
Thomas Lamprecht
a1ea14f452 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>
2023-11-17 19:54:39 +01:00
Dominik Csapak
f2aa317aa3 ui: fix backup job create
'delete' is only possible for editing jobs, not creating them

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-17 16:20:07 +01:00
Lukas Wagner
d90157e0ba 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>
2023-11-17 16:20:03 +01:00
Lukas Wagner
26825ac058 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>
2023-11-17 16:20:03 +01:00
Lukas Wagner
1d66f8879e 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>
2023-11-17 16:20:03 +01:00
Lukas Wagner
8fc1f4a9c9 ui: dc: config: show notification panel again
Rework should be done now.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 16:20:03 +01:00
Lukas Wagner
75601945de ui: vzdump: remove left-overs from target/policy based notifications
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 16:20:03 +01:00
Lukas Wagner
a63ecef5a3 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>
2023-11-17 16:20:03 +01:00
Lukas Wagner
3f0ffa0efe api: replication: adapt to matcher-based notification system
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 16:20:03 +01:00
Lukas Wagner
5fa9db35b7 api: apt: adapt to matcher-based notifications
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 16:20:03 +01:00
Lukas Wagner
e95a9a3344 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>
2023-11-17 16:20:03 +01:00
Lukas Wagner
2cb6c8df37 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>
2023-11-17 16:20:03 +01:00
Lukas Wagner
46499a47b4 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>
2023-11-17 16:20:03 +01:00
Lukas Wagner
97a6a189cd api: notification: remove notification groups
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 16:20:03 +01:00
Fiona Ebner
96aee647a8 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>
2023-11-17 16:07:42 +01:00
Thomas Lamprecht
6ea1b6da7c gitignore: also make glob for sencha touch build more specific
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-17 16:02:49 +01:00
Stefan Lendl
ec0610acb2 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>
2023-11-17 16:00:23 +01:00
Aaron Lauterer
38fa08d074 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>
2023-11-17 08:09:15 +01:00