Commit Graph

2106 Commits

Author SHA1 Message Date
Thomas Lamprecht
9280153e10 rename check_available to assert_sid_unused
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-10-03 14:49:14 +02:00
Dominik Csapak
4dcb16c0dc fix #1929: only check storage if user want to create one
this is useful if a user wants to create similar storage on each host

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-10-03 14:30:22 +02:00
Dominik Csapak
820bab50b9 add missing storage check in LVM Disk API
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-10-03 14:30:22 +02:00
Dominik Csapak
76c1e57be7 refactor disk/storage checks for Disk API
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-10-03 14:30:22 +02:00
Dietmar Maurer
94836d7b8c pvesm iscsiscan: fix cli parameters
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2018-10-01 10:56:18 +02:00
Thomas Lamprecht
c9fc2bc994 bump version to 5.0-29
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-19 11:21:37 +02:00
Thomas Lamprecht
dd9e97ed14 find_free_diskname: fixup regex match operator
Co-developed-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-19 11:21:37 +02:00
Dietmar Maurer
0057171085 Fix #1925: untaint rbd JSON output
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Tested-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2018-09-19 11:21:37 +02:00
Thomas Lamprecht
729c2594f9 bump version to 5.0-28
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-14 11:42:23 +02:00
Dominik Csapak
401b56fc54 fix #1912: find the partition instead of guessing it
instead of using '$dev1' as partition,
get the information from /sys/block/$dev

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-09-14 11:24:42 +02:00
Thomas Lamprecht
dd1fa860d0 get_vm_disk_number: follow up cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-14 09:19:08 +02:00
Stoiko Ivanov
f4cc2c4afe Fix #1913: get_vm_disk_number: clone plugindata to avoid side effects
Accessing a non-existing 'format' key in plugindata (e.g., in LvmThinPlugin),
created it by autovivication, thus breaking the fallback to the default value
'raw' upon any following access.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-09-14 09:17:40 +02:00
Thomas Lamprecht
9dcf88bb27 bump version to 5.0-27
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-12 15:00:45 +02:00
Alwin Antreich
e5b2206f8a rbd: krbd_feature_disable was not disabling features
$features is actually an array reference, so use it as one.
This broke creation and migration of disks on rbd storages

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-12 14:56:36 +02:00
Thomas Lamprecht
83a40b8d3b refactor is_valid_vm_diskname to private simpler sub
This was newly introduced and is only used once, so having a
wantarray return mechanism, without ever using it or knowing for sure
if this may help with reuse of the method is not ideal.

Make the sub a module private one just returning the vm disk number
or explicit undef. Pass it the $suffix variable, to avoid recomputing
it every time called by out caller's loop.

If there's re-use potential in the future we can actually decide what
makes sense to return.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-11 07:52:43 +02:00
Stoiko Ivanov
c4a29df483 refactor finding next diskname for all plugins
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-09-10 12:21:10 +02:00
Thomas Lamprecht
59fa9fd6a3 next diskname: start ids with 0 to honor MAX_VOLUMES_PER_GUEST
else we can only have MAX_VOLUMES_PER_GUEST-1 disk per VMID,
not tragic but possible confusing

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-10 11:21:12 +02:00
Stoiko Ivanov
c0535aa72f make max number of disks a constant
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-09-07 15:28:15 +02:00
Stoiko Ivanov
345f898108 add vm_diskname helpers (get_next, is_valid)
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-09-07 15:28:15 +02:00
Thomas Lamprecht
017c380f9e bump version to 5.0-26
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-07 14:12:31 +02:00
Alwin Antreich
aa14def420 Addition to fix #1895, skip image if no owner
Non conforming image names are not ignored anymore by the new rbd_ls
implementation, this patch adds the old behaviour.

This fix is a temporary workaround and should be removed, once the new
image name parser is ready.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2018-09-07 13:51:18 +02:00
Thomas Lamprecht
1be93fe2fd rdb: followup cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-06 15:19:16 +02:00
Dominik Csapak
c093e93b28 rbd: remove unused size conversion function
since the json output gives the sizes in bytes, we do not
need to convert anymore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-09-06 15:18:23 +02:00
Dominik Csapak
89a8800bc3 fix #1895: use json for 'rbd ls -l' and 'rbd info'
since ceph changed the plain output format for 12.2.8
we have to change the code anyway, and when were at it,
we can change it to the (hopefully) more robust json output

