]> git.proxmox.com Git - pve-manager.git/log
pve-manager.git
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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 months agoui: bulk actions: rework filters and include tags
Dominik Csapak [Thu, 9 Nov 2023 10:47:59 +0000 (11:47 +0100)]
ui: bulk actions: rework filters and include tags

This moves the filters out of the grid header for the BulkActions and
puts them into their own fieldset above the grid. With that, we can
easily include a tags filter (one include and one exclude list).

The filter fieldset is collapsible and shows the active filters in
parenthesis. aside from that the filter should be the same as before.

To achieve the result, we regenerate the filterFn on every change of
every filter field, and set it with an 'id' so that only that filter is
overridden each time.

To make this work, we have to change three tiny details:
* manually set the labelWidths for the fields, otherwise it breaks
  the ones in the fieldset.
* change the counting in the 'getErrors' of the VMSelector, so that we
  actually get the count of selected VMs, not the one from the
  selectionModel
* override the plugins to '' in the BulkAction windows, so that e.g. in
  the backup window we still have the filters in the grid header
  (we could add a filter box there too, but that is already very crowded
  and would take up too much space for now)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 months agoui: bulk actions: reorder fields and drop local-storage warning
Dominik Csapak [Thu, 9 Nov 2023 10:47:58 +0000 (11:47 +0100)]
ui: bulk actions: reorder fields and drop local-storage warning

For a better screen-space utilization use two columns and remove the
local-storage warning, since this is rather obvious anyway.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ TL: slight commit message rewording ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agofix #2336: ui: adjust message for bulk start/stop/migrate
Folke Gleumes [Tue, 7 Nov 2023 11:38:52 +0000 (12:38 +0100)]
fix #2336: ui: adjust message for bulk start/stop/migrate

The message in the Task Log has been 'Start/Stop/Migrate all...',
which is misleading since not everything might be affected by bulk actions.
This also affects the messages send at a nodes startup and shutdown, but
since this just affects a subgroup of VMs/Containers (those who are
onboot=1) the new wording still applies better than the previous.

Signed-off-by: Folke Gleumes <f.gleumes@proxmox.com>
6 months agoapi: ceph osd: fix description line-wrapping style
Thomas Lamprecht [Mon, 6 Nov 2023 17:26:53 +0000 (18:26 +0100)]
api: ceph osd: fix description line-wrapping style

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agofix #4631: ceph: osd: create: add osds-per-device
Aaron Lauterer [Wed, 23 Aug 2023 09:44:27 +0000 (11:44 +0200)]
fix #4631: ceph: osd: create: add osds-per-device

Allows to automatically create multiple OSDs per physical device. The
main use case are fast NVME drives that would be bottlenecked by a
single OSD service.

By using the 'ceph-volume lvm batch' command instead of the 'ceph-volume
lvm create' for multiple OSDs / device, we don't have to deal with the
split of the drive ourselves.

But this means that the parameters to specify a DB or WAL device won't
work as the 'batch' command doesn't use them. Dedicated DB and WAL
devices don't make much sense anyway if we place the OSDs on fast NVME
drives.

Some other changes to how the command is built were needed as well, as
the 'batch' command needs the path to the disk as a positional argument,
not as '--data /dev/sdX'.
We drop the '--cluster-fsid' parameter because the 'batch' command
doesn't accept it. The 'create' will fall back to reading it from the
ceph.conf file.

Removal of OSDs works as expected without any code changes. As long as
there are other OSDs on a disk, the VG & PV won't be removed, even if
'cleanup' is enabled.

The '--no-auto' parameter is used to avoid the following deprecation
warning:
```
--> DEPRECATION NOTICE
--> You are using the legacy automatic disk sorting behavior
--> The Pacific release will change the default to --no-auto
--> passed data devices: 1 physical, 0 LVM
--> relative data size: 0.3333333333333333
```

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
6 months agoui: sdn: homogenize the casing of labels
Stefan Lendl [Tue, 10 Oct 2023 13:30:53 +0000 (15:30 +0200)]
ui: sdn: homogenize the casing of labels

