Commit Graph

5190 Commits

Author SHA1 Message Date
Alwin Antreich
c423489a41 ceph: add pg_autoscale_mode to pool create
Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2020-10-22 18:18:35 +02:00
Alwin Antreich
7e03ec643b ceph: use pool common options pool create
to keep the pool create & set in sync.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2020-10-22 18:18:35 +02:00
Alwin Antreich
ba24f026e0 ceph: allow to alter pool settings
after creation, so that users don't need to go the ceph tooling route.
Separate common pool options to reuse them in other places.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2020-10-22 18:18:35 +02:00
Alwin Antreich
50adb13155 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.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2020-10-22 18:18:35 +02:00
Fabian Ebner
d4d0177fa6 simplify get_included_vmids function
by collecting all the guest IDs first.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-10-22 16:29:26 +02:00
Fabian Ebner
f647d0fc01 sort the skip list numerically
The skip list was not always sorted if there were external IDs for multiple
external nodes.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-10-22 16:29:26 +02:00
Fabian Ebner
4d73f0e254 order guest IDs numerically in exec_backup
The assumption that they already are sorted is no longer valid,
because of the IDs for non-existent guests.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-10-22 16:29:26 +02:00
Fabian Ebner
7f87414894 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.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-10-22 16:29:26 +02:00
Fabian Ebner
d51f5a1e8d only use plugin after truthiness check
Commit 1a87db9e56 introduced
a usage of plugin before the truthiness check for plugin.

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.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-10-22 16:29:26 +02:00
Fabian Ebner
83b2191464 remove outdated comment
Commit df5875b41e moved the
all/exclude logic into the single method

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-10-22 16:29:26 +02:00
Fabian Ebner
b03093fedb remove unused variable
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-10-22 16:29:26 +02:00
Dominik Csapak
dfb1611534 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

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-10-22 16:29:26 +02:00
Thomas Lamprecht
9aefb2bbd3 d/control: bump versioned dependency for qemu-server
to ensure we have the new boot order stuff available..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-22 16:29:26 +02:00
Thomas Lamprecht
dd27ec6d3a ui: bootorder: show device type as icon for UX
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-16 14:47:10 +02:00
Thomas Lamprecht
595c30aa62 ui: bootorder: define all column widths flex
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-16 14:46:48 +02:00
Thomas Lamprecht
eacd918e0a ui: bootorder: set minHeight for grid to conceal the long load time a bit
as else the window is not centered if it only grows in size after
ExtJS rendered it completely once.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-16 14:45:39 +02:00
Thomas Lamprecht
9377540652 ui: bootorder: set common options using the defaults property
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-16 14:43:59 +02:00
Stefan Reiter
1cc7c672b7 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>
2020-10-14 12:31:14 +02:00
Aaron Lauterer
659a335026 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.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2020-10-01 16:35:26 +02:00
Fabian Ebner
f354fe47fc Always use prune-backups instead of maxfiles internally
For the use case with '--dumpdir', it's not possible to call prune_backups
directly, so a little bit of special handling is required there.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-09-30 10:56:30 +02:00
Fabian Ebner
e6946086e3 Allow prune-backups as an alternative to maxfiles
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.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-09-30 10:56:30 +02:00
Thomas Lamprecht
5c51bb267c d/control: bump versioned dependency of libpve-guest-common-perl
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-09-30 09:56:12 +02:00
Dominic Jäger
dc6e0a523a vzdump: Fix typo in UPID error message
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2020-09-29 11:09:38 +02:00
Dominik Csapak
ac27dd3269 ui: fix unchecking 'Filter VMID'
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*

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-09-25 09:06:43 +02:00
Fabian Grünbichler
8f8073cb2e tasks: allow API tokens to query their own UPIDs
and regular users to read all their own tasks as well as those of their
associated tokens.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-09-23 15:12:31 +02:00
Dominik Csapak
c84c5c9ad7 ui: qemu/AgentIPView: also filter out 0:0:0:0:0:0
it seems that some guest-agents format an non-existant mac adress
differently (e.g. macos, see [0]) so filter that also out

0: https://forum.proxmox.com/threads/macos-vm-optischer-makel.76263/

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-09-23 15:09:58 +02:00
Thomas Lamprecht
76fa1b432a ui: pbs: allow empty fingerprint
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-09-23 15:09:46 +02:00
Fabian Grünbichler
3af4496551 bump version to 6.2-12
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-09-21 11:28:37 +02:00
Oguz Bektas
641da26d54 lxc: increase limit of max cores from 128 to 8192
to match the recently change in the container backend

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-09-15 11:24:26 +02:00
Thomas Lamprecht
168f1f8004 d/control: update versioned dependency for pve-common
ensuring we have the new behavior of sendmail regarding empty from
available.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-09-07 10:06:57 +02:00
Stoiko Ivanov
d49b703723 use PVE::Tools::sendmail for update notifications
instead of calling /usr/sbin/sendmail directly.

Tested with:
```
echo "[]" > /var/lib/pve-manager/pkgupdates
pvesh create /nodes/rosa/apt/update --notify 1

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2020-09-07 09:42:24 +02:00
Dominik Csapak
fe1dd5bbbf ui: dc/Backup: disable pveCompressionSelector for pbs storages
like in window/Backup

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-09-03 18:04:25 +02:00
Fabian Ebner
8e262f397d 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.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-08-28 10:25:12 +02:00
Stephan Leemburg
e08f07de20 Bump maximum number of container net interfaces from 10 to 32
Signed-off-by: Stephan Leemburg <stephan.leemburg@it-functions.nl>
2020-08-27 12:58:16 +02:00
Thomas Lamprecht
6f5c3b98ac pveversion: track proxmox-backup-client
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-21 13:31:24 +02:00
Fabian Ebner
de2d177ec6 make use of archive_info and archive_remove
to avoid some code duplication.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-08-20 17:41:04 +02:00
Thomas Lamprecht
09575ae8f6 replication: followup: include guest node in error message
tell the user what check actually failed..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-20 13:48:53 +02:00
Fabian Grünbichler
b88b01008b replication: check for source == target on job creation
and die.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-08-20 13:47:21 +02:00
Fabian Grünbichler
10257794f2 replication: target is a required parameter
no need to check for definedness

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-08-20 13:47:21 +02:00
Fabian Grünbichler
ef3fde16e2 replication: refactor source checks on job creation
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-08-20 13:47:21 +02:00
Thomas Lamprecht
1e67b44463 api: ACME revoke: do not abort if CA is just expired
Else, a user would need to renew it first before being able to revoke
it, which does not make much sense..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-19 18:52:48 +02:00
Thomas Lamprecht
25beb9038c api: ACME renew: handle error from revoking old cert gracefully
this normally just means that the old cert is already expired, we do
not care for that - after all: we got a new (renewed) valid cert
successfully.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-19 18:49:20 +02:00
Thomas Lamprecht
34b53ccc82 ui: fix PBS edit typos
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-19 15:48:51 +02:00
Thomas Lamprecht
d3d1e19912 ui: fixup gettext quoting
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-18 18:27:43 +02:00
Fabian Grünbichler
6a545c326c test: fix mail_test for non-root user
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-08-13 12:54:51 +02:00
Fabian Ebner
9671488c5d Set source when creating a new replication job
If source is missing, pvesr will set it via job_status
on the next run. But the info is already present here,
so it doesn't hurt to use it.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-08-11 13:54:21 +02:00
Dominik Csapak
496eb1ccdf ui: filter on exact vmid
so that backups of vmid 1000 do not show up on vm 100 with 'filte vmid'
enabled

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-08-11 13:48:19 +02:00
Aaron Lauterer
eb0021502a 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.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2020-08-11 13:48:19 +02:00
Fabian Grünbichler
01fc36722d vzdump: use configured tmpdir for PBS
instead of always using the default hard-coded one.

otherwise, suspend mode container backups might run out of space even though the admin configured a big enough tmpdir.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-08-06 16:03:05 +02:00
Hannes Laimer
648696b50b ui: Close #2908: fixed password validator for adding PBS as storage
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2020-08-03 08:08:08 +02:00