]> git.proxmox.com Git - pve-manager.git/log
pve-manager.git
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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 months agoui: subscription panel: code reduction and modernization
Thomas Lamprecht [Thu, 5 Oct 2023 11:31:23 +0000 (13:31 +0200)]
ui: subscription panel: code reduction and modernization

Drop quite a few lines while actually improving readability.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 months agopve7to8: Add check for dkms modules
Christian Ebner [Tue, 1 Aug 2023 08:42:09 +0000 (10:42 +0200)]
pve7to8: Add check for dkms modules

... and warn if at least one is present.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
7 months agoui: storage content: transform detected compression extension to lower-case
Thomas Lamprecht [Wed, 27 Sep 2023 14:58:58 +0000 (16:58 +0200)]
ui: storage content: transform detected compression extension to lower-case

otherwise the form will be invalid if a uppercase one comes in.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 months agoui: vm selector: gracefully handle undefined/null in setValue function
Fiona Ebner [Mon, 25 Sep 2023 11:58:41 +0000 (13:58 +0200)]
ui: vm selector: gracefully handle undefined/null in setValue function

Suggested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
7 months agoui: vm selector: don't add invalid not found items
Fiona Ebner [Mon, 25 Sep 2023 11:58:40 +0000 (13:58 +0200)]
ui: vm selector: don't add invalid not found items

Doing a simple numericity check and warn in the console so developers
can notice if there is something off.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
7 months agoui: vm selector: gracefully handle empty IDs in setValue function
Fiona Ebner [Mon, 25 Sep 2023 11:58:39 +0000 (13:58 +0200)]
ui: vm selector: gracefully handle empty IDs in setValue function

An empty string is passed by the backup job window when using
selection mode 'all', would be converted to [""] and wrongly add an
entry with VMID 0 because the item "" could not be found in the store.

Reported in the community forum:
https://forum.proxmox.com/threads/130164/

Fixes: 7a5ca76a ("fix #4239: ui: show selected but non-existing vmids in backup edit")
Suggested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
7 months agopve7to8: Fix Fedora 38 systemd unified cgroupv2 check
Christian Ebner [Mon, 28 Aug 2023 07:54:14 +0000 (09:54 +0200)]
pve7to8: Fix Fedora 38 systemd unified cgroupv2 check

For Fedora 38 the systemd shared object files used to check the systemd
version are located at /usr/lib64/systemd or /usr/lib/systemd.
Therefore, include /usr/lib64/systemd in the list of directories to
check.

Further, Fedora 38 adds a fc38 postfix to the filename, so expand the
regex to cover that as well.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
7 months agoRevert "api: query_url_metadata: optionally detect compression"
Thomas Lamprecht [Tue, 26 Sep 2023 11:00:12 +0000 (13:00 +0200)]
Revert "api: query_url_metadata: optionally detect compression"

A simple string regex match on data that the API returns anyway can be
the job of a frontend/client..

Safe to do as we never released this API change in a bumped manager
version and switched the UI to extract this info client-side.

This reverts commit d61728e289c82c7ce35a03b5b6b3da45ae177c5c.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 months agoui: storage content: extract possible compressor extension client side
Thomas Lamprecht [Tue, 26 Sep 2023 15:58:55 +0000 (17:58 +0200)]
ui: storage content: extract possible compressor extension client side

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 months agoui: avoid trivial decompression widget, only used once
Thomas Lamprecht [Tue, 26 Sep 2023 15:55:34 +0000 (17:55 +0200)]
ui: avoid trivial decompression widget, only used once

Currently it was only used once and it had not really any benefit, as
the one thing it did is defining a list of compressors – the
KVComboBox is made such, so that this can be done on definition
directly, no need for inheritance.

Also, if one would think about adopting this more for other similar
selectors: While we have some uses of compressors all over the place,
and most of them are not really coupled to each other, so having a
single widget for them does not make sense.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 months agofix #4849: ui: allow decompressing ISO files when downloading
Philipp Hufnagl [Thu, 21 Sep 2023 13:09:17 +0000 (15:09 +0200)]
fix #4849: ui: allow decompressing ISO files when downloading

The compression algorithm will be automatically detected when querying the
download URL. It can be overriden by the user using the "compression algorithm"
drop down under advanced.

Signed-off-by: Philipp Hufnagl <p.hufnagl@proxmox.com>
Reworded title and message, updated d/control for libpve-storage-perl version
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
7 months agoapi: query_url_metadata: optionally detect compression
Philipp Hufnagl [Thu, 21 Sep 2023 13:09:16 +0000 (15:09 +0200)]
api: query_url_metadata: optionally detect compression

extend the query_url_metadata endpoint with the option to detect and return
used compression algorithms, if supported by PVE. this will be used to support
decompression as part of the download flow for certain file types (ISO files
for now).

Signed-off-by: Philipp Hufnagl <p.hufnagl@proxmox.com>
Slightly reworded commit title/message
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
8 months agod/control: bump dependency of pve-container and guest-common
Thomas Lamprecht [Mon, 18 Sep 2023 14:55:08 +0000 (16:55 +0200)]
d/control: bump dependency of pve-container and guest-common

While not a must, it helps to ensure we got the newly documented
pbs-entries-max feature actually available and avoids all to freaky
set ups.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agofix #3069: vzdump: add property 'performance: pbs-entries-max=N'
Alexander Zeidler [Fri, 28 Jul 2023 13:28:55 +0000 (15:28 +0200)]
fix #3069: vzdump: add property 'performance: pbs-entries-max=N'

configuring pbs-entries-max can avoid failing backups due to a high
amount of files in folders where a folder exclusion is not possible

Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
8 months agoui: notification: remove unneeded gettext calls
Lukas Wagner [Mon, 18 Sep 2023 08:20:26 +0000 (10:20 +0200)]
ui: notification: remove unneeded gettext calls

'mail-to-root' is the name of the default notification target and
should thus not be translated.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
8 months agoui: notifications event: fix using gettext
Thomas Lamprecht [Thu, 14 Sep 2023 06:15:02 +0000 (08:15 +0200)]
ui: notifications event: fix using gettext

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agobump version to 8.0.6
Thomas Lamprecht [Fri, 8 Sep 2023 11:41:30 +0000 (13:41 +0200)]
bump version to 8.0.6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agoapi: pool update: rename 'transfer' parameter to 'allow-move'
Thomas Lamprecht [Fri, 8 Sep 2023 11:31:30 +0000 (13:31 +0200)]
api: pool update: rename 'transfer' parameter to 'allow-move'

The 'allow' wording makes it clearer that we just not block something,
but do not really do anything else. And we use the 'move' wording also
for when moving volumes between guests, which is in the same spirit as
this here (remove something from a entity and add it to another).

While this was already bumped, we did not move it outside of pvetest,
so I do not see practical concerns with API breakage.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agoapi: pool update: refactor/code-clean-up guest handling
Thomas Lamprecht [Fri, 8 Sep 2023 11:30:41 +0000 (13:30 +0200)]
api: pool update: refactor/code-clean-up guest handling

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agoapi: pool update: improve description and document defaults
Thomas Lamprecht [Fri, 8 Sep 2023 11:29:26 +0000 (13:29 +0200)]
api: pool update: improve description and document defaults

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agoui: pool view: make window bigger and 4:3 ratio
Thomas Lamprecht [Fri, 8 Sep 2023 11:13:54 +0000 (13:13 +0200)]
ui: pool view: make window bigger and 4:3 ratio

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agoui: pool view: simplify guest-status renderer
Thomas Lamprecht [Fri, 8 Sep 2023 11:11:09 +0000 (13:11 +0200)]
ui: pool view: simplify guest-status renderer

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agoui: pool view: label pool-column as 'Current Pool'
Thomas Lamprecht [Fri, 8 Sep 2023 11:09:46 +0000 (13:09 +0200)]
ui: pool view: label pool-column as 'Current Pool'

to make it clearer, as having such a column could be slightly
confusing to some.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agoui: pool view: replace allow-transfer checkbox with simple hint
Thomas Lamprecht [Fri, 8 Sep 2023 11:08:03 +0000 (13:08 +0200)]
ui: pool view: replace allow-transfer checkbox with simple hint

It's not really providing good UX, as user needs to extra tick this
but cannot be sure what transfer means in this case.

Just replace this with a simple, more telling hint that will inform
users about what happens.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agofix #4808: ceph: mds create: use snake_case when setting options
Maximiliano Sandoval [Tue, 5 Sep 2023 08:53:31 +0000 (10:53 +0200)]
fix #4808: ceph: mds create: use snake_case when setting options

As suggested in [1], it is recommended to use `_` in all cases when
dealing with config files. Note that this is for creation only, and we
enforce that there cannot be an existing MDS with the same ID, so we
do not have to bother how ceph would handle the case where both exist.

[1] https://docs.ceph.com/en/reef/rados/configuration/ceph-conf/#option-names

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agofix #4947 spice: correct filename extension safari
Markus Frank [Wed, 6 Sep 2023 09:37:03 +0000 (11:37 +0200)]
fix #4947 spice: correct filename extension safari

Fix file extension for SPICE config download on
AppleWebKit browsers to ensure proper application
association on MacOS.

Signed-off-by: Markus Frank <m.frank@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agoui: ldap: ad: replace occurences of SSL with TLS
Lukas Wagner [Thu, 27 Jul 2023 08:57:47 +0000 (10:57 +0200)]
ui: ldap: ad: replace occurences of SSL with TLS

Although 'SSL' is used colloquially, the proper term is 'TLS'.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
8 months agoui: ldap: ad: fix typo for verify certificate combobox
Lukas Wagner [Thu, 27 Jul 2023 08:57:46 +0000 (10:57 +0200)]
ui: ldap: ad: fix typo for verify certificate combobox

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
8 months agoui: ldap: ad: support 'mode' paramter, replacing 'secure'
Lukas Wagner [Thu, 27 Jul 2023 08:57:45 +0000 (10:57 +0200)]
ui: ldap: ad: support 'mode' paramter, replacing 'secure'

The backend has supported the 'mode' parameter for quite a while,
however it has not yet been exposed in the GUI, contrary to PMG
and PBS.

The benefit of 'mode' is that it supports LDAP, LDAPS and LDAP via
STARTTLS, compared to just LDAP/LDAPS for the 'secure' parameter.

The modified AuthEdit{LDAP,AD} panel will now automatically migrate
to the new paramter by hooking into onGetValues/onSetValues.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
8 months agoui: ceph: add Ceph 19 Squid to release map
Thomas Lamprecht [Mon, 4 Sep 2023 16:06:46 +0000 (18:06 +0200)]
ui: ceph: add Ceph 19 Squid to release map

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agoui: ceph wizard: add Ceph 18.2 Reef to available releases
Thomas Lamprecht [Mon, 4 Sep 2023 16:05:44 +0000 (18:05 +0200)]
ui: ceph wizard: add Ceph 18.2 Reef to available releases

still default to Ceph 17.2 Quincy for now, at least if there isn't a
Ceph Reef set-up in the cluster already.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agoui: ceph wizard: drop unused gettext
Thomas Lamprecht [Mon, 4 Sep 2023 16:05:28 +0000 (18:05 +0200)]
ui: ceph wizard: drop unused gettext

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agopveceph: support installing Ceph 18.2 Reef
Thomas Lamprecht [Mon, 4 Sep 2023 16:05:08 +0000 (18:05 +0200)]
pveceph: support installing Ceph 18.2 Reef

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agoapi: ceph osd: factor out getting PSS stat & improve error handling
Thomas Lamprecht [Mon, 4 Sep 2023 12:24:17 +0000 (14:24 +0200)]
api: ceph osd: factor out getting PSS stat & improve error handling

