Hide Forgot
Created attachment 1218543 [details] ansible playbook log Description of problem: On a cluster having 1 mon, the rolling_update.yml fails: TASK: [waiting for the monitor to join the quorum...] ************************* fatal: [magna003 -> {{ mon_host }}] => Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/ansible/runner/__init__.py", line 586, in _executor exec_rc = self._executor_internal(host, new_stdin) File "/usr/lib/python2.7/site-packages/ansible/runner/__init__.py", line 789, in _executor_internal return self._executor_internal_inner(host, self.module_name, self.module_args, inject, port, complex_args=complex_args) File "/usr/lib/python2.7/site-packages/ansible/runner/__init__.py", line 927, in _executor_internal_inner delegate = self._compute_delegate(actual_pass, inject) File "/usr/lib/python2.7/site-packages/ansible/runner/__init__.py", line 363, in _compute_delegate fail_on_undefined=True File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 124, in template varname = template_from_string(basedir, varname, templatevars, fail_on_undefined) File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 382, in template_from_string res = jinja2.utils.concat(rf) File "<template>", line 8, in root File "/usr/lib/python2.7/site-packages/jinja2/runtime.py", line 485, in _fail_with_undefined_error raise self._undefined_exception(hint) UndefinedError: 'mon_host' is undefined Version-Release number of selected component (if applicable): ceph-ansible-1.0.5-39.el7scon.noarch How reproducible: Always Additional info: - name: select a running monitor set_fact: mon_host={{ item }} with_items: groups.mons when: item != inventory_hostname - name: waiting for the monitor to join the quorum... shell: | ceph -s --cluster {{ cluster }} | grep monmap | sed 's/.*quorum//' | egrep -sq {{ ansible_hostname }} register: result until: result.rc == 0 retries: "{{ health_mon_check_retries }}" delay: "{{ health_mon_check_delay }}" delegate_to: "{{ mon_host }}" When the playbook selects a monitor, it picks a monitor other than the one being updated. So when there is just one MON, it failes saying there is no mon defined. Attaching the playbook log here.
A single monitor is not supported a configuration thus ut should never be tested.