From 2956f10684aba5e41108ec056cf8ff1a254ba5b0 Mon Sep 17 00:00:00 2001 From: Francesco Pantano Date: Mon, 27 Sep 2021 13:19:00 +0200 Subject: [PATCH] Add cephadm_adopt tag to the ceph related upgrade tasks The purpose of this change is automating the cephadm adoption during the FFU process. In particular the cephadm_adopt tag is added and it's supposed to be run as any other regular external_upgrade task using the cephadm_adopt playbook against the whole Ceph cluster. Change-Id: I65249d389316345ee46d4b18929ba09c94a22bfc --- deployment/ceph-ansible/ceph-base.yaml | 33 +++++++-------------- deployment/ceph-ansible/ceph-client.yaml | 3 +- deployment/ceph-ansible/ceph-external.yaml | 3 +- deployment/ceph-ansible/ceph-grafana.yaml | 3 +- deployment/ceph-ansible/ceph-mds.yaml | 3 +- deployment/ceph-ansible/ceph-mgr.yaml | 3 +- deployment/ceph-ansible/ceph-mon.yaml | 3 +- deployment/ceph-ansible/ceph-nfs.yaml | 3 +- deployment/ceph-ansible/ceph-osd.yaml | 3 +- deployment/ceph-ansible/ceph-rbdmirror.yaml | 3 +- deployment/ceph-ansible/ceph-rgw.yaml | 3 +- 11 files changed, 21 insertions(+), 42 deletions(-) diff --git a/deployment/ceph-ansible/ceph-base.yaml b/deployment/ceph-ansible/ceph-base.yaml index 3c1625544b..b741aab7f8 100644 --- a/deployment/ceph-ansible/ceph-base.yaml +++ b/deployment/ceph-ansible/ceph-base.yaml @@ -576,8 +576,7 @@ outputs: when: step|int == 1 tags: - ceph - - ceph_systemd - - ceph_fstobs + - cephadm_adopt block: - name: ensure ceph-ansible is installed include_role: @@ -671,8 +670,7 @@ outputs: when: step|int == 2 tags: - ceph - - ceph_systemd - - ceph_fstobs + - cephadm_adopt block: - name: set ceph-ansible facts set_fact: @@ -743,24 +741,8 @@ outputs: - when: step|int == 0 tags: - never - - ceph_systemd + - cephadm_adopt block: - - name: stop if _limit is unset - fail: - msg: The ceph-ansible systemd units migration playbook limit is not set; please use -e ceph_ansible_limit=##nodename## - when: (ceph_ansible_limit is not defined) or (ceph_ansible_limit|length == 0) - - name: set ceph_ansible_playbooks_default - set_fact: - ceph_ansible_playbooks_default: ["/usr/share/ceph-ansible/infrastructure-playbooks/docker-to-podman.yml"] - - when: step|int == 0 - tags: - - never - - ceph_fstobs - block: - - name: stop if _limit is unset - fail: - msg: The ceph-ansible filestore to bluestore playbook limit is not set; please use -e ceph_ansible_limit=##nodename## - when: (ceph_ansible_limit is not defined) or (ceph_ansible_limit|length == 0) - name: ensure ceph health is OK before proceeding import_role: role: ceph @@ -774,7 +756,14 @@ outputs: - ceph_health - name: set ceph_ansible_playbooks_default set_fact: - ceph_ansible_playbooks_default: ["/usr/share/ceph-ansible/infrastructure-playbooks/filestore-to-bluestore.yml"] + ceph_ansible_playbooks_default: ["/usr/share/ceph-ansible/infrastructure-playbooks/cephadm-adopt.yml"] + - name: Skip the nfs cephadm-adopt section + set_fact: + ceph_ansible_skip_tags: + list_join: + - ',' + - - get_param: CephAnsibleSkipTags + - 'ceph_nfs_adopt' - when: step|int == 0 tags: ceph block: diff --git a/deployment/ceph-ansible/ceph-client.yaml b/deployment/ceph-ansible/ceph-client.yaml index d4b7c66dfe..9bc083d1a0 100644 --- a/deployment/ceph-ansible/ceph-client.yaml +++ b/deployment/ceph-ansible/ceph-client.yaml @@ -53,8 +53,7 @@ outputs: when: step|int == 1 tags: - ceph - - ceph_fstobs - - ceph_systemd + - cephamd_adopt block: - name: set ceph-ansible group vars clients set_fact: diff --git a/deployment/ceph-ansible/ceph-external.yaml b/deployment/ceph-ansible/ceph-external.yaml index 294fbc8e9f..f0b9f1eff5 100644 --- a/deployment/ceph-ansible/ceph-external.yaml +++ b/deployment/ceph-ansible/ceph-external.yaml @@ -58,8 +58,7 @@ outputs: when: step|int == 1 tags: - ceph - - ceph_fstobs - - ceph_systemd + - cephadm_adopt block: - name: set ceph-ansible group vars clients set_fact: diff --git a/deployment/ceph-ansible/ceph-grafana.yaml b/deployment/ceph-ansible/ceph-grafana.yaml index dc08b99c09..24858409f7 100644 --- a/deployment/ceph-ansible/ceph-grafana.yaml +++ b/deployment/ceph-ansible/ceph-grafana.yaml @@ -125,8 +125,7 @@ outputs: when: step == '1' tags: - ceph - - ceph_fstobs - - ceph_systemd + - cephadm_adopt block: - name: set ceph-ansible group vars set_fact: diff --git a/deployment/ceph-ansible/ceph-mds.yaml b/deployment/ceph-ansible/ceph-mds.yaml index d6bf11e634..de3165eba9 100644 --- a/deployment/ceph-ansible/ceph-mds.yaml +++ b/deployment/ceph-ansible/ceph-mds.yaml @@ -67,8 +67,7 @@ outputs: when: step|int == 1 tags: - ceph - - ceph_fstobs - - ceph_systemd + - cephadm_adopt block: - name: set ceph-ansible group vars mdss set_fact: diff --git a/deployment/ceph-ansible/ceph-mgr.yaml b/deployment/ceph-ansible/ceph-mgr.yaml index 63f97613e8..9b22b05deb 100644 --- a/deployment/ceph-ansible/ceph-mgr.yaml +++ b/deployment/ceph-ansible/ceph-mgr.yaml @@ -118,8 +118,7 @@ outputs: when: step|int == 1 tags: - ceph - - ceph_fstobs - - ceph_systemd + - cephadm_adopt block: - name: set ceph-ansible group vars mgrs set_fact: diff --git a/deployment/ceph-ansible/ceph-mon.yaml b/deployment/ceph-ansible/ceph-mon.yaml index 048cdbb205..cbf29e8840 100644 --- a/deployment/ceph-ansible/ceph-mon.yaml +++ b/deployment/ceph-ansible/ceph-mon.yaml @@ -89,8 +89,7 @@ outputs: when: step|int == 1 tags: - ceph - - ceph_fstobs - - ceph_systemd + - cephadm_adopt block: - name: set ceph-ansible group vars mons set_fact: diff --git a/deployment/ceph-ansible/ceph-nfs.yaml b/deployment/ceph-ansible/ceph-nfs.yaml index 10c906fd58..33c7732217 100644 --- a/deployment/ceph-ansible/ceph-nfs.yaml +++ b/deployment/ceph-ansible/ceph-nfs.yaml @@ -112,8 +112,7 @@ outputs: when: step|int == 1 tags: - ceph - - ceph_fstobs - - ceph_systemd + - cephadm_adopt block: - name: set ceph-ansible group vars nfss set_fact: diff --git a/deployment/ceph-ansible/ceph-osd.yaml b/deployment/ceph-ansible/ceph-osd.yaml index 66f2689fe7..018f06e775 100644 --- a/deployment/ceph-ansible/ceph-osd.yaml +++ b/deployment/ceph-ansible/ceph-osd.yaml @@ -123,8 +123,7 @@ outputs: when: step|int == 1 tags: - ceph - - ceph_fstobs - - ceph_systemd + - cephadm_adopt block: - name: set ceph-ansible group vars osds set_fact: diff --git a/deployment/ceph-ansible/ceph-rbdmirror.yaml b/deployment/ceph-ansible/ceph-rbdmirror.yaml index d5e196e784..90d2a0d74c 100644 --- a/deployment/ceph-ansible/ceph-rbdmirror.yaml +++ b/deployment/ceph-ansible/ceph-rbdmirror.yaml @@ -80,8 +80,7 @@ outputs: when: step|int == 1 tags: - ceph - - ceph_fstobs - - ceph_systemd + - cephadm_adopt block: - name: set ceph-ansible group vars rbdmirrors set_fact: diff --git a/deployment/ceph-ansible/ceph-rgw.yaml b/deployment/ceph-ansible/ceph-rgw.yaml index 21a812c987..44392826d4 100644 --- a/deployment/ceph-ansible/ceph-rgw.yaml +++ b/deployment/ceph-ansible/ceph-rgw.yaml @@ -120,8 +120,7 @@ outputs: when: step|int == 1 tags: - ceph - - ceph_fstobs - - ceph_systemd + - cephadm_adopt block: - name: set ceph-ansible group vars rgws set_fact: