]> git.proxmox.com Git - pve-storage.git/log
pve-storage.git
6 years agorenamed: PVE/API2/StorageReplication.pm -> PVE/API2/Storage/Replication.pm
Dietmar Maurer [Fri, 5 May 2017 07:18:14 +0000 (09:18 +0200)]
renamed: PVE/API2/StorageReplication.pm -> PVE/API2/Storage/Replication.pm

7 years agobump version to 5.0-4
Wolfgang Bumiller [Fri, 28 Apr 2017 11:55:53 +0000 (13:55 +0200)]
bump version to 5.0-4

7 years agoreplica: get_syncable_disks: skip disks with replica=0
Wolfgang Bumiller [Fri, 28 Apr 2017 09:31:46 +0000 (11:31 +0200)]
replica: get_syncable_disks: skip disks with replica=0

7 years agoreplica: add missing import
Wolfgang Bumiller [Fri, 28 Apr 2017 09:27:59 +0000 (11:27 +0200)]
replica: add missing import

7 years agoreplica: cleanup
Wolfgang Bumiller [Fri, 28 Apr 2017 08:31:17 +0000 (10:31 +0200)]
replica: cleanup

7 years agoInclude pve-replica cronjob.
Wolfgang Link [Mon, 24 Apr 2017 15:15:33 +0000 (17:15 +0200)]
Include pve-replica cronjob.

This is the timer for pvesr run.

7 years agoInclude incremental zfs send in storage_migrate.
Wolfgang Link [Mon, 24 Apr 2017 15:15:32 +0000 (17:15 +0200)]
Include incremental zfs send in storage_migrate.

When replica is enabled and the target host is the reptarget,
the most VM data are on the new target.

7 years agoThis patch will include storage asynchronous replication.
Wolfgang Link [Mon, 24 Apr 2017 15:15:31 +0000 (17:15 +0200)]
This patch will include storage asynchronous replication.

It is possible to synchronise a volume to an other node in a defined interval.
So if a node fail there will be an copy of the volumes from a VM
on an other node.
With this copy it is possible to start the VM on this node.

7 years agoAdd replicate as new storage feature.
Wolfgang Link [Mon, 24 Apr 2017 15:15:30 +0000 (17:15 +0200)]
Add replicate as new storage feature.

This feature shows that the storage can send and receive images.

7 years agoAdd function volume_snapshot_delete_remote.
Wolfgang Link [Mon, 24 Apr 2017 15:15:29 +0000 (17:15 +0200)]
Add function volume_snapshot_delete_remote.

This function we need for replica to handle snapshots on remote nodes.

7 years agoAdd ip parameter in zfs_request to execute on remote host.
Wolfgang Link [Mon, 24 Apr 2017 15:15:28 +0000 (17:15 +0200)]
Add ip parameter in zfs_request to execute on remote host.

We need this function to delete remote snapshots.

7 years agoInclude new storage function volume_snapshot_list.
Wolfgang Link [Mon, 24 Apr 2017 15:15:27 +0000 (17:15 +0200)]
Include new storage function volume_snapshot_list.

Returns a list of snapshots (youngest snap first) form a given volid.
It is possible to use a prefix to filter the list.

7 years agoInclude new storage function volume_send.
Wolfgang Link [Mon, 24 Apr 2017 15:15:26 +0000 (17:15 +0200)]
Include new storage function volume_send.

If the storage backend support import and export
we can send the contend to a remote host.

7 years agobump version to 5.0-3
Fabian Grünbichler [Mon, 10 Apr 2017 14:22:08 +0000 (16:22 +0200)]
bump version to 5.0-3

7 years agofix run_command return code handling
Fabian Grünbichler [Mon, 10 Apr 2017 13:29:29 +0000 (15:29 +0200)]
fix run_command return code handling

7 years agobump version to 5.0-2
Fabian Grünbichler [Tue, 21 Mar 2017 09:12:02 +0000 (10:12 +0100)]
bump version to 5.0-2