Do not crowd the higher level API endpoint handler code directly with
some rather low level procfs parsing code, rather factor that out in a
helper. Make said helper private for now so that anybody wanting to
use cannot do so, and thus increase the chance that said dev will
actually think about if this makes sense as is as a general interface.

Avoid fatal die's for the odd case that the smaps_rollup file cannot
be opened, or the even less likely case where PSS stats cannot be
found in the content.

The former could happen due to the general TOCTOU race here, i.e., the
PID we get from systemctl service status parsing isn't guaranteed to
exist anymore when we read from procfs, and if, it's actually not
guaranteed to still be the OSD - but we cannot easily use pidfd's
here and OSD stops are not something that happens frequently, but in
anyway avoid that such a thing fails the whole API call only because a
single metric is affected.

In the long rung it might be better to add a "errors" array to the
response, so that the user can be informed about such an (odd) thing
happening.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agoapi: ceph osd: drop unused variable and useless intermediate code
Thomas Lamprecht [Mon, 4 Sep 2023 12:22:27 +0000 (14:22 +0200)]
api: ceph osd: drop unused variable and useless intermediate code

$raw isn't used anywhere here and probably just a left over from copy
pasting, and the "int cast ternary" can be avoided by just directly
casting to int when assigning the variable in the first place.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agoapi: ceph: improve reporting of ceph OSD memory usage
Stefan Hanreich [Mon, 4 Sep 2023 09:18:07 +0000 (11:18 +0200)]
api: ceph: improve reporting of ceph OSD memory usage

Currently we are using the MemoryCurrent property of the OSD service
to determine the used memory of a Ceph OSD. This includes, among other
things, the memory used by buffers [1]. Since BlueFS uses buffered
I/O, this can lead to extremely high values shown in the UI.

Instead we are now reading the PSS value from the proc filesystem,
which should more accurately reflect the amount of memory currently
used by the Ceph OSD.

Aaron and I decided on PSS over RSS, since this should give a better
idea of used memory - particularly when using a large amount of OSDs
on one host, since the OSDs share some of the pages.

[1] https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
Tested-by: Aaron Lauterer <a.lauterer@proxmox.com>
8 months agoui: replication: backup: use renderEnabledIcon to render the enabled column
Lukas Wagner [Tue, 18 Jul 2023 09:53:05 +0000 (11:53 +0200)]
ui: replication: backup: use renderEnabledIcon to render the enabled column

