From 400272b06ce5c2ce08bf27545fb564f528a99127 Mon Sep 17 00:00:00 2001 From: Warren Usui Date: Thu, 21 Dec 2017 03:03:03 +0000 Subject: [PATCH] Fix installer.0 bug. Insure that mon node is used for rbd_pools. Signed-off-by: Warren Usui --- teuthology/task/ceph_ansible.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/teuthology/task/ceph_ansible.py b/teuthology/task/ceph_ansible.py index 1a63fe02c7..e79d9ea291 100644 --- a/teuthology/task/ceph_ansible.py +++ b/teuthology/task/ceph_ansible.py @@ -119,12 +119,14 @@ class CephAnsible(Task): # If there is an installer.0 node, use that for the installer. # Otherwise, use the first mon node as installer node. ansible_loc = self.ctx.cluster.only('installer.0') + (ceph_first_mon,) = self.ctx.cluster.only( + misc.get_first_mon(self.ctx, + self.config)).remotes.iterkeys() if ansible_loc.remotes: (ceph_installer,) = ansible_loc.remotes.iterkeys() else: - (ceph_installer,) = self.ctx.cluster.only( - misc.get_first_mon(self.ctx, - self.config)).remotes.iterkeys() + ceph_installer = ceph_first_mon + self.ceph_first_mon = ceph_first_mon self.ceph_installer = ceph_installer self.args = args if self.config.get('rhbuild'): @@ -480,7 +482,7 @@ class CephAnsible(Task): ceph_installer.run(args=('cat', 'ceph-ansible/group_vars/all')) def _create_rbd_pool(self): - mon_node = self.ceph_installer + mon_node = self.ceph_first_mon log.info('Creating RBD pool') mon_node.run( args=[ -- 2.39.5