7 years agorbd: fix rados df parser for luminous
Fabian Grünbichler [Tue, 21 Mar 2017 09:11:42 +0000 (10:11 +0100)]
rbd: fix rados df parser for luminous

7 years agobump version to 5.0-1
Fabian Grünbichler [Fri, 10 Mar 2017 08:24:11 +0000 (09:24 +0100)]
bump version to 5.0-1

7 years agobuildsys: update make upload target for stretch
Fabian Grünbichler [Fri, 10 Mar 2017 08:23:51 +0000 (09:23 +0100)]
buildsys: update make upload target for stretch

7 years agoremove immutable flag also for subvols on directory storage
Dominik Csapak [Wed, 1 Mar 2017 11:03:40 +0000 (12:03 +0100)]
remove immutable flag also for subvols on directory storage

or else the removal of such templates (with rootfs size 0) fails

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agobump version to 4.0-76
Fabian Grünbichler [Fri, 24 Feb 2017 11:23:23 +0000 (12:23 +0100)]
bump version to 4.0-76

7 years agorbd: fix exit from 'rbd ls -l' parser
Fabian Grünbichler [Thu, 23 Feb 2017 08:22:57 +0000 (09:22 +0100)]
rbd: fix exit from 'rbd ls -l' parser

7 years agobump version to 4.0-75
Wolfgang Bumiller [Mon, 20 Feb 2017 09:05:21 +0000 (10:05 +0100)]
bump version to 4.0-75

7 years agorbd: minor regex fixup
Wolfgang Bumiller [Mon, 20 Feb 2017 09:00:57 +0000 (10:00 +0100)]
rbd: minor regex fixup

7 years agorbd: fix typo
Fabian Grünbichler [Fri, 3 Feb 2017 12:00:16 +0000 (13:00 +0100)]
rbd: fix typo

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
7 years agorbd: use consistent image name schemes
Fabian Grünbichler [Fri, 3 Feb 2017 12:00:15 +0000 (13:00 +0100)]
rbd: use consistent image name schemes

since we allow vm-ID-whatever when allocating images, we
should also include those when listing them.

note: '@' is reserved for snapshots in ceph, so it is safe to
skip lines including an '@' in the image name.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
7 years agorbd: use 'rbd ls' without '-l' to find free names
Fabian Grünbichler [Fri, 3 Feb 2017 12:00:14 +0000 (13:00 +0100)]
rbd: use 'rbd ls' without '-l' to find free names

with more than a few images, 'rbd ls -l' gets rather slow
compared to a simple 'rbd ls'. since we only need to check
existing image names for finding a free one, the latter is
sufficient.

example with ~400 rbd images:
$ time rbd ls -p ceph-vm > /dev/null
real    0m0.027s
user    0m0.012s
sys     0m0.008s

$ time rbd ls -l -p ceph-vm > /dev/null
real    0m5.250s
user    0m1.632s
sys     0m0.584s

a linked clone of two disks on the same setup accordingly
also shows a massive speedup:

$ time qm clone 1000 10000 -snap test
create linked clone of drive scsi0 (ceph-vm:vm-1000-disk-2)
clone vm-1000-disk-2: vm-1000-disk-2 snapname test to
vm-10000-disk-1
create linked clone of drive scsi1 (ceph-vm:vm-1000-disk-1)
clone vm-1000-disk-1: vm-1000-disk-1 snapname test to
vm-10000-disk-2

real    0m11.157s
user    0m3.752s
sys     0m1.308s

$ time qm clone 1000 10000 -snap test
create linked clone of drive scsi1 (ceph-vm:vm-1000-disk-1)
clone vm-1000-disk-1: vm-1000-disk-1 snapname test to
vm-10000-disk-1
create linked clone of drive scsi0 (ceph-vm:vm-1000-disk-2)
clone vm-1000-disk-2: vm-1000-disk-2 snapname test to
vm-10000-disk-2

