Check pending roles in get_controllers function

Change-Id: I9bb2beb954872a35f5a6b92cff2d671272970c77
This commit is contained in:
Oleg Gelbukh 2015-08-14 13:27:00 +00:00 committed by Yuriy Taraday
parent 9fd3afdf00
commit 6080acde6c
1 changed files with 2 additions and 1 deletions

View File

@ -30,7 +30,8 @@ def get_controllers(env):
for node in node_obj.Node.get_all():
if node.data['cluster'] != env.data['id']:
continue
if 'controller' in node.data['roles']:
if ('controller' in node.data['roles'] or
'controller' in node.data['pending_roles']):
yield node
found = True
if not found: