]> git.proxmox.com Git - pve-manager.git/log
pve-manager.git
2 years agoui: osd: send in/out cmd to currently used node
Aaron Lauterer [Wed, 2 Mar 2022 10:12:49 +0000 (11:12 +0100)]
ui: osd: send in/out cmd to currently used node

The in & out commands for OSDs are not node specific and can be run on
any node in the Ceph cluster. By sending them to the node currently used
to access the UI they can still be sent even if the node on which the
OSDs are located is down.

This helps in a disaster scenario where a node is down. By default Ceph
will mark a downed OSD as out after 10 minutes. This could be too long
in some situations. Running the CLI command to mark the OSD as out
earlier on one of the remaining nodes does work, but if the admin is not
used doing it this way, this adds stress, in a potentially already
stressful situation.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoapi: apt: repos: fix interfacing with perlmod
Fabian Ebner [Fri, 16 Jul 2021 13:27:53 +0000 (15:27 +0200)]
api: apt: repos: fix interfacing with perlmod

Using
    pvesh create /nodes/pve701/apt/repositories --path
    "/etc/apt/sources.list" --index 0 --enabled 1
reliably leads to
    error: invalid type: string "0", expected usize

Coerce to int to avoid this. I was not able to trigger the issue with
the "enabled" option being a string here (in PMG I was), but be on the
safe side and coerce there too. Otherwise it might get triggered by a
future, completely unrelated change further up in the API call
handling.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agopve6to7: update expected running kernel version to 5.13 or 5.15
Thomas Lamprecht [Mon, 14 Feb 2022 07:19:55 +0000 (08:19 +0100)]
pve6to7: update expected running kernel version to 5.13 or 5.15

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: vm: improve validator for CPU share range
Thomas Lamprecht [Thu, 10 Feb 2022 18:08:36 +0000 (19:08 +0100)]
ui: vm: improve validator for CPU share range

Allow the range for the old CGroup V1 one, as while deprecated,
that's still supported and a includes the range for v2 anyway.

With a next major release we may drop v1 support completely, probably
in PVE 8.0, then we can reduce this to the range of [1, 1000] that v2
supports.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: query url metadata: change default user-agent to "Proxmox VE"
Oguz Bektas [Tue, 1 Feb 2022 14:02:38 +0000 (15:02 +0100)]
api: query url metadata: change default user-agent to "Proxmox VE"

To avoid being blacklisted because of the default, quite popular,
libwww-perl user-agent like reported in community forum [0].

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

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
Tested-by: Matthias Heiserer <m.heiserer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: apt: list_updates: fix dependency detection for virtual package
Fabian Ebner [Thu, 3 Feb 2022 11:32:19 +0000 (12:32 +0100)]
api: apt: list_updates: fix dependency detection for virtual package

A virtual package does not have SelectedState Install, but the
dependency will still be satisfied if a package providing it has.

Fixes a bug, wrongly showing that postfix will be installed, when a
different mail-transport-agent is installed and a pve-manager update
is available:
https://forum.proxmox.com/threads/103413/

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoapi: add 'type' parameter to pool GET endpoint
Hannes Laimer [Mon, 31 Jan 2022 11:16:33 +0000 (12:16 +0100)]
api: add 'type' parameter to pool GET endpoint

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2 years agoui: ceph osd: just spread default + custom class values directly
Thomas Lamprecht [Fri, 28 Jan 2022 12:11:18 +0000 (13:11 +0100)]
ui: ceph osd: just spread default + custom class values directly

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix #3451 ui: ceph create osd: show custom device classes
Aaron Lauterer [Tue, 25 Jan 2022 08:51:53 +0000 (09:51 +0100)]
fix #3451 ui: ceph create osd: show custom device classes

Showing already configured custom device classes makes it easier to
create new OSDs with custom device classes.

The Crush map contains a list of all OSDs in the cluster, including
their device class.
This means we can create a list of used device classes from it, avoiding
adding another API endpoint.