real    0m0.872s
user    0m0.652s
sys     0m0.096s

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
7 years agobump version to 4.0-47
Dietmar Maurer [Sun, 12 Feb 2017 09:10:50 +0000 (10:10 +0100)]
bump version to 4.0-47

7 years agofix bug #1280: Can't locate object method "root@pam"
Dietmar Maurer [Sun, 12 Feb 2017 08:55:50 +0000 (09:55 +0100)]
fix bug #1280: Can't locate object method "root@pam"

This was introduced by commit 04a13668b9b6e15d3aed36ba00ad538b99a9dc15.

7 years agobuildsys: use gzip -n to disable timestamps
Wolfgang Bumiller [Mon, 6 Feb 2017 10:50:37 +0000 (11:50 +0100)]
buildsys: use gzip -n to disable timestamps

7 years agobuildsys: use fakeroot for dpkg-deb
Wolfgang Bumiller [Mon, 6 Feb 2017 10:50:15 +0000 (11:50 +0100)]
buildsys: use fakeroot for dpkg-deb

7 years agobuildsys: make job safety
Wolfgang Bumiller [Mon, 6 Feb 2017 10:50:01 +0000 (11:50 +0100)]
buildsys: make job safety

7 years agoextract_vzdump_config: handle RE consistently
Fabian Grünbichler [Fri, 20 Jan 2017 09:03:34 +0000 (10:03 +0100)]
extract_vzdump_config: handle RE consistently

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
7 years agoweaken matching for vzdump config extract filename
Fabian Grünbichler [Fri, 20 Jan 2017 09:03:33 +0000 (10:03 +0100)]
weaken matching for vzdump config extract filename

to allow "pvesm extractconfig filename" when in the dump
directory.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
7 years agobump version to 4.0-73
Dietmar Maurer [Thu, 19 Jan 2017 08:14:03 +0000 (09:14 +0100)]
bump version to 4.0-73

7 years agoPVE::Storage: new helper check_volume_access()
Dietmar Maurer [Wed, 18 Jan 2017 16:14:07 +0000 (17:14 +0100)]
PVE::Storage: new helper check_volume_access()

Copied from PVE::RPCEnvironment to avoid cyclic dependency
(pve-storgae => pve-access-control => pve-storage).

7 years agofixes for new PVE::RPCEnvironment implementation
Dietmar Maurer [Wed, 18 Jan 2017 16:12:43 +0000 (17:12 +0100)]
fixes for new PVE::RPCEnvironment implementation

Use PVE::RPCEnvironment->is_worker() instead of
PVE::RPCEnvironment::is_worker().

7 years agofix #1252: rbd: delete snapshots when using krbd
Wolfgang Bumiller [Tue, 17 Jan 2017 09:32:23 +0000 (10:32 +0100)]
fix #1252: rbd: delete snapshots when using krbd

7 years agoFix RBD resize with krbd option enabled.
Dmitry Petuhov [Mon, 16 Jan 2017 07:45:09 +0000 (10:45 +0300)]
Fix RBD resize with krbd option enabled.

With krbd we resize volume and tell QemuSever to notify running QEMU
with zero $size by returning undef.

Signed-off-by: Dmitry Petuhov <mityapetuhov@gmail.com>
7 years agobump version to 4.0-72
Dietmar Maurer [Thu, 12 Jan 2017 13:06:00 +0000 (14:06 +0100)]
bump version to 4.0-72

7 years agoadd setup_environment hook to CLIHandler class
Dietmar Maurer [Thu, 12 Jan 2017 12:27:43 +0000 (13:27 +0100)]
add setup_environment hook to CLIHandler class

and use run_cli_handler instead of depreciated run_cli.

7 years agosheepdog : volume_resize return if running
Alexandre Derumier [Sun, 8 Jan 2017 13:04:41 +0000 (14:04 +0100)]
sheepdog : volume_resize return if running