Co-authored-by: Alwin Antreich <a.antreich@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-09-06 15:11:26 +02:00
Thomas Lamprecht
361481cfd0 test: zfspoolplugin: fix perl lib path for test
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-08-28 16:40:31 +02:00
Thomas Lamprecht
ba842a3f72 bump version to 5.0-25
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-08-20 15:15:55 +02:00
Dietmar Maurer
1e17594e74 add missing parameter descriptions 2018-08-09 09:52:44 +02:00
Dietmar Maurer
48dccd2fbe cleanup return property descriptions 2018-08-09 09:29:10 +02:00
Dietmar Maurer
2654942813 PVE::API2::Storage::Content::index - document return values 2018-08-09 08:53:24 +02:00
Dominik Csapak
4d12dbffc4 add return description for zfs detail api call
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-08-08 12:01:54 +02:00
Dominik Csapak
e39e8ee213 refactor diskmanagement lock_file calls
so that we only have one place where we reference the lockfile
and the timeout

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-08-08 12:01:02 +02:00
Dominik Csapak
7058abe29e add 'single' raidlevel for zfs
the syntax for creating a pool with a single disk is
not the same as for mirror, so let the user select it
explicitely

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-08-08 12:00:18 +02:00
Dominik Csapak
38572a8f56 rename raidlvl to raidlevel
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-08-08 11:56:35 +02:00
Dominik Csapak
fdc863c705 fix descriptions of api calls
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-08-08 11:56:17 +02:00
Dietmar Maurer
7d597888a4 cleanup descriptions 2018-08-08 08:22:27 +02:00
Dietmar Maurer
5be1a092d6 fix schema - 'string-list' is a format, not a type 2018-08-08 08:21:06 +02:00
Dominik Csapak
c84106edc9 add API for ZFS management
a list, a detail and a create api call

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-08-08 08:02:14 +02:00
Dominik Csapak
5e35281da2 rename lvmcreate to lvmthincreate for lvm thin
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-08-08 07:44:14 +02:00
Dietmar Maurer
d347322a63 PVE::API2::Storage::Status::index - document return schema properties
And add property "used_fraction" - I want to use that for the CLI tool.
2018-08-07 13:24:27 +02:00
Stoiko Ivanov
ca552c7639 Fix #1858: lvm_find_free_diskname check for base
lvm_find_free_diskname only checked for existing volumes starting with 'vm-',
and not with 'base-'.

Unify implementation with other Plugins.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-08-07 12:14:11 +02:00
Thomas Lamprecht
f15ac9b5a8 LIO: followup: various small cleanups
move two loop bodies from

if (condition) {
    ...
}

too
next if !condition;

...

to save an indentation level

rename variables to a bit shorter version, i.e.:
s/oneTarget/target/
s/oneTpg/tpg/

and a comment rewording

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-08-02 14:57:07 +02:00
Thomas Lamprecht
ff69c66022 LIO: followup: shorter stderr/out logging
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-08-02 14:56:20 +02:00
Thomas Lamprecht
ccdf8ddbda LIO: followup: fix indentation 2018-08-02 14:56:20 +02:00
Thomas Lamprecht
d9254744a8 LIO: followup: remove trailing whitespaces
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-08-02 14:56:20 +02:00
Udo Rader
46c6107eb1 Linux LIO/targetcli support
Introducing LIO/targetcli support allowing to use recent linux
distributions as iSCSI targets for ZFS volumes.

In order for this to work, two preconditions have to be met:

1. the portal has to be set up correctly using targetcli
2. the initiator has to be authorized to connect to the target
   based on the initiator's InitiatorName

When adding a LIO iSCSI target, a new "LIO target portal group" field needs
to be correctly populated in the "Add: ZFS over iSCSI" popup, containing the
fitting "LIO target portal group" name (typically something like 'tpg1').

Signed-Off-By: Udo Rader <udo.rader@bestsolution.at>
Tested-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2018-08-02 14:56:20 +02:00
Dietmar Maurer
a6a3786889 add missing dependency to pve-cluster
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2018-08-02 13:46:29 +02:00
Dietmar Maurer
fd87487b3a fix typo 2018-08-02 12:44:30 +02:00
Dominik Csapak
793d720cd2 add API for add Directory storage
creates/lists systemd mount units for /mnt/pve/.*
filetypes allowed are ext4 and xfs for now
mount with /dev/disk/by-uuid

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-08-02 12:28:27 +02:00
Dietmar Maurer
fc1880566c cleanup: do not convert exceptions to strings. 2018-08-02 11:39:35 +02:00
Dominik Csapak
0ea9f3844e add API for LVMThin management
like the LVM API, but return an array for the list,
because we do not have nested data here

and create a vg and thin lv with the name given and use the full size

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-08-02 11:29:47 +02:00