Commit Graph

1144 Commits

Author SHA1 Message Date
14092a3794 LVM commands: ignore "No medium found" bogus warnings
Those come normally from virtual devices, like a IPMI disk, if no
media is attached. They spam the log really often on operations like
migrate, and are quite scare-mongering. So filter them out.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-29 14:44:17 +01:00
518f3908bf rbd: update features of image when mapping snapshot
in order to fix the features even if the image itself never gets mapped.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-29 13:41:33 +01:00
b4227e776f rbd: don't attempt to update features of snapshots
it does not work:

disable RBD image features this kernel RBD drivers is not compatible with: fast-diff,object-map,deep-flatten
clone failed: could not disable krbd-incompatible image features 'fast-diff,object-map,deep-flatten' for rbd image: vm-123123123-disk-0@test: rbd: snapshot name specified for a command that doesn't use it

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-29 11:09:52 +01:00
eb98e68611 bump version to 6.1-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-27 14:46:53 +01:00
b5eff97d66 pvesm import: make error messages consistent
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-27 14:36:19 +01:00
f105c1766e pvesm import: improve handling of interrupted export
since 'pvesm export' and 'pvesm import' are connected via a pipe and
SSH, a fatal error in the former can lead to no valid header being
written to the pipe. handle this more gracefully by printing an easier
to understand error message, instead of uninitialized warnings with no
context.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-27 14:36:19 +01:00
97cf933fe5 fix #2309: allow LVM Volume Group names starting with a digit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-26 14:17:19 +01:00
8bd69ec82d bump version to 6.0-12
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-25 18:28:57 +01:00
43fe2a0d2c d/controll: add zfs-zed to Recommends
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-25 14:57:23 +01:00
c5590ef7ba d/control: bump version dependency to pve-common
ensures we have the new kernel_version helper available.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-23 16:15:59 +01:00
0ef8fb9d4d RBD: disable and enable features depending on kernel version
Modern kernel, like 5.3, support all those features ('fast-diff',
'object-map', 'deep-flatten'), so we do not want to disable them
there. 5.0 already supports exclusive-locks, so no need to disable
exclusive locking there.

Further, we also want to profit from new features available, so let's
enable those which can be enabled "live" (i.e., after image creation)
if their available.

While we could also parse the kernel information directly from:
/sys/module/libceph/parameters/supported_features
there's not much advantage to that, features cannot be disabled with
KConfig, their also very dependent of the kernel version booted.
So for us it's enough to check that one.

This only affects container and VMs backed by a storage with KRBD
explicitly enabled. But as the enabling and disabling happens
transparently, it has no effect on the running guest.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-23 15:44:19 +01:00
5102900d50 rbd: group and sort module usage
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-22 18:15:25 +01:00
3ee4ef1886 bump version to 6.0-11
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-22 16:06:20 +01:00
a4e603c657 RBD: fix ceph version detection
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-22 16:02:40 +01:00
0877df047c cleanuo: no need to negate we have not-equal
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-21 12:43:55 +01:00
a4e41b0bbf change var name ct to type to prevent confusion with container
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-11-21 12:43:55 +01:00
5dae1a319b fix #2467: avoid duplicate volumes & tag with correct content type
The bugfix for #2317 introduced a kind of odd API behavior, where
each volume was returned twice from our API if a storage has both
'rootdir' & 'images' content types enabled. To give the content type
of the volume an actual meaning, it is now inferred from the
associated guest, if there's no guest or we don't have an owner for
that volume we default to 'images'.