Fetching the crushmap should also be quite a bit less data that needs to
be transferred, compared to the other possible nodes/<node>/ceph/osd
endpoint, especially in larger clusters.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoui: cephfs: use more descriptive field label and gettext
Fabian Ebner [Fri, 28 Jan 2022 10:22:32 +0000 (11:22 +0100)]
ui: cephfs: use more descriptive field label and gettext

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: rbd: cephfs: add keyring/secret field for external clusters
Aaron Lauterer [Wed, 26 Jan 2022 10:18:42 +0000 (11:18 +0100)]
ui: rbd: cephfs: add keyring/secret field for external clusters

Manual switching of xtype because binding 'hidden' does not work with
pmxDisplayEditField.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoui: lvm: better convey space information
Fabian Ebner [Wed, 26 Jan 2022 08:42:02 +0000 (09:42 +0100)]
ui: lvm: better convey space information

Namely, that it's just assigned/reserved space, not necessarily
actively used. Selection of forum threads about this confusion (of
dozens more):

https://forum.proxmox.com/threads/93820/
https://forum.proxmox.com/threads/52899/
https://forum.proxmox.com/threads/52929/

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agometrics: influx: preprare value: rename $quote to $force_quote
Thomas Lamprecht [Fri, 28 Jan 2022 10:06:25 +0000 (11:06 +0100)]
metrics: influx: preprare value: rename $quote to $force_quote

to avoid implying that it's *only* quoted if that parameter is
truthy.

Also, check the boolean before looks_like_number call, as that is
more expensive to do.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix #3815: metrics: influxdb: coerce guest name always to string
Markus Frank [Fri, 28 Jan 2022 10:03:39 +0000 (11:03 +0100)]
fix #3815: metrics: influxdb: coerce guest name always to string

InfluxDB interprets the guest name '66601' as a number and the guest
name 'vm42' as a String. This leads to problematic metrics, that will
be dropped by influxdb. Whichever comes first decides how the
"schema" is defined.

To change that add a $to_quote hashmap to define which value
shouldn't get interpreted as number by always send it quoted.

For now only quote 'name'.

Note, that while the 'nodename' and 'host' properties would have the
same problem, they are tags in InfluxDB which are always interpreted
as strings:
https://docs.influxdata.com/influxdb/v2.1/reference/syntax/line-protocol/

Signed-off-by: Markus Frank <m.frank@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopvescheduler service: order startup after pve-guests
Dominik Csapak [Fri, 28 Jan 2022 09:25:04 +0000 (10:25 +0100)]
pvescheduler service: order startup after pve-guests

This way, a running backup cannot prevent pve-guests from starting a
virtual guest which was marked with 'onboot'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix tests in 'vzdump_new_test.pl'
Dominik Csapak [Fri, 28 Jan 2022 08:36:47 +0000 (09:36 +0100)]
fix tests in 'vzdump_new_test.pl'

commmit
b241deb7 ("close #3476: vzdump: add job-init hook")

introduces a 'cfs_update' in VZDump->new(), which overwrites our
carefully prepared storage/vm config which can break the tests

to prevent this, mock 'cfs_update' to do nothing, since we never
want to load the 'real' configs during tests anyway

fixes commit b241deb731369ff96b26bfa670c5c8d273aea02c

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: pci passthrough: fix labels of new id/vendor overrides
Thomas Lamprecht [Thu, 27 Jan 2022 14:12:26 +0000 (15:12 +0100)]
ui: pci passthrough: fix labels of new id/vendor overrides

We do not use 'Set XYZ' anywhere else and it should be clear enough
from the PCI selector in the non-advanced section that the actual
device to get passed-through is chosen else where, but we still can
use the emptyText to avoid confusion where the (sub) vendor/id will
come from if a field is left empty.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: pci passthrough: editor for pci-id overrides
Nicholas Sherlock [Tue, 18 Jan 2022 21:38:40 +0000 (21:38 +0000)]
ui: pci passthrough: editor for pci-id overrides

