From: Sébastien Han Date: Sun, 8 May 2016 22:36:15 +0000 (+0200) Subject: ceph-mds: fix the handler X-Git-Tag: ceph-ansible-1.0.5-33~44 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3f67741768a8084b2c9fa232530248d4737b3509;p=ceph-ansible.git ceph-mds: fix the handler Moving the mds_name fact in the common role so the MDS can properly be restarted. Signed-off-by: Sébastien Han (cherry picked from commit b3971354bf69e30fa63e400e4161f842e5d82379) --- diff --git a/group_vars/all.sample b/group_vars/all.sample index c90342945..e1324c5f7 100644 --- a/group_vars/all.sample +++ b/group_vars/all.sample @@ -303,6 +303,7 @@ dummy: ## MDS options # #mds_use_fqdn: false # if set to true, the MDS name used will be the fqdn in the ceph.conf +#mds_name: "{{ ansible_hostname }}" ## Rados Gateway options # @@ -380,3 +381,4 @@ dummy: # by ceph.conf.j2 template. so it should always be defined #mon_containerized_deployment_with_kv: false + diff --git a/group_vars/common-coreoss.sample b/group_vars/common-coreoss.sample index 32ae29553..071f0af9e 100644 --- a/group_vars/common-coreoss.sample +++ b/group_vars/common-coreoss.sample @@ -14,4 +14,3 @@ dummy: #pypy_binary_directory: /opt/bin #pip_url: https://bootstrap.pypa.io/get-pip.py #local_temp_directory: /tmp - diff --git a/roles/ceph-common/tasks/facts.yml b/roles/ceph-common/tasks/facts.yml index d65fa2f36..b1cd054f5 100644 --- a/roles/ceph-common/tasks/facts.yml +++ b/roles/ceph-common/tasks/facts.yml @@ -61,3 +61,12 @@ - set_fact: is_kraken={{ ceph_version | version_compare('11.0.0', '>=') and ceph_version | version_compare('12.0.0', '<') }} + +- set_fact: + mds_name: "{{ ansible_hostname }}" + when: not mds_use_fqdn + +- set_fact: + mds_name: "{{ ansible_fqdn }}" + when: mds_use_fqdn + diff --git a/roles/ceph-mds/tasks/pre_requisite.yml b/roles/ceph-mds/tasks/pre_requisite.yml index cd16d76fa..4b24ea5e0 100644 --- a/roles/ceph-mds/tasks/pre_requisite.yml +++ b/roles/ceph-mds/tasks/pre_requisite.yml @@ -1,12 +1,4 @@ --- -- set_fact: - mds_name: "{{ ansible_hostname }}" - when: not mds_use_fqdn - -- set_fact: - mds_name: "{{ ansible_fqdn }}" - when: mds_use_fqdn - - name: create bootstrap-mds directory file: path: /var/lib/ceph/bootstrap-mds/