Stefan Reiter [Thu, 5 Nov 2020 15:21:51 +0000 (16:21 +0100)]
restore default value of 0 for remove/maxfiles
If neither the 'remove' option of vzdump nor the 'maxfiles' option in
the storage config are set, assume a value of 0, i.e. do not delete
anything and allow unlimited backups.
Restores previous behaviour that was broken in 7ab7d6f15f.
Also fixes a warning about using '== 0' on a non-number type.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Stefan Reiter [Mon, 19 Oct 2020 12:18:42 +0000 (14:18 +0200)]
ui: qemu: set correct disabled state for start button
If a guest's QEMU process is 'running', but QMP says 'shutdown' or
'prelaunch', the VM is ready to be booted anew, so we can show the
button.
The 'shutdown' button is intentionally not touched, as we always want to
give the user the ability to 'stop' a VM (and thus kill any potentially
leftover processes).
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
fixes commit 43ff41c6c58ea8f6c28ef0a4012b4af706fa280b, which changed
the logic to the newer storage prune helpers, but those are designed
in the spirits of PBS, with a keep-option not set meaning to keep
none.
This does not respects the storage special handling of maxfiles.
While in the API/CLI that option must be > 0m in can be zero when set
in a storage configuration entry, and then it means keep all. So, set
the internal remove option to false if that special condition is met.
This would have been a clearer, and less prone to changes,
implementation to begin with.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Wed, 28 Oct 2020 09:35:24 +0000 (10:35 +0100)]
buildsys: fix JS source makefile order
they cannot really be alphabetically sorted, as else some elements
are tried to be accessed before they are defined, which makes ExtJS
do a HTTP request for them.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Alwin Antreich [Mon, 19 Oct 2020 10:39:30 +0000 (12:39 +0200)]
ceph: split out pool set into own method
to reduce code duplication and make it easier to add more options for
pool commands.
Use a new rados object for each 'osd pool set', as each command can set
an option independent of the previous commands success/failure. On
failure a new rados object would need to be created and that will
confuse task tracking of the REST environment.
Fabian Ebner [Thu, 22 Oct 2020 10:30:13 +0000 (12:30 +0200)]
backup: include IDs for non-existent guests
Like this, there will be a backup task (within the big worker task)
for such IDs, which will then visibly (i.e. also visible in the
notification mail) fail with, e.g.:
unable to find VM '123'
In get_included_guests, the key '' was chosen for the orphaned IDs,
because it cannot possibly denote a nodename.
At the moment it might not be possible to trigger this anymore,
because of the guest inclusion rework that happened later on.
But to make tasks for inexistent guest IDs visibly fail again,
this check will be necessary. Also, to get the error message in
the mail, it needs to fail inside the eval block.
Thus, keep the check in the eval block and move the block of code
using the plugin to below the check.
Dominik Csapak [Mon, 19 Oct 2020 14:15:25 +0000 (16:15 +0200)]
partially fix #3056: namespace vzdump tmpdir with vmid
this fixes an issue where a rogue running backup would upload the vm
config of a later backup in a backup job
instead now that directory gets deleted and the config is not
available anymore
we cannot really keep those directories around until the end of the
backup job, since we temporarily save ct contents there, which could get
large very fast
Stefan Reiter [Tue, 6 Oct 2020 13:32:18 +0000 (15:32 +0200)]
ui: improve boot order editor
The new boot order property can express many more scenarios than the old
one. Update the editor so it can handle it.
Features a grid with all supported boot devices which can be reordered
using drag-and-drop, as well as toggled on and off with an inline
checkbox.
Support for configs still using the old format is given, with the first
write automatically updating the VM config to use the new one.
The renderer for the Options panel is updated with support for the new
format.
Note that it is very well possible to disable all boot devices, in which
case an empty 'boot: ' will be stored to the config file. I'm not sure
what that would be useful for, but there's no reason to forbid it
either, just warn the user that it's probably not what they want.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Aaron Lauterer [Thu, 1 Oct 2020 12:18:40 +0000 (14:18 +0200)]
ui: FirewallRules.js: fix #3049 wider rule number column
Allows 2 digits rule numbers to be visible in the column. Made it a bit
wider than needed to account for potentially wider font rendering on
different platforms.
and make the two options mutally exclusive as long
as they are specified on the same level (e.g. both
from the storage configuration). Otherwise prefer
option > storage config > default (only maxfiles has a default currently).
Defines the backup limit for prune-backups as the sum of all
keep-values.
There is no perfect way to determine whether a
new backup would trigger a removal with prune later:
1. we would need a way to include the not yet existing backup
in a 'prune --dry-run' check.
2. even if we had that check, if it's executed right before
a full hour, and the actual backup happens after the full
hour, the information from the check is not correct.
So in some cases, we allow backup jobs with remove=0, that
will lead to a removal when the next prune is executed.
Still, the job with remove=0 does not execute a prune, so:
1. There is a well-defined limit.
2. A job with remove=0 never removes an old backup.
if the checkbox is not checked, we set the value of the vmid filter to ''
but left 'exactMatch' enabled, which means we filter all out where
the vmid is not ''
what we instead want is to remove also the exactMatch so that we
get *all* entries back not *none*
Fabian Ebner [Thu, 27 Aug 2020 11:16:55 +0000 (13:16 +0200)]
ContentView: block removal of in-use container image
Since commit 5dae1a319b32ea3ebbb0b48a9f0b5e3abd1833c9 in pve-storage,
list_volumes correctly returns content type 'rootdir' for container images.
Adapt the relevant check here to make removal behave like it does
for VM images again.
Aaron Lauterer [Tue, 4 Aug 2020 09:46:38 +0000 (11:46 +0200)]
backup: fix #2913 order jobs numerically by VMID
At this point, the VMIDs are already numerically sorted by the
PVE::VZDump::check_vmids method. Calling another sort on the array,
especially without `{$a <=> $b}`, resulted in reordering the array
alphabetically.
Thomas Lamprecht [Fri, 24 Jul 2020 17:11:28 +0000 (19:11 +0200)]
ui: Proxmox Backup: allow to autogenerate an encryption key
a bit more complicated than wished, but if we want to have at least a
bsaic OK user experience we need to give good feedback that the key
will be deleted.
We definitively want to extend this, allow uploading their own,
export if root@pam, only move not delete on "removal", for safety.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
In some situations Ceph's auto-detection doesn't recognize the device
class correctly. The option allows to set it directly on osd create,
instead of altering it afterwards. This way the cluster doesn't need to
shift data back and forth unnecessarily.
shows a runningChart (like for reads) for the recovery speed
also shows a progressbar of the health percentage of the cluster
with an estimate of how long the recovery might need
(unhealthy objects) / (objects per second)
only show them when a recovery is ongoing or there are unhealthy
objects
VZDump: add TARFILE to environment for hookscripts
The renaming of tarfile to target in 848cf539e59b4553559b9ff3207a3c5556dc1cc0
can break existing vzdump hook scripts of users.
by setting the TARFILE variable in addition to TARGET the scripts will continue
to work.