Signed-off-by: Nicholas Sherlock <n.sherlock@gmail.com>
2 years agoclose #3476: vzdump: add job-init hook
Fabian Ebner [Tue, 18 Jan 2022 08:21:14 +0000 (09:21 +0100)]
close #3476: vzdump: add job-init hook

which allows users to prepare the backup storage for activation (e.g.
by waking up a remote node).

Suggested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Acked-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agobump version to 7.1-10
Thomas Lamprecht [Tue, 18 Jan 2022 04:53:00 +0000 (05:53 +0100)]
bump version to 7.1-10

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: form/calendar event: add monthly and yearly examples
Thomas Lamprecht [Tue, 18 Jan 2022 04:51:57 +0000 (05:51 +0100)]
ui: form/calendar event: add monthly and yearly examples

like PBS

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: backup/run now: avoid passing "next-run" parameter to backend
Thomas Lamprecht [Tue, 18 Jan 2022 04:48:43 +0000 (05:48 +0100)]
ui: backup/run now: avoid passing "next-run" parameter to backend

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agovzdump: example hook script: avoid undef warnings
Fabian Ebner [Mon, 17 Jan 2022 11:35:58 +0000 (12:35 +0100)]
vzdump: example hook script: avoid undef warnings

Some environment variables are undef in certain scenarios.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: form/calendar event: enable first-day-of-month example again
Thomas Lamprecht [Thu, 13 Jan 2022 16:52:23 +0000 (17:52 +0100)]
ui: form/calendar event: enable first-day-of-month example again

the rust based implementation form PBS we recently switched too
supports that

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.1-9
Thomas Lamprecht [Thu, 13 Jan 2022 12:48:38 +0000 (13:48 +0100)]
bump version to 7.1-9

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agowindow: safe destroy guest: add note that referenced disks are destroyed
Fabian Ebner [Mon, 13 Dec 2021 08:25:14 +0000 (09:25 +0100)]
window: safe destroy guest: add note that referenced disks are destroyed

It's not clear to all users otherwise[0].

[0]: https://forum.proxmox.com/threads/100996/post-436919

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: backuo job detail: drop being stateful, increase default height
Thomas Lamprecht [Thu, 13 Jan 2022 15:54:46 +0000 (16:54 +0100)]
ui: backuo job detail: drop being stateful, increase default height

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: backuo job detail: show next-run info
Thomas Lamprecht [Thu, 13 Jan 2022 15:49:38 +0000 (16:49 +0100)]
ui: backuo job detail: show next-run info

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: backuo jobs: move next-run column beside schedule one
Thomas Lamprecht [Thu, 13 Jan 2022 15:49:18 +0000 (16:49 +0100)]
ui: backuo jobs: move next-run column beside schedule one

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: utils: add render_next_event
Thomas Lamprecht [Thu, 13 Jan 2022 15:48:44 +0000 (16:48 +0100)]
ui: utils: add render_next_event

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/control: bump pve-common versioned dependencies
Thomas Lamprecht [Thu, 13 Jan 2022 15:34:04 +0000 (16:34 +0100)]
d/control: bump pve-common versioned dependencies

to make it easier guaranteeing the more capable calendar event
implementation is active for all parts using it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/control: bump versioned dependency to pve-rs
Thomas Lamprecht [Thu, 13 Jan 2022 14:33:19 +0000 (15:33 +0100)]
d/control: bump versioned dependency to pve-rs

for calendar event perlmod

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agovzdump: add new 'next-run' field for vzdump job listing
Dominik Csapak [Thu, 2 Dec 2021 10:41:43 +0000 (11:41 +0100)]
vzdump: add new 'next-run' field for vzdump job listing

and calculate it by getting the next event after 'now' since
we currently have no way to get the last run time for jobs only running
on different cluster nodes

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agod/control: bump http-server versioned depenedency
Thomas Lamprecht [Thu, 13 Jan 2022 12:43:16 +0000 (13:43 +0100)]
d/control: bump http-server versioned depenedency

