mirror of https://github.com/ceph/ceph-ansible.git
filestore-to-bluestore: skip bluestore osd nodes
If the OSD node is already using bluestore OSDs then we should skip
all the remaining tasks to avoid purging OSD for nothing.
Instead we warn the user.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1790472
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 83c5a1d7a8
)
pull/5038/head
parent
460d3557d7
commit
487be2675a
|
@ -21,6 +21,18 @@
|
|||
- import_role:
|
||||
name: ceph-defaults
|
||||
|
||||
- name: set_fact current_objectstore
|
||||
set_fact:
|
||||
current_objectstore: '{{ osd_objectstore }}'
|
||||
|
||||
- name: warn user about osd already using bluestore
|
||||
debug:
|
||||
msg: 'WARNING: {{ inventory_hostname }} is already using bluestore. Skipping all tasks.'
|
||||
when: current_objectstore == 'bluestore'
|
||||
|
||||
- name: shrink and redeploy filestore osds
|
||||
when: current_objectstore == 'filestore'
|
||||
block:
|
||||
- import_role:
|
||||
name: ceph-facts
|
||||
|
||||
|
@ -246,6 +258,10 @@
|
|||
filter: ansible_devices
|
||||
when: osd_auto_discovery | bool
|
||||
|
||||
- name: force osd_objectstore to bluestore
|
||||
set_fact:
|
||||
osd_objectstore: bluestore
|
||||
|
||||
- import_role:
|
||||
name: ceph-defaults
|
||||
- import_role:
|
||||
|
@ -257,9 +273,5 @@
|
|||
when: containerized_deployment | bool
|
||||
- import_role:
|
||||
name: ceph-config
|
||||
vars:
|
||||
osd_objectstore: bluestore
|
||||
- import_role:
|
||||
name: ceph-osd
|
||||
vars:
|
||||
osd_objectstore: bluestore
|
||||
|
|
Loading…
Reference in New Issue