5
0
mirror of git://git.proxmox.com/git/pve-storage.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

1339 Commits

Author SHA1 Message Date
Fabian Ebner
3353698f45 Introduce prune-backups property for directory-based storages
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-07-24 15:44:53 +02:00
Wolfgang Bumiller
0dffc7ba55 bump version to 6.2-5
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-14 13:58:44 +02:00
Wolfgang Bumiller
0ca8eb4f9d pvesm: pass-through 'autogen' special value for encryption key
so that the on-update hook can handle its creation

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-14 13:57:57 +02:00
Wolfgang Bumiller
b3b63fc27d fix another encryption_key vs encryption-key instance
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-14 13:51:26 +02:00
Wolfgang Bumiller
842e23e347 bump version to 6.2-4
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-14 13:45:29 +02:00
Wolfgang Bumiller
3ca5000825 param mapping fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-10 10:52:45 +02:00
Thomas Lamprecht
c43655d2ed vdisk_list: skip scanning storages which cannot have images/rootdisks
Do not try to scan (and thus activate) storages which aren't
configured to support (or cannot support) "vdisks" anyway.

Avoids seemingly strange failures of VM migrations due to a backup storage
not being currently online - even if that storage isn't referenced in
the VM config anywhere..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-09 16:16:23 +02:00
Wolfgang Bumiller
d6fc193816 use ssh -X for upload
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-09 15:00:38 +02:00
Wolfgang Bumiller
6c67b3e239 bump version to 6.2-3
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-09 15:00:10 +02:00
Wolfgang Bumiller
02cc5e1033 quick fixup for prune command in vzdump
This is a hack and we should get rid of `run_client_cmd` and
`run_raw_client_cmd` as an API entry!

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-09 14:55:07 +02:00
Thomas Lamprecht
a08b499571 bump version to 6.2-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-09 14:03:33 +02:00
Thomas Lamprecht
9c81e528af d/control: depend on proxmox-backup-client
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-09 12:34:51 +02:00
Thomas Lamprecht
bb0a0f9680 pbs: activate_storage: query status to ensure we can connect
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-09 11:54:13 +02:00
Thomas Lamprecht
1aeb322bc3 pbs: allow to autogen an encryption key
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-09 11:53:51 +02:00
Thomas Lamprecht
ce2e273359 pbs: rename encryption_key param to encryption-key
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-09 11:53:27 +02:00
Wolfgang Bumiller
baf7712010 pvesm: encryption key parameter should load files
also `pvesm set` and `pvesm add` should behave the same with
respect to how configuration options are treated

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-09 11:49:02 +02:00
Wolfgang Bumiller
72385de9e2 refactor sensitive parameter handling
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-09 11:49:02 +02:00
Wolfgang Bumiller
76bb5febc7 pbs: encryption support, split "raw client command" API
(And deprecate it...)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-09 11:49:02 +02:00
Thomas Lamprecht
0f2549edd4 cifs: use more general name for password description
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-09 11:48:52 +02:00
Fabian Grünbichler
28be2a431b archive_info: relax custom name handling
we already differentiate between standard and non-standard names anyway
and don't detect and return the VMID in the latter case anyway. drop it
from the RE as well to allow names like 'vzdump-qemu-template.vma.lzo'
without the need for a fake VMID.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-07-08 15:26:19 +02:00
Fabian Ebner
b1ddc54a93 archive_info: use timelocal correctly
Because we always have 4-digit years, we can simply pass
the year itself to timelocal instead of subtracting 1900.
Like this it will also work for years not in the range 2000-2999.

See also:
https://perldoc.perl.org/Time/Local.html#Year-Value-Interpretation

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-07-08 10:45:49 +02:00
Thomas Lamprecht
e0bbbb6f48 bump version to 6.2-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-07 19:23:58 +02:00
Mira Limbeck
245b651789 fix #2460: use dm-uuid-mpath- as fallback for multipath
With Debian Buster it looks like the 'scsi-' method is no longer
reliable. In addition to that, which is also used for non-multipath
systems, add the 'dm-uuid-mpath-' method as fallback. This is also used
by openstack (see os-brick
39b201160b/os_brick/initiator/linuxscsi.py (L400))

Also sort the output of readdir so 'scsi-' is always after
'dm-uuid-mpath-' so the output of pvesm list does not change for systems
that worked before.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
2020-07-07 16:58:25 +02:00
Thomas Lamprecht
e6d1edcb93 pbs: run_raw_client_cmd: fix typo, and drop repetive info
It would be s/bps/pbs/ but as we already have "proxmox-backup-client"
included in the log through the executable name, so it should be
clear that this is a PBS command - so drop that part entirely.

