Commit Graph

1136 Commits

Author SHA1 Message Date
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
e79ab52c14 Fix #2346: rbd storage shows wrong %-usage
The patch uses the value from the field 'stored' if it is available.

In Ceph 14.2.2 the storage calculation changed to a per pool basis. This
introduced an additional field 'stored' that holds the amount of data
that has been written to the pool. While the field 'used' now has the
data after replication for the pool.

The new calculation will be used only if all OSDs are running with the
on-disk format introduced by Ceph 14.2.2.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2019-09-03 10:19:45 +02:00
b295e05ebe followup: just use case sensitive flag, no manual hack
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-03 09:42:15 +02:00
fd9ca08c70 fixup: use our to make $iso_extension_re value available for other modules
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-03 09:41:50 +02:00
4c69349140 fix #2216: Allow .img files in 'iso' type storages
To maintain full (backwards) compatibility, leave the type name as
'iso' - this makes this patch work without changing every consumer of
storage APIs.

Note that currently these files can only be attached as a CDROM/DVD
drive, so USB-only images can be uploaded but might not work in VMs.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-09-03 07:09:28 +02:00
b9993c4e9d bump version to 6.0-7
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-08-06 14:08:02 +02:00
56362cfb55 ZFS: refactor waiting for zvol symlinks
and actually do that not just for creating zvols, but also when
activating them. this should fix a range of issues/races that sometimes
occured on bootup, snapshot rollback or similar operations.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-08-06 13:39:43 +02:00
be78543909 fix 2317: list images on 'rootdir' only storages
plugins can still override list_volumes if they want separate methods to
list rootdir and images content.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-08-06 13:39:43 +02:00
4dfc2ff21e bump version to 6.0-6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-25 13:35:07 +02:00