fix : https://forum.proxmox.com/threads/sheepdog-disk-resize-not-working.31760/

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
7 years agofix #1099 (again): map cciss/c0d0 to cciss!c0d0
Dominik Csapak [Thu, 5 Jan 2017 10:11:52 +0000 (11:11 +0100)]
fix #1099 (again): map cciss/c0d0 to cciss!c0d0

there was still a point where we got the wrong string
on createosd we get the devpath (/dev/cciss/c0d0)

but need the info from get_disks, which looks in /sys/block
where it needs to be cciss!c0d0

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agofix #1135: always clean up ZFS snapshots on migration
Fabian Grünbichler [Mon, 2 Jan 2017 13:27:04 +0000 (14:27 +0100)]
fix #1135: always clean up ZFS snapshots on migration

otherwise there are situations where snapshots are left
behind for already sent volumes. also include more warnings.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
7 years agostorage_migrate: use bs=4k to copy images with dd
Dietmar Maurer [Sat, 24 Dec 2016 09:55:31 +0000 (10:55 +0100)]
storage_migrate: use bs=4k to copy images with dd

The default block size is 512 bytes, and is quite slow. We do not
want to use blocks bigger than 4k, because we want to detect empty
blocks (sparse).

7 years agobump version to 4.0-71
Dietmar Maurer [Thu, 22 Dec 2016 11:16:32 +0000 (12:16 +0100)]
bump version to 4.0-71

7 years agoAdd function get_blockdev.
Wolfgang Link [Mon, 19 Dec 2016 14:15:37 +0000 (15:15 +0100)]
Add function get_blockdev.

This function will return you the block device of a given partition path.

7 years agoAdd new function part_num
Wolfgang Link [Mon, 19 Dec 2016 14:15:36 +0000 (15:15 +0100)]
Add new function part_num

With this function you get the partnum of a dev.

7 years agobump version to 4.0-70
Dietmar Maurer [Wed, 30 Nov 2016 16:23:10 +0000 (17:23 +0100)]
bump version to 4.0-70

7 years agochange regression test for crucial
Dominik Csapak [Wed, 30 Nov 2016 15:36:02 +0000 (16:36 +0100)]
change regression test for crucial

as we now can parse the wearout

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agoadd crucial smart attribute for wear leveling
Dominik Csapak [Wed, 30 Nov 2016 15:36:01 +0000 (16:36 +0100)]
add crucial smart attribute for wear leveling

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agocorrect regression test for sandisk ssds
Dominik Csapak [Wed, 30 Nov 2016 15:36:00 +0000 (16:36 +0100)]
correct regression test for sandisk ssds

in my initial patch series for the regression test, i failed to notice
the missing attributes for the sandisk ssds (which had not been parsed)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agocatch '---' in threshold output of sandisk ssds
Dominik Csapak [Wed, 30 Nov 2016 15:35:59 +0000 (16:35 +0100)]
catch '---' in threshold output of sandisk ssds

sandisk ssds have a default threshold of '---' on nearly all fields,
which prevents our parsing

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agobump versuion to 4.0-69
Dietmar Maurer [Tue, 29 Nov 2016 08:31:37 +0000 (09:31 +0100)]
bump versuion to 4.0-69

7 years agouse qemu gluster blockdriver for linked clone creation
Dominik Csapak [Mon, 28 Nov 2016 12:34:19 +0000 (13:34 +0100)]
use qemu gluster blockdriver for linked clone creation

this works around a bug, where qemu does not align the qcow2 file
when using the filesystem directly, and the gluster blockdriver
refuses to read from it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agoincrease default timeout for zpool import
Fabian Grünbichler [Fri, 25 Nov 2016 09:29:23 +0000 (10:29 +0100)]
increase default timeout for zpool import

as zpool import can easily take longer than 5 seconds on
systems with lots of disks

7 years agoimprove zpool activate_storage
Fabian Grünbichler [Fri, 25 Nov 2016 09:29:22 +0000 (10:29 +0100)]
improve zpool activate_storage