so that the new TLS knobs actually do something

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix #3789: pass disable TLS 1.2/1.3 options
Fabian Grünbichler [Fri, 17 Dec 2021 12:57:32 +0000 (13:57 +0100)]
fix #3789: pass disable TLS 1.2/1.3 options

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agofix #3745: handle overridden TLS key location
Fabian Grünbichler [Fri, 17 Dec 2021 12:57:31 +0000 (13:57 +0100)]
fix #3745: handle overridden TLS key location

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agofix #3790: pass TLS 1.3 ciphersuites if set
Fabian Grünbichler [Fri, 17 Dec 2021 12:57:30 +0000 (13:57 +0100)]
fix #3790: pass TLS 1.3 ciphersuites if set

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoadd 'auto' mode for noVNC scaling
Dominik Csapak [Thu, 13 Jan 2022 07:56:33 +0000 (08:56 +0100)]
add 'auto' mode for noVNC scaling

in commit
07195aa079c4ed77866ee4c6af77436b7c2a2e06 ("ui: fix novnc scaling radio button")

we always set to 'scale' when no value was set, but a non-set value
actually had a different behaviour:

in the embedded console it was set to 'scale', but in the pop-up it was
set to 'off'.

to restore this behaviour, introduce an option 'auto' which unsets the
'novnc-scaling' setting

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: node: zfs: use ZFSDetail window from widget-toolkit
Fabian Ebner [Fri, 10 Sep 2021 11:45:38 +0000 (13:45 +0200)]
ui: node: zfs: use ZFSDetail window from widget-toolkit

The only functional differences I could see are the missing
defaultValue for 'Scan' and the reduced height. For restoring the
height, there is a proposed patch for widget-toolkit.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: fix novnc scaling radio buttons
Dominik Csapak [Tue, 11 Jan 2022 10:26:21 +0000 (11:26 +0100)]
ui: fix novnc scaling radio buttons

when having selected 'off', the next start of the window has both
radiobuttons selected and no change is possible anymore. It seems that
the 'checked: true' triggers only after the 'init' function.

So instead remove the 'checked: true', and add the default in the init
function.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoavoid installing unused var/lib/vz/template/qemu directory
Thomas Lamprecht [Tue, 11 Jan 2022 13:12:20 +0000 (14:12 +0100)]
avoid installing unused var/lib/vz/template/qemu directory

some users in the forum[0][1] and oguz wondered and made me notice
it, its neither used nor referred too in pve-storage, qemu-server nor
the pve-manager package itself, so just drop it.

[0]: https://forum.proxmox.com/threads/qemu-template-questions.18053/
[1]: https://forum.proxmox.com/threads/what-is-var-lib-vz-template-qemu-for.100092/

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agostatus: influxdb: suppress warning when no token exists
Dominik Csapak [Mon, 20 Dec 2021 12:43:10 +0000 (13:43 +0100)]
status: influxdb: suppress warning when no token exists

in get_credentials, we try to read the token for the specified server,
and warn if we cannot do that (e.g. because the file does not exist)

since having no token is a valid configuration, suppress that warning on
connection.

reported by a forum-user:
https://forum.proxmox.com/threads/interface-comes-up-with-all-question-marks.83287/page-2#post-438204

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agosorters: use correct property 'direction' and keep default 'ASC'
Fabian Ebner [Tue, 7 Dec 2021 13:08:44 +0000 (14:08 +0100)]
sorters: use correct property 'direction' and keep default 'ASC'

Ext.util.Sorter does not have an 'order' property, so 'order: DESC'
didn't have an effect. The default is 'ASC' and it is arguably the
preferred direction for all affected sorters anyways.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agobackup views: sort backups by vmid, then descending by date
Fabian Ebner [Tue, 7 Dec 2021 13:08:43 +0000 (14:08 +0100)]
backup views: sort backups by vmid, then descending by date