The new helper is available since proxmox-widget-toolkit version 3.6.1
which we can be sure to be available since a while in praxis, but
definitively by d/control constraints, since 51f54177 ("bump
proxmox-widget-toolkit dependency to 4.0.7")

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
 [TL: add context since when this function is available ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agovzdump: fix notifications for backing up VMs with 2+ disks to PBS
Lukas Wagner [Fri, 25 Aug 2023 09:45:12 +0000 (11:45 +0200)]
vzdump: fix notifications for backing up VMs with 2+ disks to PBS

In some situations, such as backing up VMs with 2 or more disks to
PBS, we get passed the backup archive size as a string instead of
as an integer. This led to errors rendering the notification template
down the line.

This commit explicitly casts the data from the task table to an int.
It would be a good idea to actually hunt down the places that produced
the string instead of an integer, but as a quick fix and as a
safeguard against similar lurking errors this approach is fine, IMO.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
8 months agowebsite: update external links to www.proxmox.com
Christian Ebner [Fri, 11 Aug 2023 10:46:54 +0000 (12:46 +0200)]
website: update external links to www.proxmox.com

During the redesign of www.proxmox.com the menu structure and therefore
some url changed. Update the external link in order to avoid an
unneccessary redirect

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
8 months agofix #4663: Prevent Web UI reload on cert order for other node
Filip Schauer [Wed, 16 Aug 2023 09:54:57 +0000 (11:54 +0200)]
fix #4663: Prevent Web UI reload on cert order for other node

While it makes sense to reload the Web UI after ordering a certificate
for the same node, it is unnecessary to reload the Web UI when ordering
a certificate for a different node.

Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
9 months agobump version to 8.0.5
Wolfgang Bumiller [Wed, 16 Aug 2023 10:12:47 +0000 (12:12 +0200)]
bump version to 8.0.5

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
9 months agobump pve-doc-generator dependency
Wolfgang Bumiller [Wed, 16 Aug 2023 10:10:33 +0000 (12:10 +0200)]
bump pve-doc-generator dependency

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
9 months agofix mocking in notification tests
Wolfgang Bumiller [Wed, 16 Aug 2023 09:58:20 +0000 (11:58 +0200)]
fix mocking in notification tests

PVE::Notify::send_notification is now private (the mocking was for the
old api)

'cfs_read_file' gets exported into PVE::Notify before it gets mocked,
so it needs to be mocked inside PVE::Notify, not PVE::Cluster.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
9 months agovzdump: use <name> as a convention for virtual endpoints/groups
Lukas Wagner [Thu, 3 Aug 2023 12:17:12 +0000 (14:17 +0200)]
vzdump: use <name> as a convention for virtual endpoints/groups

Virtual (or anonymous) endpoints/groups are used for sending
one-off notifications to a target that does not exist in the
config.

VZDump uses this to send out notification mails to those addresses
configured by the `mailto` parameter.

Suggested-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
9 months agobump proxmox-widget-toolkit dependency to 4.0.7
Wolfgang Bumiller [Wed, 16 Aug 2023 09:11:57 +0000 (11:11 +0200)]
bump proxmox-widget-toolkit dependency to 4.0.7

for the notification ui

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
9 months agoapi: notification: make the 'mail-to-root' target visible to any user
Lukas Wagner [Thu, 3 Aug 2023 12:17:13 +0000 (14:17 +0200)]
api: notification: make the 'mail-to-root' target visible to any user

Since the target does not require Mapping.Use, it should also be
visible and testable by all users.

Short explanation why the 'mail-to-root' is exempt from priv checks:

To ensure backwards compatibility, the 'mail-to-root' target does not
require the `Mapping.Use` privs. This is needed due to the fact that
this target is used as a fallback in case no other target is
configured for an event. For instance, the /node/<name>/apt/update API
call only requires Sys.Modify for the node, but it can also send a
notification. If we were to require Mapping.Use, we could break the
apt/update API compat in the case that a notification shall be sent,
but without any configured notification target (which will then
default to 'mail-to-root').

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
9 months agoui: dc: remove notify key from datacenter option view
Lukas Wagner [Thu, 3 Aug 2023 12:17:11 +0000 (14:17 +0200)]
ui: dc: remove notify key from datacenter option view

Settings for notifications have been moved to their own view.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
9 months agoui: perm path: increase width of the perm path selector combobox
Lukas Wagner [Thu, 3 Aug 2023 12:17:10 +0000 (14:17 +0200)]
ui: perm path: increase width of the perm path selector combobox

ACL paths for notification targets can become quite long, e.g.:
/mappings/notifications/<target name>

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
9 months agoui: perm path: add ACL paths for notifications, usb and pci mappings
Lukas Wagner [Thu, 3 Aug 2023 12:17:09 +0000 (14:17 +0200)]
ui: perm path: add ACL paths for notifications, usb and pci mappings

Suggested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
9 months agoui: add notification target configuration panel
Lukas Wagner [Thu, 3 Aug 2023 12:17:08 +0000 (14:17 +0200)]
ui: add notification target configuration panel

Embed the new notification target configuration panel, implemented in
proxmox-widget-toolkit.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
9 months agoui: allow to configure notification event -> target mapping
Lukas Wagner [Thu, 3 Aug 2023 12:17:07 +0000 (14:17 +0200)]
ui: allow to configure notification event -> target mapping

This commit adds a new view that allows configuring notification
targets for all existing notification events (replication, updates,
fencing).

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
9 months agoui: backup: allow to set notification-target for one-off backups
Lukas Wagner [Thu, 3 Aug 2023 12:17:06 +0000 (14:17 +0200)]
ui: backup: allow to set notification-target for one-off backups

In essence the same change as for backup jobs.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
9 months agoui: backup: adapt backup job details to new notification params
Lukas Wagner [Thu, 3 Aug 2023 12:17:05 +0000 (14:17 +0200)]
ui: backup: adapt backup job details to new notification params

Adapt the backup job detail view so that it shows notification
targets.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
9 months agoui: backup: allow to select notification target for jobs
Lukas Wagner [Thu, 3 Aug 2023 12:17:04 +0000 (14:17 +0200)]
ui: backup: allow to select notification target for jobs

This commit adds a possibility to choose between different options
for notifications for backup jobs:
    - Notify via email, in the same manner as before
    - Notify via an endpoint/group

If 'notify via mail' is selected, a text field where an email address
can be entered is displayed:

    Notify:         | Always notify  v |
    Notify via:     | E-Mail         v |
    Send Mail to:   | foo@example.com  |
    Compression:    | .....          v |

If the other option is selected selected, a combo picker for selecting
a channel is displayed:

    Notify:         | Always notify  v |
    Notify via:     | Endpoint/Group v |
    Target:         | endpoint-foo   v |
    Compression:    | .....          v |

The code has also been adapted to use the newly introduced
'notification-policy' parameter, which replaces the 'mailnotification'
paramter for backup jobs. Some logic which automatically migrates from
'mailnotification' has been added.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
9 months agoapi: notification: disallow removing targets if they are used
Lukas Wagner [Thu, 3 Aug 2023 12:17:03 +0000 (14:17 +0200)]
api: notification: disallow removing targets if they are used

Check notification targets configured in datacenter.cfg and jobs.cfg,
failing if the group/endpoint to be removed is still in use there.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
9 months agoapi: notification: allow to test targets
Lukas Wagner [Thu, 3 Aug 2023 12:17:02 +0000 (14:17 +0200)]
api: notification: allow to test targets

This API call allows the user to test a notification target.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
9 months agoapi: notification: allow fetching notification targets
Lukas Wagner [Thu, 3 Aug 2023 12:17:01 +0000 (14:17 +0200)]
api: notification: allow fetching notification targets

The API call returns all entities that can be used as notification
targets (endpoints, groups). Only targets for which the user has
appropriate permissions are returned.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
9 months agoapi: notification: add api routes for filters
Lukas Wagner [Thu, 3 Aug 2023 12:17:00 +0000 (14:17 +0200)]
api: notification: add api routes for filters

The Perl part of the API methods primarily defines the API schema,
checks for any needed priviledges 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>
9 months agoapi: notification: add api routes for gotify endpoints
Lukas Wagner [Thu, 3 Aug 2023 12:16:59 +0000 (14:16 +0200)]
api: notification: add api routes for gotify endpoints

The Perl part of the API methods primarily defines the API schema,
checks for any needed priviledges 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>
9 months agoapi: notification: add api routes for sendmail endpoints
Lukas Wagner [Thu, 3 Aug 2023 12:16:58 +0000 (14:16 +0200)]
api: notification: add api routes for sendmail endpoints

The Perl part of the API methods primarily defines the API schema,
checks for any needed priviledges 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>
9 months agoapi: notification: add api routes for groups
Lukas Wagner [Thu, 3 Aug 2023 12:16:57 +0000 (14:16 +0200)]
api: notification: add api routes for groups

The Perl part of the API methods primarily defines the API schema,
checks for any needed priviledges 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>
9 months agoapi: prepare api handler module for notification config
Lukas Wagner [Thu, 3 Aug 2023 12:16:56 +0000 (14:16 +0200)]
api: prepare api handler module for notification config

This commit adds a new Perl module, PVE::API2::Cluster::Notification.
The module will contain all API handlers for the new notification
subsystem.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
9 months agoapi: replication: send notifications via new notification module
Lukas Wagner [Thu, 3 Aug 2023 12:16:55 +0000 (14:16 +0200)]
api: replication: send notifications via new notification module

If the new 'target-replication' option in datacenter.cfg is set to a
notification target, we send notifications that way. If it is not set,
we continue send a notification to the default target (mail to
root@pam).

There is also a new 'replication' option. It controls whether to send
a notification at all.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
9 months agoapi: apt: send notification via new notification module
Lukas Wagner [Thu, 3 Aug 2023 12:16:54 +0000 (14:16 +0200)]
api: apt: send notification via new notification module

... instead of using sendmail directly

If the new 'target-package-updates' is set, we send a notification to
this target. If not, we continue to send a mail to root@pam (if the
mail address is configured)

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
9 months agotest: rename mail_test.pl to vzdump_notification_test.pl
Lukas Wagner [Thu, 3 Aug 2023 12:16:53 +0000 (14:16 +0200)]
test: rename mail_test.pl to vzdump_notification_test.pl

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
9 months agovzdump: send notifications via new notification module
Lukas Wagner [Thu, 3 Aug 2023 12:16:52 +0000 (14:16 +0200)]
vzdump: send notifications via new notification module

... instead of using sendmail directly.

If the new 'notification-target' parameter is set,
we send the notification to this endpoint or group.
If 'mailto' is set, we add a temporary endpoint and a
temporary group containg both targets.

This commit also refactors the old 'sendmail' sub heavily:
  - Use template-based notification text instead of endless
    string concatenations
  - Removing the old plaintext/HTML table rendering in favor of
    the new template/property-based approach offered by the
    `proxmox-notify` crate.
  - Rename `sendmail` sub to `send_notification`
  - Breaking out some of the code into helper subs, hopefully
    reducing the spaghetti factor a bit

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
9 months agod/control: add dependency to `libpve-notify-perl`
Lukas Wagner [Thu, 3 Aug 2023 12:16:51 +0000 (14:16 +0200)]
d/control: add dependency to `libpve-notify-perl`

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
9 months agofix #474: ui: allow transfer from container/vms
Philipp Hufnagl [Thu, 10 Aug 2023 10:09:02 +0000 (12:09 +0200)]
fix #474: ui: allow transfer from container/vms

A user can no see all vms/containers, even the ones that are already a
member of a pool. They can be transfered now after checking the newly
introduced "allow transfer" checkbox.

Signed-off-by: Philipp Hufnagl <p.hufnagl@proxmox.com>
9 months agofix #474: api: allow transfer from container/vms
Philipp Hufnagl [Thu, 10 Aug 2023 10:09:01 +0000 (12:09 +0200)]
fix #474: api: allow transfer from container/vms

When the newly introduced optional parameter "transfer" is set, the user
add a vm/container to a pool even if it is already in one. If so it will
be removed from the old pool

Signed-off-by: Philipp Hufnagl <p.hufnagl@proxmox.com>
9 months agoui: ldap: add 'Check connection' checkbox as advanced option
Christoph Heiss [Thu, 10 Aug 2023 12:37:08 +0000 (14:37 +0200)]
ui: ldap: add 'Check connection' checkbox as advanced option

The checkbox is enabled by default, setting the new `check-connection`
parameter. See also [0] for the rationale.

[0] https://lists.proxmox.com/pipermail/pve-devel/2023-July/058559.html

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
9 months agobump pve-access-control dep to 8.0.5
Wolfgang Bumiller [Fri, 11 Aug 2023 11:37:55 +0000 (13:37 +0200)]
bump pve-access-control dep to 8.0.5

This is required for the new check-connection parameter for ldap
realms added in the next commit.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
9 months agofix whitespaces
Philipp Hufnagl [Tue, 1 Aug 2023 14:46:04 +0000 (16:46 +0200)]
fix whitespaces

Signed-off-by: Philipp Hufnagl <p.hufnagl@proxmox.com>
9 months agoapi: use standard vmid type for /cluster/resources
Wolfgang Bumiller [Wed, 2 Aug 2023 12:40:18 +0000 (14:40 +0200)]
api: use standard vmid type for /cluster/resources

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>