]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
purge-cluster: fix grep match for NVMe and HP Smart Array devices 1435/head
authorDaniel Lupescu <dlupescu@gmail.com>
Tue, 11 Apr 2017 12:59:49 +0000 (15:59 +0300)
committerDaniel Lupescu <dlupescu@gmail.com>
Tue, 11 Apr 2017 13:13:28 +0000 (16:13 +0300)
commitd5e56c481a015bd5a09016cd3ccd5db3c02a0e22
tree70c8ad49169deec7dbc1c397b0e7c4c287ecc044
parent8707537c14cbf1ed29dd946651a5633c1c0d7504
purge-cluster: fix grep match for NVMe and HP Smart Array devices

raw_device would return invalid block device names for NVMe and HPSA
devices which would cause sgdisk partition deletion to fail

$ echo /dev/nvme1n1p3 | egrep -o '/dev/([hsv]d[a-z]{1,2}|cciss/c[0-9]d[0-9]p|nvme[0-9]n[0-9]p){1,2}'
/dev/nvme1n1p

$ echo /dev/cciss/c0d0p2 |  egrep -o '/dev/([hsv]d[a-z]{1,2}|cciss/c[0-9]d[0-9]p|nvme[0-9]n[0-9]p){1,2}'
/dev/cciss/c0d0p
infrastructure-playbooks/purge-cluster.yml