]> git.proxmox.com Git - pve-manager.git/log
pve-manager.git
2 years agoui: dc/BackupEdit: use correct validation
Dominik Csapak [Wed, 10 Nov 2021 14:02:54 +0000 (15:02 +0100)]
ui: dc/BackupEdit: use correct validation

we use a 'pve-configid', so use the 'ConfigId' vtype

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoJobs/VZDump: encode/decode 'prune-backups' where needed
Dominik Csapak [Wed, 10 Nov 2021 14:02:53 +0000 (15:02 +0100)]
Jobs/VZDump: encode/decode 'prune-backups' where needed

we want to write it out to the config as propertyString,
but want it as object in the api (for compatiblity)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: dc/backup: show id+schedule instead of dow+starttime
Dominik Csapak [Mon, 8 Nov 2021 13:07:58 +0000 (14:07 +0100)]
ui: dc/backup: show id+schedule instead of dow+starttime

we can now show the id (since its not autogenerated anymore),
and we can always show/edit the schedule instead of the dow+starttime

also add an 'ID' field to the edit/create window and update the
backupinfo window as well

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoapi/backup: handle new vzdump jobs
Dominik Csapak [Mon, 8 Nov 2021 13:07:57 +0000 (14:07 +0100)]
api/backup: handle new vzdump jobs

in addition to listing the vzdump.cron jobs, also list from the
jobs.cfg file.

updates/creations go into the new jobs.cfg only now
and on update, starttime+dow get converted to a schedule
this transformation is straight forward, since 'dow'
is already in a compatible format (e.g. 'mon,tue') and we simply
append the starttime (if any)

id on creation is optional for now (for api compat), but will
be autogenerated (uuid). on update, we simply take the id from before
(the ids of the other entries in vzdump.cron will change but they would
anyway)

as long as we have the vzdump.cron file, we must lock both
vzdump.cron and jobs.cfg, since we often update both

we also change the backupinfo api call to read the jobs.cfg too

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoapi/backup: refactor string for all days
Dominik Csapak [Mon, 8 Nov 2021 13:07:56 +0000 (14:07 +0100)]
api/backup: refactor string for all days

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agopvescheduler: run jobs from jobs.cfg
Dominik Csapak [Mon, 8 Nov 2021 13:07:55 +0000 (14:07 +0100)]
pvescheduler: run jobs from jobs.cfg

PVE/Jobs is responsible to decide if the job must run (e.g. with a
schedule)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoadd PVE/Jobs to handle VZDump jobs
Dominik Csapak [Mon, 8 Nov 2021 13:07:54 +0000 (14:07 +0100)]
add PVE/Jobs to handle VZDump jobs

this adds a SectionConfig handling for jobs (only 'vzdump' for now) that
represents a job that will be handled by pvescheduler and a basic
'job-state' handling for reading/writing state json files

this has some intersections with pvesrs state handling, but does not
use a single state file for all jobs, but seperate ones, like we
do it in the backup-server.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoreplace systemd timer with pvescheduler daemon
Thomas Lamprecht [Mon, 8 Nov 2021 13:07:53 +0000 (14:07 +0100)]
replace systemd timer with pvescheduler daemon

The whole thing is already prepared for this, the systemd timer was
just a fixed periodic timer with a frequency of one minute. And we
just introduced it as the assumption was made that less memory usage
would be generated with this approach, AFAIK.

But logging 4+ lines just about that the timer was started, even if
it does nothing, and that 24/7 is not to cheap and a bit annoying.

So in a first step add a simple daemon, which forks of a child for
running jobs once a minute.
This could be made still a bit more intelligent, i.e., look if we
have jobs tor run before forking - as forking is not the cheapest
syscall. Further, we could adapt the sleep interval to the next time
we actually need to run a job (and sending a SIGUSR to the daemon if
a job interval changes such, that this interval got narrower)

We try to sync running on minute-change boundaries at start, this
emulates systemd.timer behaviour, we had until now. Also user can
configure jobs on minute precision, so they probably expect that
those also start really close to a minute change event.
Could be adapted to resync during running, to factor in time drift.
But, as long as enough cpu cycles are available we run in correct
monotonic intervalls, so this isn't a must, IMO.

Another improvement could be locking a bit more fine grained, i.e.
not on a per-all-local-job-runs basis, but per-job (per-guest?)
basis, which would improve temporary starvement  of small
high-periodic jobs through big, less peridoci jobs.
We argued that it's the user fault if such situations arise, but they
can evolve over time without noticing, especially in compolexer
setups.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoRevert "ceph services: drop broadcasting legacy version pmxcfs KV"
Thomas Lamprecht [Wed, 10 Nov 2021 13:06:28 +0000 (14:06 +0100)]
Revert "ceph services: drop broadcasting legacy version pmxcfs KV"

This reverts commit 8a3a300b8e430a74af2497e1759cf5ee461a22c8 as 7.0
wasn't fully prepared for the transition...

https://lists.proxmox.com/pipermail/pve-devel/2021-November/050833.html
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: ceph: make version handling actually future proof
Dominik Csapak [Wed, 10 Nov 2021 12:15:56 +0000 (13:15 +0100)]
ui: ceph: make version handling actually future proof

It seems we did not prepare the GUI enough for the API changes
planned when stopping to broadcast the old single string version. We
have to use the node specific versions, not the global 'versions'
object.

Also use the `PVE.Utils.compare_ceph_versions` everywhere, since some
versions are strings and others are the parts of the version (e.g.
["16", "2, "6"])

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: ceph: fix getting ceph versions
Dominik Csapak [Wed, 10 Nov 2021 12:15:55 +0000 (13:15 +0100)]
api: ceph: fix getting ceph versions

Since commit: 8a3a300b ("ceph services: drop broadcasting legacy
version pmxcfs KV")

The 'ceph-version' kv is not broadcasted anymore, so we should not
query it, instead use get_ceph_versions

Also drop the other legacy keys for the versions

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/control: bump dep on pve-storage
Fabian Grünbichler [Wed, 10 Nov 2021 13:28:04 +0000 (14:28 +0100)]
d/control: bump dep on pve-storage

for disk manage with deletion

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoui: node: storage removal: add checkbox for cleaning up storage config
Fabian Ebner [Mon, 25 Oct 2021 13:47:55 +0000 (15:47 +0200)]
ui: node: storage removal: add checkbox for cleaning up storage config

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: node: storage removal: add checkbox for cleaning up disks
Fabian Ebner [Mon, 25 Oct 2021 13:47:54 +0000 (15:47 +0200)]
ui: node: storage removal: add checkbox for cleaning up disks

and factor out a SafeDestroyStorage sub-class to avoid duplication.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: node: add destroy menu for directory, lvm, lvmthin, zfs
Fabian Ebner [Mon, 25 Oct 2021 13:47:53 +0000 (15:47 +0200)]
ui: node: add destroy menu for directory, lvm, lvmthin, zfs

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: utils: add task descriptions for disk removal
Fabian Ebner [Mon, 25 Oct 2021 13:47:52 +0000 (15:47 +0200)]
ui: utils: add task descriptions for disk removal

For 'dirremove', it already exists.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: node: lvmthin: add volume group to columns
Fabian Ebner [Mon, 25 Oct 2021 13:47:51 +0000 (15:47 +0200)]
ui: node: lvmthin: add volume group to columns

to be able to identify thin pools even if they have the same name.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: node: directory: use gettext for 'Directory'
Fabian Ebner [Mon, 25 Oct 2021 13:47:50 +0000 (15:47 +0200)]
ui: node: directory: use gettext for 'Directory'

It's also localised when adding a storage for example.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui/UploadToStorage: check file extension
Lorenz Stechauner [Mon, 8 Nov 2021 08:53:50 +0000 (09:53 +0100)]
ui/UploadToStorage: check file extension

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui/UploadToStorage: add TaskViewer
Lorenz Stechauner [Mon, 8 Nov 2021 08:53:49 +0000 (09:53 +0100)]
ui/UploadToStorage: add TaskViewer

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agofix #3505: ui/UploadToStorage: add checksum and algorithm
Lorenz Stechauner [Mon, 8 Nov 2021 08:53:48 +0000 (09:53 +0100)]
fix #3505: ui/UploadToStorage: add checksum and algorithm

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: refactor UploadToStorage.js
Lorenz Stechauner [Mon, 8 Nov 2021 08:53:47 +0000 (09:53 +0100)]
ui: refactor UploadToStorage.js

this also removes the "content" selector from the window.
as far as it seems, this selector was never able to select
more than one entry, so it was useless.

the check for FormData() is also removed, because this is
supported by all major browsers for a long time. therefore
doStandardSubmit() is also not necessary.

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: move upload window into UploadToStorage.js
Lorenz Stechauner [Mon, 8 Nov 2021 08:53:46 +0000 (09:53 +0100)]
ui: move upload window into UploadToStorage.js

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agod/control: bump versioned dependency for pve-cluster
Thomas Lamprecht [Tue, 9 Nov 2021 17:35:12 +0000 (18:35 +0100)]
d/control: bump versioned dependency for pve-cluster

ensure we got the notes property for the datacenter config and also
the newly registered/watched jobs.cfg for future pveschedule patches.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: close #3504: Add datacenter notes
Dominic Jäger [Wed, 22 Sep 2021 10:42:18 +0000 (12:42 +0200)]
ui: close #3504: Add datacenter notes

Like notes for nodes.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agod/control: bump b-d/depends
Fabian Grünbichler [Tue, 9 Nov 2021 16:47:26 +0000 (17:47 +0100)]
d/control: bump b-d/depends

for replication and protection changes

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoui: prune: also handle new 'renamed' keep reason
Fabian Ebner [Thu, 30 Sep 2021 11:42:15 +0000 (13:42 +0200)]
ui: prune: also handle new 'renamed' keep reason

The back-end no longer returns 'protected' for renamed backups, and
'protected' backups are now their own kind.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: backup views: add button to change protection status
Fabian Ebner [Thu, 30 Sep 2021 11:42:14 +0000 (13:42 +0200)]
ui: backup views: add button to change protection status

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: backup views: add protected column
Fabian Ebner [Thu, 30 Sep 2021 11:42:13 +0000 (13:42 +0200)]
ui: backup views: add protected column

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: storage content: avoid redundant options hasNotesColumn and hideColumns
Fabian Ebner [Thu, 30 Sep 2021 11:42:12 +0000 (13:42 +0200)]
ui: storage content: avoid redundant options hasNotesColumn and hideColumns

Replace both by a showColumns option instead. As the current use of
hasNotesColumn already indicates, when new content-specific columns
are added, it is more natural for each derived class to specify the
columns it wants, rather than those it doesn't.

For hideColumns, there was no user. For hasNotesColumn, the only user
was the backup view.

Set the column information in the storage.BackupView class itself
rather than the instance (like hasNotesColumn was).

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agovzdump: skip protected backups for dumpdir pruning
Fabian Ebner [Thu, 30 Sep 2021 11:42:11 +0000 (13:42 +0200)]
vzdump: skip protected backups for dumpdir pruning

Keeps the behavior consistent with what happens for storages. It also
is required to not get into conflict with the check in archive_remove,
i.e. pruning here marks a backup as 'remove' and then archive_remove
complains that it's protected.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agotest: replication: remove mocking for obsolete volume_snapshot_list
Fabian Ebner [Tue, 19 Oct 2021 07:54:59 +0000 (09:54 +0200)]
test: replication: remove mocking for obsolete volume_snapshot_list

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agotest: replication: mock volume_snapshot_info
Fabian Ebner [Tue, 19 Oct 2021 07:54:58 +0000 (09:54 +0200)]
test: replication: mock volume_snapshot_info

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agotest: replication: avoid implicit return for volume_snapshot
Fabian Ebner [Tue, 19 Oct 2021 07:54:57 +0000 (09:54 +0200)]
test: replication: avoid implicit return for volume_snapshot

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: guest remove: modernize code and cleanup
Thomas Lamprecht [Tue, 9 Nov 2021 10:00:39 +0000 (11:00 +0100)]
ui: guest remove: modernize code and cleanup

drop only partially used intermediate value, use template strings,
reduce line bloat while trying to keep it readable.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: lxc: resources: add Detach text for mountpoints
Aaron Lauterer [Mon, 8 Nov 2021 09:56:12 +0000 (10:56 +0100)]
ui: lxc: resources: add Detach text for mountpoints

Instead of showing 'Remove' for a mountpoint, change the text to
'Detach' and only show 'Remove' for unused volumes.

This aligns the behaviour with VMs and will make it clear, that a
mountpoint first needs to be detached before it can be fully removed.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agobump version to 7.0-14
Thomas Lamprecht [Sun, 7 Nov 2021 20:23:14 +0000 (21:23 +0100)]
bump version to 7.0-14

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoceph: fix version check shortcut
Dominik Csapak [Fri, 5 Nov 2021 14:23:47 +0000 (15:23 +0100)]
ceph: fix version check shortcut

with 'get_node_kv', we get a hash which contains the value for
all nodes in the cluster (with the nodename as key), so we have to use
the value from the hash corresponding to our nodename.

also the 'str' property is inside the 'version' hash

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: join info: rework error handling/checking for no-cluster
Thomas Lamprecht [Sun, 7 Nov 2021 20:01:30 +0000 (21:01 +0100)]
ui: join info: rework error handling/checking for no-cluster

check if error is set before trying to access it and check for the
new HTTP code a newer pve-cluster may return, and do a more fuzzy
match for older ones.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: join info: code cleanup and future proof
Thomas Lamprecht [Sun, 7 Nov 2021 19:57:37 +0000 (20:57 +0100)]
ui: join info: code cleanup and future proof

we may want to return null or an empty object for the join info on a
node without a cluster in the future (i.e., PVE 8.0+), so get
compatible for that now already as it costs not much and as we can
now use es2020 we even can write the object access nicer..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: dc/Cluster: show errors on 'join' info in the view
Dominik Csapak [Fri, 29 Oct 2021 09:14:08 +0000 (11:14 +0200)]
ui: dc/Cluster: show errors on 'join' info in the view

so instead of getting the 'standalone node' message, the grid
is masked with the actual api error

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: guest backup grid: monitor store errors
Fabian Ebner [Fri, 22 Oct 2021 09:07:50 +0000 (11:07 +0200)]
ui: guest backup grid: monitor store errors

so that users see when something went wrong.

Don't mask the grid directly, but rather only its view so that the
title bar can be used for selecting another storage during load.

Reported in the community forum:
https://forum.proxmox.com/threads/get-backups-from-proxmox-randomly-fails.98383/

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: window/Wizard: make it a little wider
Dominik Csapak [Tue, 5 Oct 2021 11:29:03 +0000 (13:29 +0200)]
ui: window/Wizard: make it a little wider

for the multi disk panel, we want it to be just a little wider, so
that all form fields are still readable

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Tested-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoui: add qemu/MultiHDEdit and use it in the wizard
Dominik Csapak [Tue, 5 Oct 2021 11:29:02 +0000 (13:29 +0200)]
ui: add qemu/MultiHDEdit and use it in the wizard

uses the MultiDiskPanel as base and implements the necessary
functions/variables

this allows now to create a vm also without any disk

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Tested-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoui: add lxc/MultiMPEdit and use in lxc/CreateWizard
Dominik Csapak [Tue, 5 Oct 2021 11:29:01 +0000 (13:29 +0200)]
ui: add lxc/MultiMPEdit and use in lxc/CreateWizard

uses the MultiDiskPanel as a base and implements the necessary
functions/values

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Tested-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoui: add MultiDiskPanel
Dominik Csapak [Tue, 5 Oct 2021 11:29:00 +0000 (13:29 +0200)]
ui: add MultiDiskPanel

this adds a new panel where a user can add multiple disks, intended
for use in the wizard.

Has a simple grid for displaying the already added disks and displays
a warning triangle if the disk is not valid.

this is a base panel for adding multiple disks/mps for vms/ct
respectively.

this combines the shared behavior and layout and defines the functions
that subclasses must define

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Tested-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoui: lxc/MPEdit: add selectFree toggle
Dominik Csapak [Tue, 5 Oct 2021 11:28:59 +0000 (13:28 +0200)]
ui: lxc/MPEdit: add selectFree toggle

that sets the given vmconfig at the start and selects the first
free mpid

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Tested-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoui: lxc/MPEdit: fire diskidchange event
Dominik Csapak [Tue, 5 Oct 2021 11:28:58 +0000 (13:28 +0200)]
ui: lxc/MPEdit: fire diskidchange event

when the diskid changes

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Tested-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoui: lxc/MPEdit: add updateVMConfig
Dominik Csapak [Tue, 5 Oct 2021 11:28:57 +0000 (13:28 +0200)]
ui: lxc/MPEdit: add updateVMConfig

helper for the upcoming MultiMPEdit

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Tested-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoui: qemu/SystemEdit: add spacing and heading for 'firmware' options
Dominik Csapak [Wed, 3 Nov 2021 14:01:04 +0000 (15:01 +0100)]
ui: qemu/SystemEdit: add spacing and heading for 'firmware' options

So that they are more visually seperated from the rest of the options.
Use the same style as in the realm sync panel.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: storage/PBSEdit: do not send server on edit
Dominik Csapak [Thu, 28 Oct 2021 13:54:49 +0000 (15:54 +0200)]
ui: storage/PBSEdit: do not send server on edit

it's a fixed value for the storage config, so the api would reject it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: storage/PBSEdit: add port to server field
Lorenz Stechauner [Mon, 11 Oct 2021 09:52:00 +0000 (11:52 +0200)]
ui: storage/PBSEdit: add port to server field

this gives users the chance to supply the port nr in the gui,
without having to add a extra new field to the panel.

using the same implementation as in RemoteEdit.js in PBS.

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
2 years agoui: clarify labels for EFI/TPM storage
Thomas Lamprecht [Thu, 21 Oct 2021 11:41:06 +0000 (13:41 +0200)]
ui: clarify labels for EFI/TPM storage

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: add 'win11' ostype and set defaults in wizard
Stefan Reiter [Mon, 11 Oct 2021 12:55:20 +0000 (14:55 +0200)]
ui: add 'win11' ostype and set defaults in wizard

Windows 11 requires a TPM and secure boot, so try to auto-enable both.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoui: SystemEdit: promote advanced settings to normal
Stefan Reiter [Mon, 11 Oct 2021 12:55:19 +0000 (14:55 +0200)]
ui: SystemEdit: promote advanced settings to normal

and reorder the panel a bit, as otherwise I found it *very* cluttered.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agod/control: bump versioned dependency on libpve-storage-perl
Thomas Lamprecht [Thu, 21 Oct 2021 10:15:14 +0000 (12:15 +0200)]
d/control: bump versioned dependency on libpve-storage-perl

to ensure the new selectable `preallocation` property is available.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix 3850: ui: storage: using PreallocationSelector for file based storage types
Lorenz Stechauner [Tue, 12 Oct 2021 12:32:34 +0000 (14:32 +0200)]
fix 3850: ui: storage: using PreallocationSelector for file based storage types

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
Tested-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: add PreallocationSelector
Lorenz Stechauner [Tue, 12 Oct 2021 12:32:33 +0000 (14:32 +0200)]
ui: add PreallocationSelector

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
Tested-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: resourcetree: move guest position on template creation
Dominik Csapak [Mon, 4 Oct 2021 07:50:00 +0000 (09:50 +0200)]
ui: resourcetree: move guest position on template creation

we sort templates at the end normally, but if we convert a guest to a
template, it was not moved in the tree

add it to the list of attributes that are checked for a move

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agostatd: rebalance_lxc_containers: use grep instead of for+next-if
Thomas Lamprecht [Wed, 20 Oct 2021 15:01:48 +0000 (17:01 +0200)]
statd: rebalance_lxc_containers: use grep instead of for+next-if

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agostatd: rebalance_lxc_containers: code bload reduction
Thomas Lamprecht [Wed, 20 Oct 2021 14:37:05 +0000 (16:37 +0200)]
statd: rebalance_lxc_containers: code bload reduction

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopvestatd: fix rebalancing cpusets for cgroupv2
Oguz Bektas [Thu, 14 Oct 2021 06:51:48 +0000 (08:51 +0200)]
pvestatd: fix rebalancing cpusets for cgroupv2

currently we only check the entry for cgroup v1 to decide if cores
should be rebalanced. extend the check to include cgroup v2 entries.

reported in forum [0]

[0]: https://forum.proxmox.com/threads/hard-set-streams-for-lxc-container.97768/

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoceph services: get_cluster_service: code cleanup
Thomas Lamprecht [Wed, 20 Oct 2021 14:28:01 +0000 (16:28 +0200)]
ceph services: get_cluster_service: code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoceph services: return early if versions stayed the same
Thomas Lamprecht [Wed, 20 Oct 2021 14:26:44 +0000 (16:26 +0200)]
ceph services: return early if versions stayed the same

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoceph services: drop broadcasting legacy version pmxcfs KV
Thomas Lamprecht [Wed, 20 Oct 2021 14:25:09 +0000 (16:25 +0200)]
ceph services: drop broadcasting legacy version pmxcfs KV

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopvenetcommit: better handle non-existent pending changes
Thomas Lamprecht [Wed, 20 Oct 2021 14:20:09 +0000 (16:20 +0200)]
pvenetcommit: better handle non-existent pending changes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agovzdump: pbs: suppress output from upload-log command
Fabian Ebner [Mon, 11 Oct 2021 07:14:23 +0000 (09:14 +0200)]
vzdump: pbs: suppress output from upload-log command

which ended up in the backup task log and can be confusing to users:

> INFO: Backup finished at 2021-10-11 08:40:38
> Result: {
>       "data": null
> }
> INFO: Backup job finished successfully

For proxmox-backup-server < 2.0.11-1, there was no output for the
upload-log command.

Reported in the community forum:
https://forum.proxmox.com/threads/backup-finishes-ok-but-data-null-info-on-finish.97740/

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agod/control: depend on libproxmox-acme-plugins directly
Thomas Lamprecht [Sat, 9 Oct 2021 12:14:53 +0000 (14:14 +0200)]
d/control: depend on libproxmox-acme-plugins directly

was provided indirectly through libproxmox-acme-perl but we want to
downgrade it there to a recommends

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodrop unused and ancient pvenetcommit shell sysv script
Thomas Lamprecht [Fri, 8 Oct 2021 14:01:13 +0000 (16:01 +0200)]
drop unused and ancient pvenetcommit shell sysv script

Handled by the pvenetcommit.service systemd unit nowadays

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/postinst: use reload-or-restart instead of try-reload-or-try-restart
Dominik Csapak [Thu, 7 Oct 2021 08:27:22 +0000 (10:27 +0200)]
d/postinst: use reload-or-restart instead of try-reload-or-try-restart

The only difference is that reload-or-try-restart does not do
anything if the service isn't already running, while
reload-or-restart also starts a stopped service.

We explicitly check if the service is enabled on upgrade before doing
any start/reload-or-restart action anyway. So, it would now start
daemons that were stopped but not disabled, which is not a really
valid state and would have happened on the next reboot anyway.

This starts new daemons (like the pvescheduler) automatically on a
package upgrade

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.0-13
Thomas Lamprecht [Tue, 5 Oct 2021 18:25:08 +0000 (20:25 +0200)]
bump version to 7.0-13

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agowizard: code cleanup
Thomas Lamprecht [Tue, 5 Oct 2021 18:06:49 +0000 (20:06 +0200)]
wizard: code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: vm create: allow configuring a TPM in wizard
Thomas Lamprecht [Tue, 5 Oct 2021 18:06:26 +0000 (20:06 +0200)]
ui: vm create: allow configuring a TPM in wizard

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: efi: default to new 4MB format and allow pre-enrolled keys
Thomas Lamprecht [Tue, 5 Oct 2021 18:05:20 +0000 (20:05 +0200)]
ui: efi: default to new 4MB format and allow pre-enrolled keys

to allow "real" secure boot, at least real enough for Windows 11 ;)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: efi/tpm: propagate disabled to child items
Thomas Lamprecht [Tue, 5 Oct 2021 18:03:19 +0000 (20:03 +0200)]
ui: efi/tpm: propagate disabled to child items

we'll need that soon once this is used int the wizard

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.0-12
Thomas Lamprecht [Tue, 5 Oct 2021 06:07:48 +0000 (08:07 +0200)]
bump version to 7.0-12

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoceph: code/whitespace cleanups
Thomas Lamprecht [Tue, 5 Oct 2021 06:01:10 +0000 (08:01 +0200)]
ceph: code/whitespace cleanups

avoid line bloat, use same capitalization style in warnings as (most)
of the rest of code, some style nits

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoceph: use method to have a single source for install flag file
Thomas Lamprecht [Tue, 5 Oct 2021 06:00:46 +0000 (08:00 +0200)]
ceph: use method to have a single source for install flag file

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoceph install: improve ceph install checks during installation
Aaron Lauterer [Mon, 4 Oct 2021 08:02:25 +0000 (10:02 +0200)]
ceph install: improve ceph install checks during installation

Adding a flag file during the Ceph installation helps to cover the time
span in which the binary is already present but the installation not yet
done.

The most noticeable effect is that the 'Next' button in the GUI will
only become active once the installation is actually finished and not
earlier.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoui: lxc options: change CIFS to SMB/CIFS
Aaron Lauterer [Mon, 4 Oct 2021 10:25:43 +0000 (12:25 +0200)]
ui: lxc options: change CIFS to SMB/CIFS

For consistency with the Storage panel and it might also help people to
make the connection if they are not aware that CIFS is a name used for
SMB.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoui: storage: change CIFS to SMB/CIFS
Aaron Lauterer [Mon, 4 Oct 2021 10:25:42 +0000 (12:25 +0200)]
ui: storage: change CIFS to SMB/CIFS

This will hopefully help people to find the needed storage as not
everyone will be aware of the fact that CIFS is also a name used for it
(technically it was only SMB v1).

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoui: add support for adding TPM devices
Stefan Reiter [Mon, 4 Oct 2021 15:29:21 +0000 (17:29 +0200)]
ui: add support for adding TPM devices

Inspired by HDEfi for efidisks. Extends the DiskStorageSelector to allow
hiding the format, since tpmstate can only be stored in 'raw' format
(even on directory storages).

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agod/lintian: update overrides
Thomas Lamprecht [Mon, 4 Oct 2021 10:12:02 +0000 (12:12 +0200)]
d/lintian: update overrides

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobuildsys: lintian: do not ignore "binaries" anymore
Thomas Lamprecht [Mon, 4 Oct 2021 10:07:18 +0000 (12:07 +0200)]
buildsys: lintian: do not ignore "binaries" anymore

not required anymore and if it would be, we'd rather use the
debian/lintian-overrides file

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopve6to7: improve manpage slightly
Thomas Lamprecht [Mon, 4 Oct 2021 09:13:51 +0000 (11:13 +0200)]
pve6to7: improve manpage slightly

this fixes a lintian complaint regarding "bad-whatis-entry"

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodrop pve5to6 checker tool, not relevant in 7.x release
Thomas Lamprecht [Mon, 4 Oct 2021 09:11:03 +0000 (11:11 +0200)]
drop pve5to6 checker tool, not relevant in 7.x release

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/postinst: fix lintian: command-with-path-in-maintainer-script postinst:76 /usr...
Thomas Lamprecht [Mon, 4 Oct 2021 08:38:56 +0000 (10:38 +0200)]
d/postinst: fix lintian: command-with-path-in-maintainer-script postinst:76 /usr/bin/pvecm

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: qemu/OSTypeEdit: set ostype in viewmodel
Dominik Csapak [Wed, 22 Sep 2021 09:27:47 +0000 (11:27 +0200)]
ui: qemu/OSTypeEdit: set ostype in viewmodel

so that we can retrieve it in the MultiDiskPanel

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: form/ControllerSelector: add option for selecting free on inital config
Dominik Csapak [Wed, 22 Sep 2021 09:27:46 +0000 (11:27 +0200)]
ui: form/ControllerSelector: add option for selecting free on inital config

we will sometimes directly give it a config, so the id can be selected
at the start

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: Utils: add capture group for the id in bus_match
Dominik Csapak [Wed, 22 Sep 2021 09:27:45 +0000 (11:27 +0200)]
ui: Utils: add capture group for the id in bus_match

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: qemu/OSTypeEdit: drop throwing an error on multiple widgets
Dominik Csapak [Wed, 22 Sep 2021 09:27:44 +0000 (11:27 +0200)]
ui: qemu/OSTypeEdit: drop throwing an error on multiple widgets

we will have multiple panels with the same widget. Instead
of raising an error in that case, simply ignore it, since
we normally only want to set the default initially, not when
users configured something else

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: qemu/HDEdit: fire an event when the disk id changes
Dominik Csapak [Wed, 22 Sep 2021 09:27:43 +0000 (11:27 +0200)]
ui: qemu/HDEdit: fire an event when the disk id changes

e.g. from scsi0 to scsi1 or from scsi0 to virtio0

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: qemu/HDEdit: use me instead of this
Dominik Csapak [Wed, 22 Sep 2021 09:27:42 +0000 (11:27 +0200)]
ui: qemu/HDEdit: use me instead of this

more in line with our remaining code style

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: form/ControllerSelector: add updateVMConfig and getConfId
Dominik Csapak [Wed, 22 Sep 2021 09:27:41 +0000 (11:27 +0200)]
ui: form/ControllerSelector: add updateVMConfig and getConfId

those are helpers that will be useful when we want to change the
vmconfig for the ControllerSelector on the fly

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: refactor sortByPreviousUsage and nextFreeDisk
Dominik Csapak [Wed, 22 Sep 2021 09:27:40 +0000 (11:27 +0200)]
ui: refactor sortByPreviousUsage and nextFreeDisk

we'll use them outside of the controllerSelector soon

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: form/ControllerSelector: set correct max value for the device-id
Dominik Csapak [Wed, 22 Sep 2021 09:27:39 +0000 (11:27 +0200)]
ui: form/ControllerSelector: set correct max value for the device-id

the 'diskControllerMaxIDs' object in Utils does not describe the
'maximum ids', but the maximum *number* of ids, so the max is one less

correctly set that instead

the api rejected those values (e.g. ide4) already, so its only a ui change

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: qemu/HDEdit: move Bandwidth options to a different tab
Dominik Csapak [Wed, 22 Sep 2021 09:27:38 +0000 (11:27 +0200)]
ui: qemu/HDEdit: move Bandwidth options to a different tab

for that we have to nest the now two tabs in a tabpanel into an inputpanel.
to prevent the options to be collected twice, we override the
'getValues' function of the 'sub-inputpanels' to return an empty object.
(we could make that an option for the inputpanel, but not necessary for
now)

also we have to move the 'bodyPadding' of the wizard to the 'defaults'
so we can override it for specific panels

and we have to manually set the width of the edit window since it
believes we only have a single column ('twoColumns' could also be an
option of the edit window should we need that again)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: ceph install wizard: fix config exists note position
Aaron Lauterer [Tue, 10 Aug 2021 13:27:26 +0000 (15:27 +0200)]
ui: ceph install wizard: fix config exists note position

During the Ceph installation, in the configuration step, a note is shown
if there already is a Ceph configuration present. This notification
should be in the center of the wizard but is currently barely visible.

ExtJS is having trouble calculating the position and the result is that
the note is placed almost out of the visible area.

Setting a fixed height helps ExtJS calculate the vertical position.
Changing from the 'beforeshow' listener to the 'afterrender' one helps
for the horizontal position.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoapi: ceph: create osd: work around udev bug
Fabian Ebner [Tue, 28 Sep 2021 11:39:55 +0000 (13:39 +0200)]
api: ceph: create osd: work around udev bug

There is a udev bug [0] which can ultimately lead to the udev database
for certain devices not being actively updated. The Diskmanage package
relies upon lsblk for certain info, and lsblk queries the udev
database. Ensure the information is updated by manually calling
'udevadm trigger' for the changed devices.

Without the fix, and a bit of bad luck, a cleaned up disk could still
show up as an 'LVM2_member' for example.

[0]: https://github.com/systemd/systemd/issues/18525

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoapi: check: create osd: use wipe_blockdev from the Diskmanage package
Fabian Ebner [Tue, 28 Sep 2021 11:39:54 +0000 (13:39 +0200)]
api: check: create osd: use wipe_blockdev from the Diskmanage package

which is mostly a copy of the wipe_disks helper with the difference
that it also uses wipefs on the device and its partitions.

Remove the wipe_disks helper as no users remain.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>