to have the most recent ones first, while keeping backups from the
same guest together.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: ceph status details: refactoring and clenaups
Thomas Lamprecht [Wed, 15 Dec 2021 15:01:25 +0000 (16:01 +0100)]
ui: ceph status details: refactoring and clenaups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: ceph dashboard: render ghost OSDs
Thomas Lamprecht [Fri, 10 Dec 2021 13:06:33 +0000 (14:06 +0100)]
ui: ceph dashboard: render ghost OSDs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: ceph fs: fix overriding renderer in controller
Thomas Lamprecht [Fri, 10 Dec 2021 12:23:59 +0000 (13:23 +0100)]
ui: ceph fs: fix overriding renderer in controller

Overriding the controller render_status must be done in an derived
class, not as config for the instantiated object.

While it worked it really isn't idiomatic and ExtJS complained with
an error in debug mode, which broke the whole UI then.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: ceph: variable casing style fix
Thomas Lamprecht [Fri, 10 Dec 2021 09:59:46 +0000 (10:59 +0100)]
ui: ceph: variable casing style fix

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: vm create wizard: default to 4 GiB memory for win11 os type
Thomas Lamprecht [Thu, 9 Dec 2021 16:40:17 +0000 (17:40 +0100)]
ui: vm create wizard: default to 4 GiB memory for win11 os type

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.1-8
Thomas Lamprecht [Tue, 7 Dec 2021 18:11:37 +0000 (19:11 +0100)]
bump version to 7.1-8

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: calendar event: add once daily example and clarify workday one
Thomas Lamprecht [Tue, 7 Dec 2021 17:47:44 +0000 (18:47 +0100)]
ui: calendar event: add once daily example and clarify workday one

Using 00:00 with relying on the implied default is sub optimal as its
a bit of a magic example that new users may not understand as easily.
So spell it out explicitly, even if there'd be a shorter version
possible.

We also had some request for the once-daily every day, and its a
sensible example to have in general, could help getting the
difference between an hour list and a single one.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: upload/download image: trim checksum value
Thomas Lamprecht [Fri, 3 Dec 2021 10:09:51 +0000 (11:09 +0100)]
ui: upload/download image: trim checksum value

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agojobs: limit ID to maximal 64 characters
Thomas Lamprecht [Fri, 3 Dec 2021 09:01:17 +0000 (10:01 +0100)]
jobs: limit ID to maximal 64 characters

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix #3689: add gridhandle to firewall rules to indicate drag/drop
Dominik Csapak [Thu, 2 Dec 2021 10:38:47 +0000 (11:38 +0100)]
fix #3689: add gridhandle to firewall rules to indicate drag/drop

dragHandle was copied from the BootOrderEdit.
Also increases the width by 23px to make space for it.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agolxc: add lazytime mount option
Oguz Bektas [Wed, 1 Dec 2021 15:17:57 +0000 (16:17 +0100)]
lxc: add lazytime mount option

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2 years agobump version to 7.1-7
Thomas Lamprecht [Wed, 24 Nov 2021 17:32:55 +0000 (18:32 +0100)]
bump version to 7.1-7

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/control: bump http-server and mini-journalreader dependencies
Thomas Lamprecht [Wed, 24 Nov 2021 17:21:31 +0000 (18:21 +0100)]
d/control: bump http-server and mini-journalreader dependencies

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: journal: stream the journal data to the client
Dominik Csapak [Wed, 24 Nov 2021 14:47:48 +0000 (15:47 +0100)]
api: journal: stream the journal data to the client

instead of accumulating the whole output of 'mini-journalreader' in
the api call (this can be quite big), use the download mechanic of the
http-server to stream the output to the client.

we lose some error handling possibilities, but we do not have
to allocate anything here, and since perl does not free memory after
allocating[0] this is our desired behaviour.

to keep api compatiblitiy, we need to give the journalreader the '-j'
flag to let it output json.