the old code was way too broad here, this fixes at least the
following issues:
- importing of other/unconfigured zpools by "import -a"
- possible false positives if a pool name is a substring of
  another pool name because of "list" without pool name,
  potentially skipping activation for such pools
- not noticing failure to activate in activate_storage
  because the success of "zpool import -a" does not tell us
  anything about the pool we actually wanted to import

checking specifically for the pool to be activated when
calling "zpool list" gets rid of the second issue, and
trying to import only that pool fixes the other two.

7 years agoallow --allow-shrink on RBD resize
Stefan Priebe [Wed, 16 Nov 2016 19:13:59 +0000 (20:13 +0100)]
allow --allow-shrink on RBD resize

Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
7 years agobump version to 4.0-68
Dietmar Maurer [Fri, 28 Oct 2016 08:53:12 +0000 (10:53 +0200)]
bump version to 4.0-68

7 years agoadd disk usages regression test
Dominik Csapak [Mon, 17 Oct 2016 08:31:27 +0000 (10:31 +0200)]
add disk usages regression test

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agoadd cciss regression test
Dominik Csapak [Mon, 17 Oct 2016 08:31:26 +0000 (10:31 +0200)]
add cciss regression test

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agoadd sas regression tests
Dominik Csapak [Mon, 17 Oct 2016 08:31:25 +0000 (10:31 +0200)]
add sas regression tests

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agoadd nvme regression test
Dominik Csapak [Mon, 17 Oct 2016 08:31:24 +0000 (10:31 +0200)]
add nvme regression test

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agoadd ssd and smart regression tests
Dominik Csapak [Mon, 17 Oct 2016 08:31:23 +0000 (10:31 +0200)]
add ssd and smart regression tests

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agoadd hdd and smart regression tests
Dominik Csapak [Mon, 17 Oct 2016 08:31:22 +0000 (10:31 +0200)]
add hdd and smart regression tests

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agoadd disklist test
Dominik Csapak [Mon, 17 Oct 2016 08:31:21 +0000 (10:31 +0200)]
add disklist test

and add to makefile

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agoadd default rotational value
Dominik Csapak [Mon, 17 Oct 2016 08:29:12 +0000 (10:29 +0200)]
add default rotational value

because if the file does not exist,
we have an perl error for comparing an uninitialized
value

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agouse model from udevadm
Dominik Csapak [Mon, 17 Oct 2016 08:29:11 +0000 (10:29 +0200)]
use model from udevadm

we want this, because the model in /sys/block/<device>/device/model
is limited to 16 characters

and since the model is not always in the udevadm output (nvme),
also read the model from the model file as fallback

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agomake dir_is_empty a proper sub
Dominik Csapak [Mon, 17 Oct 2016 08:29:10 +0000 (10:29 +0200)]
make dir_is_empty a proper sub

this allows us later to mock the sub,
which we need for testing

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agomove directory test into get_sysdir_info
Dominik Csapak [Mon, 17 Oct 2016 08:29:09 +0000 (10:29 +0200)]
move directory test into get_sysdir_info

because it logically belongs there, also
this makes the testing easier

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agouse /sys/block/ path for udev instead of name
Dominik Csapak [Mon, 17 Oct 2016 08:29:08 +0000 (10:29 +0200)]
use /sys/block/ path for udev instead of name

since we iterate over the entries in /sys/block
it makes sense to use this path

this should fix #1099
because udevadm does not take
 -n cciss!c0d0 (because it only looks in dev for this)
but takes
 -p /sys/block/cciss!c0d0

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agobump version to 4.0-67
Fabian Grünbichler [Fri, 21 Oct 2016 06:54:28 +0000 (08:54 +0200)]
bump version to 4.0-67

7 years agofix #1165: only check mount status when is_mountpoint is set
Fabian Grünbichler [Wed, 12 Oct 2016 07:33:12 +0000 (09:33 +0200)]
fix #1165: only check mount status when is_mountpoint is set

otherwise the status() method returns garbage for non-mount
point directory storages.