Now using:
> run: /usr/bin/proxmox-backup-client ...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-07 10:15:59 +02:00
Thomas Lamprecht
d37729b95b scan_cifs: fix scanning server with no SMB1 fallback
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-01 15:46:30 +02:00
Thomas Lamprecht
8594155a66 scan cifs: fix passing "no pass" parameter
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-01 12:17:02 +02:00
Thomas Lamprecht
0b49e5cc6a scan storage: order scanned shares alphabetically
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-01 12:11:59 +02:00
Thomas Lamprecht
c42d86559c scan_cifs: do not add NT_STATUS lines to result
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-01 12:11:59 +02:00
Thomas Lamprecht
67a2371180 scan_cifs: do not enforce password for users
there can be accounts with explicit null password others than the
mapped guest account.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-01 12:11:59 +02:00
Thomas Lamprecht
afaa98f10f scan_cifs: pass user/pass over environment
As command line argument they are readable by ever user in the same
PID namespace.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-01 12:06:53 +02:00
Thomas Lamprecht
fd55f51efa scan_cifs: add workgroup domain independent of user param
they are not really bound to each other

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-01 12:06:53 +02:00
Thomas Lamprecht
be18d6dac7 scan_cifs: raise smbclient errors
Silencing error messages can extend the search for an issue while
having to advantage.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-01 12:06:53 +02:00
Thomas Lamprecht
436773fd78 scan_cifs: fix comment typo and indentation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-01 12:06:53 +02:00
Thomas Lamprecht
9afd3be18c add trailing newline to error message
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-30 14:19:24 +02:00
Fabian Ebner
8602fd5646 PBSPlugin: Add print_volid helper
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-06-30 13:59:23 +02:00
Fabian Ebner
35a3953213 Add archive_remove
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-06-30 13:59:23 +02:00
Fabian Ebner
e34afeb117 Extend archive_info to include filename and logfilename
Only expect the logfilename if the archive has a standard name.
This also gives a mechanism to get an untainted filename.

archive_info can take either a volume ID or a path as it's
currently implemented. This is useful for vzdump when there
is no storage (i.e. for 'vzdump --dumpdir'). Add a test case for this.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-06-30 13:59:23 +02:00
Fabian Ebner
7dd31e686c Whitespace cleanup
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-06-30 13:57:39 +02:00
Fabian Ebner
12442ae19c Fix 2763: Revert "storage_migrate: check if target storage supports content type"
This reverts commit 95015dbbf2.

parse_volname always gives 'images' and not 'rootdir'. In most
cases the volume name alone does not contain the needed information,
e.g. vm-123-disk-0 can be both a VM volume or a container volume.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-06-23 14:43:17 +02:00
Dominic Jäger
a43a796c64 doc: Clarify that pvesm export is mostly internal 2020-06-06 19:44:19 +02:00
Thomas Lamprecht
e9667b3418 base plugin: fall back to empty hash to avoid checking archive info definedness
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 19:40:10 +02:00
Fabian Ebner
fb821c1828 Expand archive_info to include ctime, vmid and is_std_name
where 'is_std_name' shows whether the backup name uses the standard naming
schema and most likely was created by our tools.

Also adds a '^' to the existing filename matching regex, which
should be fine since basename() is used beforehand.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-06-06 19:38:02 +02:00
Fabian Ebner
ddf7fdaa82 PBSPlugin: list_volumes: filter by vmid if specified
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-06-06 19:38:02 +02:00
Stoiko Ivanov
0f0d99a3e5 fix #2777 create zpools with stable dev paths
when compiling the disk list add a property with a stable
/dev/disk/by-id/ path for a block device when available.

This is needed to create zpools with the stable by-id links

The /dev/disk/by-id/ directory can contain multiple links to the same device
(e.g. when it's used as a LVM PV, or one for the wwn/nvme-eui in addition
to the one with vendor and serial). We take the first one which matches
the bus where the disk is attached. For nvme disks we exclude the one
containing the nvme-eui.

The patch assumes that not all disks need to have such a link (e.g.
virtio-block devices as we pass them to guests).

Additionally the tests were adapted to run successfully.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2020-06-06 19:32:33 +02:00
Dietmar Maurer
8b4c2a7ec6 PBSPlugin.pm: avoid ascii-art in proxmox-backup-client output 2020-06-03 11:07:01 +02:00
Thomas Lamprecht
5c04a0b317 ceph: get_local_version: allow optional v prefix for version number
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-22 18:50:06 +02:00
Thomas Lamprecht
9b0b45d9c3 bump version to 6.1-8
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-15 19:41:25 +02:00
Thomas Lamprecht
a6c4705a46 tests: re-add virt "none" negative test
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-15 19:32:21 +02:00
Thomas Lamprecht
5029f978c3 archive info: keep some basic strictness
we want to enforce at least the strictness that our tools can do
something with a backup archive..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-15 19:18:24 +02:00
Thomas Lamprecht
bf5af0fbf5 archive info: include archive name in error message
so that we have some context if users report issues with it..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-15 19:13:39 +02:00