use title case, or upper case for abbreviations, everywhere.

Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
 [ TL: adapt commit subject to our style guides ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: refer to SDN subnets as 'Subnet' not as ID
Stefan Lendl [Tue, 10 Oct 2023 13:30:52 +0000 (15:30 +0200)]
ui: refer to SDN subnets as 'Subnet' not as ID

The Subnet's CIDR in the Edit view is called 'Subnet'.
Also refer to it as Subnet in the list view.

Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
 [ TL: prefix commit subject with sub-system ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agopve7to8: check for proper grub meta-package for bootmode
Stoiko Ivanov [Wed, 11 Oct 2023 13:23:42 +0000 (15:23 +0200)]
pve7to8: check for proper grub meta-package for bootmode

This should catch installations from our ISO on non-ZFS in uefi mode,
which won't get the updated grub efi binary installed upon upgrade,
because grub-pc is installed instead of grub-efi-amd64.

Adding this to pve7to8 should make this even more visible, than the
corresponding patch for promxox-kernel-helper (warnings printed during
regular package upgrades might be overlooked more easily than
a yellow line in the major upgrade checkscript)

The if/else order was chosen to limit the nesting level of the long
messages.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
6 months agoui: guest wizard: increase height to match 4:3 ratio
Thomas Lamprecht [Mon, 6 Nov 2023 16:26:59 +0000 (17:26 +0100)]
ui: guest wizard: increase height to match 4:3 ratio

solving an issue where the CPU extra-flags grid had less space than
it's fixed height allowed.
While we also could have reduced that height, having a nicer ratio and
a bit more vertical "breathing room" seem slightly nicer to me.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: wizards: allow adding tags in the qemu/lxc create wizard
Dominik Csapak [Wed, 25 Oct 2023 11:09:38 +0000 (13:09 +0200)]
ui: wizards: allow adding tags in the qemu/lxc create wizard

in the general tab in the advanced section.

For that to work, we introduce a new option for the TagEditContainer
named 'editOnly', which controls now the cancel/finish buttons,
automatically enter edit mode and disable enter/escape keypresses.

We also prevent now the loading of tags while in edit mode, so the tags
don't change while editing (this can be jarring and unexpected).

Then we wrap that all in a FieldSet that implements the Field mixin, so
we can easily use that in the wizard. There we set a maxHeight so that
the field can grow so that it still fits in the wizard.

To properly align the input with the '+' button, we have to add a custom
css class there. (In the hbox we could set the alignment, but this is
not possible in the 'column' layout)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 months agonode console: allow usage for non-pam realms
Fabian Grünbichler [Wed, 14 Jun 2023 10:42:14 +0000 (12:42 +0200)]
node console: allow usage for non-pam realms

non-login commands are still restricted to root@pam if they where before.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 months agonode console: restrict all non-login commands to root@pam
Fabian Grünbichler [Wed, 14 Jun 2023 10:42:13 +0000 (12:42 +0200)]
node console: restrict all non-login commands to root@pam

and not just upgrade.

note that the only other non-login command (ceph_install) is restricted to
root@pam in the web UI anyway, and that the termproxy endpoint is lacking this
check and thus always falls back to a login prompt for non-login commands
requested by non-root users.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 months agoreport: add hint for dir2text
Thomas Lamprecht [Thu, 2 Nov 2023 19:59:49 +0000 (20:59 +0100)]
report: add hint for dir2text

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoreport: add sdn config directory
Aaron Lauterer [Tue, 31 Oct 2023 11:27:41 +0000 (12:27 +0100)]
report: add sdn config directory

the /etc/pve/sdn directory contains the config files, not just what they
translate to in interface configs (/etc/network/interfaces.d/snd).

The current way will also include dotifiles that may contain the
current/running state. Which can be useful to troubleshoot.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
6 months agoreport: add interfaces.d directory
Aaron Lauterer [Tue, 3 Oct 2023 11:36:38 +0000 (13:36 +0200)]
report: add interfaces.d directory

With the SDN becoming more prevalent, it is a good idea to include any
additional config files in '/etc/network/interfaces.d'.

Since no special suffix is enforced, we need to match against any file.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
6 months agoreport: dir2text: ignore special . and .. files
Aaron Lauterer [Tue, 3 Oct 2023 11:36:37 +0000 (13:36 +0200)]
report: dir2text: ignore special . and .. files

So far this hasn't been an issue as each user of dir2text wanted files
with a specific pattern. But if we want every file in the directory, we
need to skip the special files '.' and '..'.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
6 months agoupdate shipped aplliance info index
Thomas Lamprecht [Mon, 30 Oct 2023 09:31:02 +0000 (10:31 +0100)]
update shipped aplliance info index

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agobump version to 8.0.7
Thomas Lamprecht [Sun, 29 Oct 2023 18:52:45 +0000 (19:52 +0100)]
bump version to 8.0.7

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: disable new notification UI for now, will be reworked
Thomas Lamprecht [Sun, 29 Oct 2023 18:47:40 +0000 (19:47 +0100)]
ui: disable new notification UI for now, will be reworked

Lukas is currently reworking this so that we have a single panel,
where the filters are match-entries that can also provide the
functionality of the hard-coded filters in the other panel, reducing
complexity and adding flexibility.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: datacenter config: adapt to new default MAC prefix
Thomas Lamprecht [Sun, 29 Oct 2023 17:02:20 +0000 (18:02 +0100)]
ui: datacenter config: adapt to new default MAC prefix

The official Proxmox OUI, assigned by the IEEE, is now used as
default.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agosubscription: remove ceph APT auth if invalid
Fabian Grünbichler [Wed, 25 Oct 2023 13:34:35 +0000 (15:34 +0200)]
subscription: remove ceph APT auth if invalid

like we do for the main APT auth file(s) in proxmox-subscription.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 months agod/control: bump libpve-network-perl suggestion
Fabian Grünbichler [Wed, 25 Oct 2023 11:14:26 +0000 (13:14 +0200)]
d/control: bump libpve-network-perl suggestion

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 months agosdn: controllers: add isis controller
Alexandre Derumier [Wed, 13 Sep 2023 11:38:42 +0000 (13:38 +0200)]
sdn: controllers: add isis controller

6 months agoui: tags: fix focus for edit mode
Dominik Csapak [Thu, 19 Oct 2023 13:36:05 +0000 (15:36 +0200)]
ui: tags: fix focus for edit mode

such that one can tab through the editable tag fields.
We have to handle that manually, since ExtJs does not expect
contenteditable html tags for focus handling.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: container guest status: show distro logo and name in summary header
Christoph Heiss [Wed, 5 Jul 2023 11:12:49 +0000 (13:12 +0200)]
ui: container guest status: show distro logo and name in summary header

It fits neatly there, is rather intrusive and yet still visible at
first sight. It also solves the problem of having to create a bigger
row, so that the icon is still easily recognisable. At the default
font-size of 13pt, this really wasn't the case.

Verified that each supported distro is present in the font and the
name matches up and tested through all supported distros (including
'unmanaged').

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
 [ TL: html-encode, just to be sure, as reviewed by Dominik ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: container guest status: show privileged status as new row
Christoph Heiss [Wed, 5 Jul 2023 11:12:48 +0000 (13:12 +0200)]
ui: container guest status: show privileged status as new row

As that info is not available through the store (which stores the
status), it must be fetched separately.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
 [ TL: rework subject and avoid arror-fn for controller to keep `this`
   working, as reviewed by Dominik ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoexpose font-logos via API server and load in UI
Christoph Heiss [Wed, 5 Jul 2023 11:12:47 +0000 (13:12 +0200)]
expose font-logos via API server and load in UI

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agopvesh: code clean-ups
Thomas Lamprecht [Sat, 21 Oct 2023 14:32:17 +0000 (16:32 +0200)]
pvesh: code clean-ups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agopvesh: code cleanups for streamed response handling
Thomas Lamprecht [Thu, 19 Oct 2023 13:26:08 +0000 (15:26 +0200)]
pvesh: code cleanups for streamed response handling

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agopvesh: decode streamed responses
Christoph Heiss [Wed, 7 Jun 2023 14:15:11 +0000 (16:15 +0200)]
pvesh: decode streamed responses

This allows to use `pvesh` on endpoints like /nodes/{node}/journal,
which return streamed (and possibly gzip'd) responses.

Currently, e.g. `pvesh get /nodes/localhost/journal --lastentries 10`
fails with:

  gzip: stdout: Broken pipe
  got hash object, but result schema specified array!

Using e.g. `--output-format yaml` resulted in:

  ---
  download:
    content-encoding: gzip
    content-type: application/json
    fh: &1 !!perl/ref
      =: *1
    stream: 1

  gzip: stdout: Broken pipe
  Failed to write

This is due the API call returning a "download" object (as seen above),
which contains (among some other things) a file handle to read the
response from.

With this patch, the response from such endpoints is now correctly read
and displayed. Only handles combinations of `Content-Encoding` == 'gzip'
and either 'text/plain' or 'application/json' for `Content-Type`.

This tries to mimic the behavior of the API server implementation when
encountering `download` objects.

Tested this with all four output formats 'text', 'json', 'json-pretty'
and 'yaml', as well as "cross-node" in a local test cluster.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
6 months agoui: ceph wizard: switch to reef as default release for new setups
Thomas Lamprecht [Tue, 17 Oct 2023 10:54:57 +0000 (12:54 +0200)]
ui: ceph wizard: switch to reef as default release for new setups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: css: rename pmx-faded utility class to pmx-opacity-75
Thomas Lamprecht [Fri, 13 Oct 2023 15:26:52 +0000 (17:26 +0200)]
ui: css: rename pmx-faded utility class to pmx-opacity-75

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: clarify that compression selector is for backup only
Thomas Lamprecht [Wed, 11 Oct 2023 13:59:42 +0000 (15:59 +0200)]
ui: clarify that compression selector is for backup only

other targets/sources might have a different list of available
compressions.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: makefile: readd compression selector form
Christian Ebner [Wed, 11 Oct 2023 10:29:12 +0000 (12:29 +0200)]
ui: makefile: readd compression selector form

Commit 65704cc2a88729479fb15ec2a5b3df683b8f2aac apparently removed by
misstake the form/CompressionSelector.js from the Makefile.

It is however required by the backup view to select the compression
method, so readd it.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
6 months agoui: ceph warnings: drop summary copy button
Thomas Lamprecht [Tue, 10 Oct 2023 16:03:16 +0000 (18:03 +0200)]
ui: ceph warnings: drop summary copy button

talked with Aaron off-list and he found it OK to drop this button now
that "Copy Details" became a "Copy All".

This reduces cognitive load on the user as there are half as many
buttons.

Rename "Copy All" to "Copy to Clipboard" now that there's only one and
drop the disable logic.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: ceph warnings: do not scroll expanded content into view
Thomas Lamprecht [Tue, 10 Oct 2023 13:31:14 +0000 (15:31 +0200)]
ui: ceph warnings: do not scroll expanded content into view

this causes jumps and is IMO rather irritating, keep hands off from
scrolling, that's best done by user/browser.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: ceph warnings: lower opacity for no-details text
Thomas Lamprecht [Tue, 10 Oct 2023 13:29:21 +0000 (15:29 +0200)]
ui: ceph warnings: lower opacity for no-details text

to make it more clear that this is not the details, but a UI text
placeholder.
Add a `pmx-faded` class that reduced opacity, as there where recent
discussion about adding such a utility class to widget-toolkit anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: ceph warnings: disable copy-all if there are no additional infos
Thomas Lamprecht [Tue, 10 Oct 2023 13:28:45 +0000 (15:28 +0200)]
ui: ceph warnings: disable copy-all if there are no additional infos

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: ceph warnings: switch copy-details to copy-all
Thomas Lamprecht [Tue, 10 Oct 2023 13:27:45 +0000 (15:27 +0200)]
ui: ceph warnings: switch copy-details to copy-all

With health level, summary and full details.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: ceph warnings: use normal font-weight
Thomas Lamprecht [Tue, 10 Oct 2023 06:19:33 +0000 (08:19 +0200)]
ui: ceph warnings: use normal font-weight

The use of the <pre> tag will result in font-family `monospace`, and
monospace fonts are often a bit odd w.r.t. size and weight. E.g.,
without this I get a light-font selected, which is hardly visible.

Set the weight to normal, which should not hurt those that got a
better font selection by there system/browser already.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: ceph warnings: render whitespace as pre-wrap
Thomas Lamprecht [Tue, 10 Oct 2023 06:17:29 +0000 (08:17 +0200)]
ui: ceph warnings: render whitespace as pre-wrap

To avoid potential horizontal scrolling on smaller screens, which can
be a PITA as the scroll bar is at the bottom, so users have to scroll
down to move it left and right..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: ceph warnings: code cleanups
Thomas Lamprecht [Tue, 10 Oct 2023 06:24:09 +0000 (08:24 +0200)]
ui: ceph warnings: code cleanups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoui: ceph: improve discoverability of warning details
Aaron Lauterer [Mon, 2 Oct 2023 09:00:26 +0000 (11:00 +0200)]
ui: ceph: improve discoverability of warning details

by
* replacing the info button with expandable rows that contain the
  details of the warning
* adding two action buttons to copy the summary and details
* making the text selectable

The row expander works like the one in the mail gateway tracking center
-> doubleclick only opens it.

The height of the warning grid is limited to not grow too large.
A Diffstore is used to avoid expanded rows being collapsed on an update.

The rowexpander cannot hide the toggle out of the box. Therefore, if
there is no detailed message for a warning, we show a placeholder text.
We could consider extending it in the future to only show the toggle if
a defined condition is met.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoapi tools: fix usage of stat by-name interface
Thomas Lamprecht [Tue, 10 Oct 2023 13:38:07 +0000 (15:38 +0200)]
api tools: fix usage of stat by-name interface

Fixes: f6395eb6 ("hw-address: check if source file changed so cache needs update")
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agoapi tools: improve use-statement sorting and grouping
Thomas Lamprecht [Tue, 10 Oct 2023 13:33:41 +0000 (15:33 +0200)]
api tools: improve use-statement sorting and grouping

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agohw-address: check if source file changed so cache needs update
Maximiliano Sandoval [Mon, 9 Oct 2023 09:35:58 +0000 (11:35 +0200)]
hw-address: check if source file changed so cache needs update

We cache the hash of this file, it makes sense to first check if the
file changed via `stat` and recompute the hash if needed.

This mirrors similar changes done for PMG [0].

[0]: https://git.proxmox.com/?p=pmg-api.git;a=commit;h=16d2ff9f8e90db64114a66d78672f5a03f5ee990.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
7 months agoapi: subscription update: actually ignore surrounding whitespace
Thomas Lamprecht [Thu, 5 Oct 2023 08:24:30 +0000 (10:24 +0200)]
api: subscription update: actually ignore surrounding whitespace

We already trim correctly in the API endpoint's code, but that happens
after the parameter verification from the REST server, and as
patterns are anchored between ^$pattern$ there by default, it fails if
someone sends some whitespace before/after the actual key.

Simply allow arbitrary whitespace, but only at the API endpoint
itself, do not adapt the subscription pattern to avoid that an actual
whitespace sneaks in and let some lower level code throw up on it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 months agoui: subscription upload: trim key from whitespace on submission
Thomas Lamprecht [Thu, 5 Oct 2023 11:35:29 +0000 (13:35 +0200)]
ui: subscription upload: trim key from whitespace on submission

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 months agoui: subscription upload: increase window and label width
Thomas Lamprecht [Thu, 5 Oct 2023 11:32:55 +0000 (13:32 +0200)]
ui: subscription upload: increase window and label width

Quite a few translations produce a longer label here, so account for
that, the window is still very small.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>