also tell the http server that the encoding is gzip and pipe
the output through it.

0: https://perldoc.perl.org/perlfaq3#How-can-I-free-an-array-or-hash-so-my-program-shrinks?

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agod/changelog: fix typos/grammar
Thomas Lamprecht [Tue, 23 Nov 2021 08:01:15 +0000 (09:01 +0100)]
d/changelog: fix typos/grammar

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopvescheduler: use private sub instead of code-ref
Thomas Lamprecht [Tue, 23 Nov 2021 07:59:49 +0000 (08:59 +0100)]
pvescheduler: use private sub instead of code-ref

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopvescheduler: fix potential stall on full shutdown
Thomas Lamprecht [Tue, 23 Nov 2021 07:58:16 +0000 (08:58 +0100)]
pvescheduler: fix potential stall on full shutdown

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.1-6
Thomas Lamprecht [Mon, 22 Nov 2021 19:32:25 +0000 (20:32 +0100)]
bump version to 7.1-6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopvescheduler: record some todos and small cleanup
Thomas Lamprecht [Mon, 22 Nov 2021 19:25:34 +0000 (20:25 +0100)]
pvescheduler: record some todos and small cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopvescheduler: make jobs tracking more flexible, rework stop
Thomas Lamprecht [Mon, 22 Nov 2021 19:15:29 +0000 (20:15 +0100)]
pvescheduler: make jobs tracking more flexible, rework stop

Avoid hard-coding the current implication of the replication stack to
not get started again until the old worker is done..

We still apply the same check, but changing that to let the jobs have
control is rather easy now.

Also rework the stop logic, send terminate to _all_ workers and make
the timeout a actual shared one (not first gets all, remaining get
kill) and send a kill to the stuck, leftover ones in one go at the
end, including some logging so that the admin can actually know about
this non-ideal situation.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopvescheduler: do not delay restart artifically
Thomas Lamprecht [Mon, 22 Nov 2021 19:14:40 +0000 (20:14 +0100)]
pvescheduler: do not delay restart artifically

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopvescheduler: implement graceful reloading
Dominik Csapak [Thu, 18 Nov 2021 13:28:31 +0000 (14:28 +0100)]
pvescheduler: implement graceful reloading

utilize PVE::Daemons 'hup' functionality to reload gracefully.

Leaves the children running (if any) and give them to the new instance
via ENV variables. After loading, check if they are still around

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agopvescheduler: reworking child pid tracking
Dominik Csapak [Thu, 18 Nov 2021 13:28:30 +0000 (14:28 +0100)]
pvescheduler: reworking child pid tracking

previously, systemd timers were responsible for running replication jobs.
those timers would not restart if the previous one is still running.

though trying again while it is running does no harm really, it spams
the log with errors about not being able to acquire the correct lock

to fix this, we rework the handling of child processes such that we only
start one per loop if there is currently none running. for that,
introduce the types of forks we do and allow one child process per type
(for now, we have 'jobs' and 'replication' as types)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agopvescheduler: catch errors in forked childs
Dominik Csapak [Thu, 18 Nov 2021 13:28:29 +0000 (14:28 +0100)]
pvescheduler: catch errors in forked childs

if '$sub' dies, the error handler of PVE::Daemon triggers, which
initiates a shutdown of the child, resulting in confusing error logs
(e.g. 'got shutdown request, signal running jobs to stop')

