From: Sébastien Han Date: Fri, 20 Apr 2018 09:13:51 +0000 (+0200) Subject: shrink-osd: ability to shrink NVMe drives X-Git-Tag: v3.0.32~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f264f98508bd969f7c71819ed00a2c02d381dd9b;p=ceph-ansible.git shrink-osd: ability to shrink NVMe drives Now if the service name contains nvme we know we need to remove the last 2 character instead of 1. If nvme then osd_to_kill_disks is nvme0n1, we need nvme0 If ssd or hdd then osd_to_kill_disks is sda1, we need sda Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1561456 Signed-off-by: Sébastien Han (cherry picked from commit 66c1ea8cd561fce6cfe5cdd1ecaa13411c824e3a) Signed-off-by: Sébastien Han --- diff --git a/infrastructure-playbooks/shrink-osd.yml b/infrastructure-playbooks/shrink-osd.yml index 6e8b29c4f..e9c3ca947 100644 --- a/infrastructure-playbooks/shrink-osd.yml +++ b/infrastructure-playbooks/shrink-osd.yml @@ -116,9 +116,11 @@ when: - containerized_deployment + # if nvme then osd_to_kill_disks is nvme0n1, we need nvme0 + # if ssd or hdd then osd_to_kill_disks is sda1, we need sda - name: stop osd services (container) service: - name: "ceph-osd@{{ item.0.stdout[:-1] | regex_replace('/dev/', '') }}" + name: "ceph-osd@{{ item.0.stdout[:-2] | regex_replace('/dev/', '') if 'nvme' in item.0.stdout else item.0.stdout[:-1] | regex_replace('/dev/', '') }}" state: stopped enabled: no with_together: