fix #2609 gui: backup: add window for not backed guests
In case that there are guests which are not covered by any backup job, a
notification is shown and a window with a grid can be opened to view
these guests.
fix #2609 api: backupinfo: add non job specific endpoint
Adds a new api endpoint at cluster/backupinfo for cluster wide backup
stuff. This is necessary because cluster/backup expects a backup job ID
at the next level and thus other endpoints are hard to impossible to
implement under that hierarchy.
The only api endpoint available for now is the `not_backed_up` which
returns a list of all guests which are not covered by any backup job.
The top level index endpoint is left unsused for now to be available for
a more generic summary endpoint in the future.
The new detail view for backup jobs shows the settings similar to the
edit dialog but read only. Additionally it does show a list of all
included guests with their volumes and whether these volumes will be
included in the backup.
vzdump: included_guest: return empty hash if no guests selected
This will fix the behaviour when calling `vzdump --stop` to cause all
local guests to be backed up.
When refactoring this logic in commit df5875b4, the assumption was that
every call will have one of the following parameters set: pool, list of
VMIDs or all (intentional or when exclude is used).
There is an addtional possibility, that vzdump is called with only
--stop. Thus there are no other parameters that would indicate which
VMIDs to include.
Even now we can have plain vma files which, while an archive, are not
a TARfile.
Use the generic (backup) target as key instead. Makes it less
confusing to be reused for PBS in a later patch.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Mira Limbeck [Thu, 25 Jun 2020 14:48:48 +0000 (16:48 +0200)]
change permissions for non-network cloudinit settings
With the introduction of VM.Config.Cloudinit we can set the user,
password and an SSH key without VM.Config.Network permission.
Keep the fallback for VM.Config.Network so custom roles don't break.
Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
Stefan Reiter [Mon, 4 May 2020 10:58:43 +0000 (12:58 +0200)]
ui: ProcessorEdit: allow modifications with inaccessible CPU model
An administrator can set a custom CPU model for a VM where the general user
does not have permission to use this particular model. Prior to this change
the ProcessorEdit component would be broken by this, since the store of the
CPU type selector did not contain the configured CPU model.
Add it in manually if this situation occurs (with 'Unknown' vendor, since
we cannot retrieve it from the API), but warn the user that changing it
would be an irreversible action.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Stefan Reiter [Mon, 4 May 2020 10:58:42 +0000 (12:58 +0200)]
ui: CPUModelSelector: use API call for store
CPU models are retrieved from the new /nodes/X/cpu call and ordered by
vendor to approximate the previous sort order (less change for accustomed
users).
With this, custom CPU models are now selectable via the GUI.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Stefan Reiter [Mon, 4 May 2020 10:58:41 +0000 (12:58 +0200)]
ui: ProcessorEdit: fix total core calculation and use view model
Clean up the code in ProcessorEdit with a view model and fix a bug while at
it - previously, pressing the 'Reset' button on the form would always set
the value of the total core count field to 1, so mark 'totalcores' with
'isFormField: false' to avoid reset.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Aaron Lauterer [Wed, 17 Jun 2020 12:13:38 +0000 (14:13 +0200)]
vzdump: move remaining guest include logic to single method
The `guest include` logic handling `all` and `exclude` parameters was in
the `PVE::VZDump->exec_backup()` method. Moving this logic into the
`get_included_guests` method allows us to simplify and generalize it.
This helps to make the overall logic easier to test and develop other
features around vzdump backup jobs.
The method now returns a hash with node names as keys mapped to arrays
of VMIDs on these nodes that are included in the vzdump job.
The VZDump API call to create a new backup is adapted to use the new
method to create the list of local VMIDs and the skiplist.
Permission checks are kept where they are to be able to handle missing
permissions according to the current context. The old behavior to die
on a backup job when the user is missing the permission to a guest and
the job is not an 'all' or 'exclude' job is kept.
allow users with Sys.Modify to modify custom or ACME certificates. those
users can already hose the system in plenty of ways, no reason to
restrict this in particular to being root@pam only.
Thomas Lamprecht [Wed, 17 Jun 2020 08:16:23 +0000 (10:16 +0200)]
fix #2802: metric flush check should not care about current usage
We only need to check if the next data addition brings us over the
batch send size, not if we have already at least half of that data in
there, as else we may get again over the batch sent size.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Aaron Lauterer [Mon, 8 Jun 2020 13:00:34 +0000 (15:00 +0200)]
vzdump: make guest include logic testable
As a first step to make the whole guest include logic more testable the
part from the API endpoint has been moved to its own method with as
little changes as possible.
Everything concerning `all` and `exclude` logic is still in the
PVE::VZDump->exec_backup() method.
Fabian Ebner [Mon, 4 May 2020 08:50:40 +0000 (10:50 +0200)]
Allow setting no target storage and make it default
so the current disk locations can be preserved even if
there are multiple local disks. And users don't have to
manually select the current storage if there is only one
local disk.
Fabian Ebner [Mon, 4 May 2020 08:50:39 +0000 (10:50 +0200)]
Don't show empty parentheses when size is not known
The size of VM state files and the size of unused disks not
referenced by any snapshot is not saved in the VM configuration,
so it's not available here either.
Dominik Csapak [Fri, 29 May 2020 12:28:22 +0000 (14:28 +0200)]
ui: add checkbox for vmid filter for backupview
instead of hardcoding the text 'type-id-' into the searchbar
to accomodate for the additional size, add an overflowHandler
to the toolbar (for very small display sizes)
and do a breaks on older network package as we do not depend on it
due to it being an optional/experimental feature, so reverse the
depends with the breaks.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Fri, 29 May 2020 11:07:57 +0000 (13:07 +0200)]
ui: fix HotplugFeatureSelector
we recently changed the setValue behaviour of the inputpanel and editwindow
(we now set all fields with the same names), which leads to wrong
behaviour here
use a different name for the internal checkboxes to avoid this