instead, run it under 'eval' and print the error to the sylog instead

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: dc/openID realm: allow to edit acr values
Thomas Lamprecht [Fri, 19 Nov 2021 06:30:38 +0000 (07:30 +0100)]
ui: dc/openID realm: allow to edit acr values

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: dc/openID realm: allow to edit prompt
Thomas Lamprecht [Fri, 19 Nov 2021 06:30:30 +0000 (07:30 +0100)]
ui: dc/openID realm: allow to edit prompt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: dc/openID realm: allow to edit scopes
Thomas Lamprecht [Fri, 19 Nov 2021 06:30:14 +0000 (07:30 +0100)]
ui: dc/openID realm: allow to edit scopes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: openID: make username-claim field editable for arbitrary values
Thomas Lamprecht [Fri, 19 Nov 2021 06:04:38 +0000 (07:04 +0100)]
ui: openID: make username-claim field editable for arbitrary values

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: backup: code reduction
Thomas Lamprecht [Wed, 17 Nov 2021 14:57:50 +0000 (15:57 +0100)]
api: backup: code reduction

had it lying around and did not felt condensed/code-golfed to me,
rather a bit more expressive (surely biased though)..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.1-5
Thomas Lamprecht [Wed, 17 Nov 2021 14:37:18 +0000 (15:37 +0100)]
bump version to 7.1-5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: backup: add comment regarding normalizing DOW list
Thomas Lamprecht [Wed, 17 Nov 2021 14:36:04 +0000 (15:36 +0100)]
api: backup: add comment regarding normalizing DOW list

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: backup: normalize 'dow' format when converting
Dominik Csapak [Wed, 17 Nov 2021 14:21:01 +0000 (15:21 +0100)]
api: backup: normalize 'dow' format when converting

the old web ui sends the days as seperate parameters, which will
be concatenated by a null-byte in the api, causing it to land it this
way in the jobs.cfg

to fix this, split+join the list to get a well-formed dow list

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agofix use statement
Fabian Grünbichler [Wed, 17 Nov 2021 12:52:19 +0000 (13:52 +0100)]
fix use statement

else this happens:

"Use of inherited AUTOLOAD for non-method PVE::API2::Backup::uuid() is
no longer allowed at /usr/share/perl5/PVE/API2/Backup.pm line 198.
(500)"

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoapi: backup: correclty use uuid package
Dominik Csapak [Wed, 17 Nov 2021 13:52:51 +0000 (14:52 +0100)]
api: backup: correclty use uuid package

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agobump version to 7.1-4
Thomas Lamprecht [Tue, 16 Nov 2021 13:09:12 +0000 (14:09 +0100)]
bump version to 7.1-4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: qemu: disk edit: drop label widths from advanced columns
Thomas Lamprecht [Tue, 16 Nov 2021 13:17:42 +0000 (14:17 +0100)]
ui: qemu: disk edit: drop label widths from advanced columns

this is a historical left over from the time when the bandwidth
limits weren't in their own, separate tab, as there we got quite
long labels and we synced the width up for the remaining fields to
avoid that it looks to much off.

Luckily not required anymore, so just drop it for non BW fields.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: ceph: osd: handle edge case with dead node
Fabian Ebner [Tue, 16 Nov 2021 13:08:22 +0000 (14:08 +0100)]
ui: ceph: osd: handle edge case with dead node

If there is a left-over entry for a dead node in the ceph osd tree
the panel wouldn't show and produce an
    Uncaught TypeError: data.versions is undefined
because of an access
    node.version = data.versions[node.name];
further below (not visible in the patch itself).

AFAICT, the same issue would also happen when something went wrong
with getting the broadcasted ceph-versions, or when a node is part
of Ceph, but not PVE.

Handle the situation gracefully by always initializing data.versions.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: qemu/HDEdit: add 'aio' advanced option
Dominik Csapak [Tue, 16 Nov 2021 12:48:58 +0000 (13:48 +0100)]
ui: qemu/HDEdit: add 'aio' advanced option

so that users can change it more easily if necessary

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: backup views: disable remove button on protected backups
Thomas Lamprecht [Tue, 16 Nov 2021 12:24:23 +0000 (13:24 +0100)]
ui: backup views: disable remove button on protected backups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: make protected column header use the icon only
Thomas Lamprecht [Tue, 16 Nov 2021 12:22:26 +0000 (13:22 +0100)]
ui: make protected column header use the icon only

