]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
ceph-osd: get full link path when testing if a partition 981/head
authorSébastien Han <seb@redhat.com>
Mon, 19 Sep 2016 14:17:11 +0000 (16:17 +0200)
committerSébastien Han <seb@redhat.com>
Tue, 20 Sep 2016 08:15:06 +0000 (10:15 +0200)
commit381af6c18de541be15ec23919d04b66641e55c11
treed57ebe09baa467f6c91449debfeedaa3c33f64e2
parent112a2b2970a4e6ed4ed8d32bd45ee13757c3cda7
ceph-osd: get full link path when testing if a partition

This allows us to test devices set with persistent naming such as
/dev/disk/by-*
When registering devices we can use persisent (/dev/disk/by-*) or
non-persistent (/dev/sd*). Both declarations are supported by
ceph-ansible. There was just two tasks that were not compatible with
this. Since we support using partitions directly we need to test that
because the device activation will be different. To test if the device
is a partition we use a regular expression which wasn't compatible with
the persistent device naming format (/dev/disk/by-*).

This commit solves this issue by reading the path of the symlink since
devices like /dev/disk/by-* are symlinks to devices like /dev/sd*

Signed-off-by: Sébastien Han <seb@redhat.com>
roles/ceph-osd/tasks/check_devices_auto.yml
roles/ceph-osd/tasks/check_devices_static.yml