Commit Graph

7343 Commits

Author SHA1 Message Date
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
Alexandre Derumier
5caa663f3e 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
c895351950/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>
2023-11-15 11:29:29 +01:00
Thomas Lamprecht
51fcf81434 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>
2023-11-14 14:57:16 +01:00
Dominik Csapak
108a99ef15 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>
2023-11-14 14:56:11 +01:00
Dominik Csapak
574a6da6b9 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>
2023-11-14 14:56:11 +01:00
Dominik Csapak
6cfe65ff2e 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>
2023-11-14 14:56:11 +01:00
Fabian Grünbichler
e337b2948b 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>
2023-11-14 09:28:41 +01:00
Thomas Lamprecht
a8d1bc80b5 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>
2023-11-13 16:24:04 +01:00
Alexandre Derumier
19823a19c4 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>
2023-11-13 16:20:01 +01:00
Christian Ebner
038e94bbbe 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>
2023-11-13 15:23:49 +01:00
Folke Gleumes
b4050780a6 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>
2023-11-13 15:15:22 +01:00
Thomas Lamprecht
25c0052ac8 api: bulk suspension: log if VMs are skipped due to not running
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-13 14:14:08 +01:00
Thomas Lamprecht
84e1e9d996 api: bulk suspension: code clean-ups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-13 14:14:08 +01:00
Thomas Lamprecht
ebb71cb505 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>
2023-11-13 14:14:08 +01:00
Hannes Laimer
9ed1408b09 ui: add bulk suspend support
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2023-11-13 14:14:08 +01:00
Hannes Laimer
5f04abc2c3 api: add suspendall endpoint
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2023-11-13 14:14:08 +01:00
Thomas Lamprecht
dab65f7395 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>
2023-11-13 14:14:08 +01:00
Thomas Lamprecht
c0ab227ab4 api: fixup missing trailing commas
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-13 12:28:34 +01:00