to avoid using to much space, as the icon appears on hitting "change
protection" and the tooltip is set to "Protected" it should be still
quite clear.

Further UX improvement can be made by adding a context menu with can
use words for all actions

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: render 'protected' column as icon and enable sorting
Dominik Csapak [Tue, 16 Nov 2021 11:20:36 +0000 (12:20 +0100)]
ui: render 'protected' column as icon and enable sorting

instead of 'Yes' and 'No', render the same icon as in pbs for protected
backups, and leave the column empty otherwise

this makes the difference much more visible and is more consistent with
how we present that flag in pbs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: grid/backup: refactor to more modern code-style
Thomas Lamprecht [Tue, 16 Nov 2021 12:15:10 +0000 (13:15 +0100)]
ui: grid/backup: refactor to more modern code-style

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoupdate shipped aplinfo index
Thomas Lamprecht [Tue, 16 Nov 2021 10:13:18 +0000 (11:13 +0100)]
update shipped aplinfo index

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.1-3
Thomas Lamprecht [Mon, 15 Nov 2021 16:32:36 +0000 (17:32 +0100)]
bump version to 7.1-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.1-2
Thomas Lamprecht [Mon, 15 Nov 2021 15:30:26 +0000 (16:30 +0100)]
bump version to 7.1-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: qemu: fix enabling SSD-emulation
Thomas Lamprecht [Mon, 15 Nov 2021 16:32:09 +0000 (17:32 +0100)]
ui: qemu: fix enabling SSD-emulation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: apt/versions: track swtpm
Thomas Lamprecht [Mon, 15 Nov 2021 15:35:00 +0000 (16:35 +0100)]
api: apt/versions: track swtpm

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: metrics: use complete config for testing the connection
Dominik Csapak [Mon, 15 Nov 2021 13:57:19 +0000 (14:57 +0100)]
api: metrics: use complete config for testing the connection

not only the given parameters, e.g. at the moment, the gui will
never send a 'verify-certificate' parameter, even if set in the config

by using the complete resulting config, we test the actual settings.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: qemu/HD edit: more modern assembly of bandwidth values
Thomas Lamprecht [Mon, 15 Nov 2021 15:16:40 +0000 (16:16 +0100)]
ui: qemu/HD edit: more modern assembly of bandwidth values

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agojobs: code/style cleanups
Thomas Lamprecht [Mon, 15 Nov 2021 15:12:42 +0000 (16:12 +0100)]
jobs: code/style cleanups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: qemu: disk edit: expose read-only flag as advanced option
Thomas Lamprecht [Mon, 15 Nov 2021 09:36:20 +0000 (10:36 +0100)]
ui: qemu: disk edit: expose read-only flag as advanced option

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: qemu: disk edit: refactor to more declarative style using bindings
Thomas Lamprecht [Mon, 15 Nov 2021 09:33:05 +0000 (10:33 +0100)]
ui: qemu: disk edit: refactor to more declarative style using bindings

would technically require a versioned dependency bump to widget
toolkit as the `clearOnDisable` flag is new in 3.4-2, but this is
really only for slight UX improvement, so avoid the hard dependency
bump..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.1-1
Thomas Lamprecht [Fri, 12 Nov 2021 17:49:40 +0000 (18:49 +0100)]
bump version to 7.1-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: qm: disk selection: add optional selection of unused
Aaron Lauterer [Fri, 12 Nov 2021 09:53:32 +0000 (10:53 +0100)]
ui: qm: disk selection: add optional selection of unused

With this optional setting, it is possible to allow the user to also
select 'unused' as a disk bus type.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoui: dc/options: fix renderer
Thomas Lamprecht [Fri, 12 Nov 2021 17:25:50 +0000 (18:25 +0100)]
ui: dc/options: fix renderer

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: utils: refactor render_as_property_string
Thomas Lamprecht [Fri, 12 Nov 2021 17:25:36 +0000 (18:25 +0100)]
ui: utils: refactor render_as_property_string

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