7 years agobump version to 4.0-66
Dietmar Maurer [Fri, 7 Oct 2016 07:31:46 +0000 (09:31 +0200)]
bump version to 4.0-66

7 years agodisks: fix warnings
Wolfgang Bumiller [Fri, 7 Oct 2016 06:53:26 +0000 (08:53 +0200)]
disks: fix warnings

7 years agobump version to 4.0-65
Dietmar Maurer [Fri, 7 Oct 2016 06:18:45 +0000 (08:18 +0200)]
bump version to 4.0-65

7 years agoallow rbd images < 1M to be detected
Dominik Csapak [Thu, 6 Oct 2016 09:42:28 +0000 (11:42 +0200)]
allow rbd images < 1M to be detected

without this, having an efidisk on a ceph storage
prevents creating another disk on the same
ceph storage, because it will not be detected
and we try to allocate one with the same name

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agobump version to 4.0-64
Dietmar Maurer [Thu, 6 Oct 2016 05:53:32 +0000 (07:53 +0200)]
bump version to 4.0-64

7 years agocorrectly parse cciss devices in get_disks
Dominik Csapak [Wed, 5 Oct 2016 09:54:07 +0000 (11:54 +0200)]
correctly parse cciss devices in get_disks

cciss maps the devices to
/sys/block/cciss!cXdY

and not to

/sys/block/cXdY

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agofix #1135: refactor wear level parsing
Dominik Csapak [Wed, 5 Oct 2016 08:57:10 +0000 (10:57 +0200)]
fix #1135: refactor wear level parsing

refactored the wear level parsing into its
own function, where we can now define a
vendor <-> attribute id
mapping

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agomerge get_smart_data/health
Dominik Csapak [Wed, 5 Oct 2016 08:57:09 +0000 (10:57 +0200)]
merge get_smart_data/health

instead of parsing the output of smart in two places,
give get_smart_data a flag if we only want health

this fixes a bug (not on the bugtracker), where
an ssd with disabled smart had an empty string as health
in the gui

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agobump version to 4.0-63
Dietmar Maurer [Wed, 5 Oct 2016 05:16:45 +0000 (07:16 +0200)]
bump version to 4.0-63

7 years agofix #1123: modify NVME device path for SMART support
Fabian Grünbichler [Mon, 3 Oct 2016 11:53:37 +0000 (13:53 +0200)]
fix #1123: modify NVME device path for SMART support

seems like we need to drop the namespace part before calling
smartctl.

note that NVME devices require smartmontools >= 6.5

7 years agoadd return schema to smart API path
Fabian Grünbichler [Mon, 3 Oct 2016 11:53:36 +0000 (13:53 +0200)]
add return schema to smart API path

7 years agofix #1120: non-ATA disks with unstructured smart data
Fabian Grünbichler [Mon, 3 Oct 2016 11:53:35 +0000 (13:53 +0200)]
fix #1120: non-ATA disks with unstructured smart data

simple parser as fallback for non-ATA disks, just collect
all lines in the "SMART DATA" section.

7 years agofix #1120: SCSI SMART health parsing
Fabian Grünbichler [Mon, 3 Oct 2016 11:53:34 +0000 (13:53 +0200)]
fix #1120: SCSI SMART health parsing

SCSI disks report their health as "SMART Health Status: OK"

7 years agodisks: allow get_disks without smart checks
Fabian Grünbichler [Mon, 3 Oct 2016 11:53:33 +0000 (13:53 +0200)]
disks: allow get_disks without smart checks

the smart checks are only needed for the API call(s) that
list all disks and their status, but get_disks is also used
in disk usage checks and in the Ceph code, where the smart
status is completely irrelevant.

drop the implicit skipping of smart checks if $disk is set,
since we have an explicit parameter for this now.

7 years agobump version to 4.0-63
Dietmar Maurer [Thu, 29 Sep 2016 06:45:34 +0000 (08:45 +0200)]
bump version to 4.0-63

