5
0
mirror of git://git.proxmox.com/git/pve-guest-common.git synced 2025-02-07 01:58:06 +03:00

330 Commits

Author SHA1 Message Date
Thomas Lamprecht
f28a4d1398 bump version to 5.0.6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-21 13:31:14 +01:00
Thomas Lamprecht
06c318c45e vzdump: fixup style for multi-line literal strings
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-21 13:29:43 +01:00
Lukas Wagner
e5278e9827 vzdump: config: add 'notification-mode' param for backup jobs
'legacy-sendmail': Use mailto/mailnotification parameters and send
emails directly.
'notification-system': Always notify via notification system
'auto': Notify via mail if mailto is set, otherwise use notification
system.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-21 13:23:12 +01:00
Lukas Wagner
53bee4f466 vzdump: deprecate mailto/mailnotification/notification-{target, policy}
The first two will be migrated to the notification system, the second
were part for the first attempt for the new notification system.
The first attempt only ever hit pvetest, so we simply tell the user
to not use the two params.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 14:59:15 +01:00
Thomas Lamprecht
16bf01217c bump version to 5.0.5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-18 16:47:40 +02:00
Alexander Zeidler
9234d8a1fe fix #3069: vzdump: schema: add 'pbs-entries-max' property
configuring pbs-entries-max can avoid failing backups due to a high
amount of files in folders where a folder exclusion is not possible

Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
2023-09-18 16:46:40 +02:00
Fiona Ebner
018565379e replication: avoid passing removed storages to target
After removing a storage, replication states can still contain
references to it, even if no volume references it anymore.

If a storage does not exist in the storage configuration, the
replication target runs into an error when preparing the job locally.
This error prevents both running and removing the replication job. Fix
it by not passing the invalid storage ID in the first place.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-08-30 11:52:56 +02:00
Wolfgang Bumiller
8a81208e4d bump version to 5.0.4
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-07-24 15:22:15 +02:00
Lukas Wagner
21ec073055 vzdump: add config options for new notification backend
- Add new option 'notification-target'
  Allows to select to which endpoint/group notifications shall be sent
- Add new option 'notification-policy'
  Replacement for the now deprecated 'mailnotification' option. Mostly
  just a rename for consistency, but also adds the 'never' option.
- Mark 'mailnotification' as deprecated in favor of 'notification-policy'
- Clarify that 'mailto' is ignored if 'notification-target' is set

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-07-24 15:15:07 +02:00
Thomas Lamprecht
1f9d736721 vzdump: use worker aware log_warn from rest environment for warn level
This ensures that the alert counter is incremented when a message
with such a level is logged, and that the task is prominently marked
in the web UI task log.

The log_warn produces the exact same message format for the warn
level, so we can just swap printing to STDERR for the warning level
without any change to the resulting text in the log. Keep printing to
the (on storage saved) backup log-fd as is.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-07-05 16:21:21 +02:00
Thomas Lamprecht
af536a40f3 vzdump: always lower-case level in message logging base method
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-07-05 16:21:21 +02:00
Wolfgang Bumiller
831a2fffb2 minor style and doc fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-13 10:49:17 +02:00
Thomas Lamprecht
94b4883904 bump version to 5.0.3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-07 19:35:25 +02:00
Fiona Ebner
56f09314cb abstract config: add method to calculate derived properties from a config
HA manager currently needs to know about internal details about the
configs and how the properties are calculated. With this method, those
details are abstracted away, allowing to change the configuration
structure. In particular, QemuConfig's 'memory' can be turned into
a property string without HA manager needing to know about it (once HA
manager switched to using this mehtod).

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-06-07 19:35:04 +02:00
Thomas Lamprecht
f9c40120f1 bump version to 5.0.2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-07 19:21:15 +02:00
Fiona Ebner
29b4ce9390 vzdump: config: improve description of ionice setting
The CFQ scheduler was removed with Linux 5.0 and ionice is now used
by the newer BFQ scheduler. Mention what the special value 8 does.
Also mention that for snapshot and suspend mode backups of VMs, the
setting only affects the compressor, because the kvm process is not a
child process of vzdump then and does not inherit the ionice priority.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-06-07 19:18:42 +02:00
Thomas Lamprecht
59b336314f mappings: cleanup imports
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-07 19:16:02 +02:00
Dominik Csapak
11fa95682e add PCI/USB Mapping configs
adds a config file for each type of resource (usb/pci) by using a 'map'
array propertystring for each node mapping

in each mapping we save the path(s) and some other information to detect
hardware changes (if possible) like the vendor/device id

both configs have custom header parser/formatter to omit the type (since
we only want one type per config here)

also each config has some helpers like find_on_current_node

the resulting config (e.g. for pci) would look like this:
2023-06-07 19:14:38 +02:00
Alexandre Derumier
aabf879e0c helpers : add check_vnet_access
if a tag is defined, test if user have a specific access to the vlan (or propagate from full bridge acl or zone)
if trunks is defined, we check permissions for each vlan of the trunks
if no tag, test if user have access to full bridge.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>

FG:
- conditionalize check for bridge
- make trunk to tags helper private for now

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-06-07 16:47:31 +02:00
Wolfgang Bumiller
d8777f5653 bump version to 5.0.1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-07 13:28:49 +02:00
Wolfgang Bumiller
50e7b5d656 break libpve-http-server-perl << 5.0.2 and pve-manager << 8.0.0~7
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-07 13:28:32 +02:00
Wolfgang Bumiller
521e0e4cc0 depend on pve-common >= 8.0.2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-07 13:28:16 +02:00
Dominik Csapak
75b254985f vzdump: change 'exclude-path' from alist to an array format
to get rid of the '-alist' format

Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-07 13:24:21 +02:00
Stefan Hanreich
f5dbf998dc vzdump: improve description of bwlimit parameter
This makes the description consistent with the other places that
have bwlimit as a parameter as well.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-06-06 17:56:47 +02:00
Thomas Lamprecht
99bcf18468 bump version to 5.0.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-22 13:24:50 +02:00
Thomas Lamprecht
d412cf7ae1 d/control: define compat level via build-depends and raise to 13
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-22 13:24:50 +02:00
Thomas Lamprecht
408800ff77 d/control: raise standards version compliance to 4.6.2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-22 13:24:50 +02:00
Thomas Lamprecht
f05c2303fa buildsys: add sbuild convenience target
And only run lintian explicitly for the dsc target, as sbuild runs it
itself anyway

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-22 13:24:50 +02:00
Thomas Lamprecht
cdf9756618 buildsys: cleanup and expand clean target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-22 13:24:50 +02:00
Thomas Lamprecht
d0a94a5372 buildsys: derive upload dist automatically
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-22 13:24:50 +02:00
Thomas Lamprecht
9a75d60723 buildsys: make build-dir generation atomic
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-22 13:24:50 +02:00
Thomas Lamprecht
f26cc0b2d4 buildsys: use full DEB_VERSION
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-22 13:24:50 +02:00
Thomas Lamprecht
1ae23d630a d/control: wrap-and-sort -tkn
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-22 12:53:23 +02:00
Thomas Lamprecht
fc81777b3d src/makefile: convert to use simple parenthesis
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-22 12:30:42 +02:00
Thomas Lamprecht
77ca89a73f bump version to 4.2-4
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-16 11:54:08 +01:00
Thomas Lamprecht
c95b563b7b config: ensure definedness for iterating pending & snapshot volumes
while it will work as is, autovivification can be a real PITA so this
should make it more robust and might even avoid having the one or
other warning about accessing undef values in logs.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-16 11:48:51 +01:00
Fiona Ebner
c788e7c8d1 fix #4572: config: also update volume IDs in pending section
The method is intended to be used in cases where the volumes actually
got renamed (e.g. migration). Thus, updating the volume IDs should of
course also be done for pending changes to avoid changes referring to
now non-existent volumes or even the wrong existing volume.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-03-16 10:27:44 +01:00
Thomas Lamprecht
c363e8245c abstract migrate: avoid branched loop, move error-level into prefix
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-12 13:01:18 +01:00
Thomas Lamprecht
fb2bf95ebb abstract migrate: rename tstr to prefix
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-12 13:00:33 +01:00
Thomas Lamprecht
2b062714d8 abstract migrate: minimal code cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-12 12:59:37 +01:00
Thomas Lamprecht
790f7f1f97 abstract migrate: sort and split use statements
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-12 11:21:57 +01:00
Thomas Lamprecht
5ae2f221e2 bump version to 4.2-3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-21 08:17:36 +01:00
Thomas Lamprecht
091598000c tag helpers: add get_unique_tags method for filtering out duplicates
tags must be unique, allow the user some control in how unique (case
sensitive) and honor the ordering settings (even if I doubt any
production setups wants to spent time and $$$ on cautiously
reordering all tags of their dozens to hundreds virtual guests..

Have some duplicate code to avoid checking to much in the loop
itself, as frequent branches can be more expensive.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-21 08:15:21 +01:00
Thomas Lamprecht
2bf45e382a tag helpers: code/style cleanup and reduction
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-21 08:09:02 +01:00
Thomas Lamprecht
a5cbcc91c7 bump version to 4.2-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-17 13:14:03 +01:00
Thomas Lamprecht
a2fc394c75 d/control: bump versioned dependency for libpve-cluster-perl to >= 7-2-3
to ensure we got the tag stuff available

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-17 13:11:48 +01:00
Dominik Csapak
2b00f6236d GuestHelpers: add tag related helpers
'get_allowed_tags':
returns the allowed tags for the given user

'assert_tag_permissions'
helper to check permissions for tag setting/updating/deleting
for both container and qemu-server

gets the list of allowed tags from the DataCenterConfig and the current
user permissions, and checks for each tag that is added/removed if
the user has permissions to modify it

'normal' tags require 'VM.Config.Options' on '/vms/<vmid>', but not
allowed tags (either limited with 'user-tag-access' or
'privileged-tags' in the datacenter.cfg) requrie 'Sys.Modify' on '/'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 10:24:33 +01:00
Thomas Lamprecht
b208122a11 bump version to 4.2-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-12 16:52:14 +01:00
Thomas Lamprecht
fb8d2eeca7 d/control: bump versioned dependency for libpve-common-perl to 7.2-6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-12 16:50:22 +01:00
Thomas Lamprecht
a90246abb1 vzdump: comment that vzdump.cron is the legacy parser
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-12 16:30:02 +01:00