At the volume level, there is no option to list volumes based on
content types, since the volumes do not know what type they are
actually used for.

Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-11-21 12:43:55 +01:00
528aa0eefb followup: remove no-op JSONSchema::check_format on mountpoint
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-21 12:43:55 +01:00
dcefd9dd28 fix #2085: add mountpoint property for non-default ZFS pool MPs
When adding a zfspool storage with 'pvesm add' the mount point is now
added automatically to the storage configuration if it can be
determined.  path() does not assume the default mountpoint anymore,
fixing 2085.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2019-11-21 12:42:38 +01:00
61c261e76c pvesm list: right align size column
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-21 11:59:43 +01:00
2e2e11db3e add content type to pvesm list output
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-11-21 09:01:43 +01:00
ad71f2ffb6 bump version to 6.0-10
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-18 12:06:01 +01:00
396477a7ce d/control: add (build-)depends on libpve-cluster-perl
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-18 12:03:00 +01:00
0ce8cadd7f use PVE::RRD for RRD data
refactored from PVE::Cluster. same code, same semantics, different file.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-18 12:03:00 +01:00
65bb98596c use PVE::SSHInfo
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-18 12:03:00 +01:00
2f08fb4bac use PVE::DataCenterConfig
to make sure that the corresponding cfs_read_file works() works.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-18 12:03:00 +01:00
4966c8869e Introduce zfs_get_properties helper
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2019-11-14 12:38:25 +01:00
ed2df8e35e followup: different error messages for no and to many IPs
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-08 12:19:04 +01:00
a2aae38c4b use correct local IP address helper
this always uses an explicit CIDR, so we don't need a round-trip via
datacenter.cfg ..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-08 11:24:52 +01:00
83a9960c71 convert vmid to int to conform with return type declaration
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-11-05 18:37:15 +01:00
9148f5b355 whitespace cleanup
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-11-05 18:37:15 +01:00
6ed43d81dc cleanup: omit module prefix for call to methods in same module
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-31 07:36:27 +01:00
3824ba88a9 Whitespace cleanup
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2019-10-08 11:22:12 +02:00
9258d94531 LIO: re-use variables
Signed-off-by: Daniel Berteaud <daniel@firewall-services.com>
2019-09-26 18:16:42 +02:00
eb89269f2e LIO: Prefix backstores with the pool name
So it won't clash with another backstore in another pool

Signed-off-by: Daniel Berteaud <daniel@firewall-services.com>
2019-09-26 18:16:42 +02:00
609f8ec6cf LIO: Make the target cache works per target and portal
When working with several ZFS over iSCSI / LIO storages, we might lookup
between them with less than 15 sec interval.
Previously, the cache of the previous storage was used, which was breaking
disk move for example

Signed-off-by: Daniel Berteaud <daniel@firewall-services.com>
2019-09-26 18:16:42 +02:00
61137a54d6 lio: list_lun: return early if volname cannot be parsed
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-26 15:31:07 +02:00
2dbca26d99 lio: list_lun: re-use $object variable
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-26 15:30:27 +02:00
46e27c1ebc bump version to 6.0-9
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-23 18:20:49 +02:00
c243be83b4 Parse volname where needed
The common ZFSPlugin was missing volume name parsing
in a few places. This was not a problem for standard
volumes, but broke functionnalities (like resize,
snapshot, rollback) with linked clones as the name of
the zvol must be extracted from the entry in the config
(remove base-X-disk-Y prefix)

Signed-off-by: Daniel Berteaud <daniel@firewall-services.com>
2019-09-23 16:09:10 +02:00
b7c8738f17 Enable unmap support
In the default config, emulate_tpu is set to 0, which disables
unmap support. Once enabled, trim can run from guest to reclaim free
space.

Signed-off-by: Daniel Berteaud <daniel@firewall-services.com>
2019-09-23 16:09:10 +02:00
525ed353dc Don't remove and recreate lun when changing a volume
It's not needed, LIO sees the new size automatically.
And it was broken anyway. Partially fix #2335

Signed-off-by: Daniel Berteaud <daniel@firewall-services.com>
2019-09-23 16:09:10 +02:00
80699b1da5 followup: add JSON use and cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-20 13:32:18 +02:00
af0335e82f change file_size_info sub to use qemu-img info json decoding
Using the json output, as suggested by Thomas, we now die if the decoding
fails and, if not, all return values are set to the corresponding decoded
values. That should prevent any unforeseen null size values, except if
qemu-img info reports it, which we then consider as valid.

Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-09-20 13:01:00 +02:00
cfdffd8a20 Actually use target_volid
Migration with --targetstorage was broken because of this.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-17 09:28:52 +02:00
ce8b24a937 fix vmid filter for backup listing
$1 and $2 get set to undef from the vmid filter regex, so we have to do
the name/format regex after, else we get errors like:

'use of unitiialized value $1[...]'

and the listing is empty

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-09-09 16:38:37 +02:00
1dbbd5abd6 file_size_info: move parser to own variable
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-09 15:36:14 +02:00
aa4594b1d1 warn if filesize info couldn't be read due to error
This sh
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-09-09 15:27:26 +02:00
3918b96afa whitespace cleanup
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-09-09 15:27:26 +02:00
c844dca4a8 bump version to 6.0-8
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-03 10:24:46 +02:00