7 years agofix #1122: correctly create LUNs for linked clones
Fabian Grünbichler [Wed, 28 Sep 2016 11:53:42 +0000 (13:53 +0200)]
fix #1122: correctly create LUNs for linked clones

7 years agodisks: fix typo
Fabian Grünbichler [Wed, 28 Sep 2016 11:42:25 +0000 (13:42 +0200)]
disks: fix typo

7 years agodisks: parse smart attributes using RE
Fabian Grünbichler [Wed, 28 Sep 2016 11:42:24 +0000 (13:42 +0200)]
disks: parse smart attributes using RE

7 years agodisks: use smartctl -H -A
Fabian Grünbichler [Wed, 28 Sep 2016 11:42:23 +0000 (13:42 +0200)]
disks: use smartctl -H -A

to only list SMART health and attributes, instead of
"smartctl -a", which prints "all SMART information"

7 years agomove SMART error handling into get_disks
Fabian Grünbichler [Wed, 28 Sep 2016 11:42:22 +0000 (13:42 +0200)]
move SMART error handling into get_disks

because we never ever want to die in get_disks because of a
single disk, but the nodes/xyz/disks/smart API path is
allowed to fail if a disk device is unsupported by smartctl
or something else goes wrong.

7 years agoFix #1012: dir storage: add is_mountpoint option
Wolfgang Bumiller [Wed, 31 Aug 2016 08:29:09 +0000 (10:29 +0200)]
Fix #1012: dir storage: add is_mountpoint option

While the mkdir option deals with the case where we don't
want to clobber a mount point with directories (like ZFS,
gluster or NFS), putting a directory storage directly onto a
mount point is still risky:
If the path exists - which it usually does even if not
mounted - the storage will be considered successfully
activated, but empty (or with unexpected content). Some
operations will then lead to unexpected problems: the
free_disk operation for instance only warns if the disk does
not exist, but does not throw an error. In this case the
configuration might be updated without the real disk being
deleted. Once it's mounted back in, later operations which
check existing disks which are not part of the current VM
configuration (like migration) might error unexpectedly.

This adds an 'is_mountpoint' option to directory storages
which assumes the directory is an externally managed mount
point (eg. fstab or zfs) and changes activate_storage() to
throw an error if the path is not mounted.

7 years agopath based storages: improve the mkdir option
Wolfgang Bumiller [Wed, 31 Aug 2016 08:29:08 +0000 (10:29 +0200)]
path based storages: improve the mkdir option

So far this only prevented the creation of the toplevel
directory. This does not cover all problem cases,
particularly when said directory is supposed to be a mount
point, including NFS and glusterfs beside ZFS.

The directory based storages we have already use mkpath
whenever they need to create files, and for actions on files
which are supposed to exist it's fine if it errors out.
So it should also be safe to skip the creation of standard
subdirectories in activate_storage().

Additionally NFS and glusterfs storages should also accept
the mkdir option as they otherwise may exhibit similar
issues, eg. when an NFS storage is mounted onto a directory
inside a ZFS subvolume.

7 years agowhite space cleanups
Dietmar Maurer [Mon, 26 Sep 2016 11:40:02 +0000 (13:40 +0200)]
white space cleanups

7 years agoAvoid JavaScript gets a string 0.
Wolfgang Link [Mon, 26 Sep 2016 10:12:47 +0000 (12:12 +0200)]
Avoid JavaScript gets a string 0.

If the JavaScript gets a "0" it convents it to a boolean false.
So to ensure the GUI always get valid int we cast the values.

7 years agobump version to 4.0-61
Dietmar Maurer [Fri, 16 Sep 2016 05:59:14 +0000 (07:59 +0200)]
bump version to 4.0-61

7 years agoadd comments about LVM thin clones
Fabian Grünbichler [Thu, 15 Sep 2016 11:17:47 +0000 (13:17 +0200)]
add comments about LVM thin clones

7 years agofix typo
Fabian Grünbichler [Thu, 15 Sep 2016 11:17:48 +0000 (13:17 +0200)]
fix typo