Fix up handling of cluster primary stepup
This commit is contained in:
parent
1b008f3ae1
commit
491a6556c3
|
@ -191,8 +191,13 @@ class RouterInstance():
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Try to set ourself primary if there is no primary
|
# Try to set ourself primary if there is no primary in the cluster
|
||||||
if not self.primary_router_list:
|
cluster_has_primary = False
|
||||||
|
for router in t_routers:
|
||||||
|
if t_routers[router].getnetworkstate() == 'primary':
|
||||||
|
cluster_has_primary = True
|
||||||
|
break
|
||||||
|
if not cluster_has_primary:
|
||||||
self.set_primary()
|
self.set_primary()
|
||||||
|
|
||||||
# Display cluster information to the terminal
|
# Display cluster information to the terminal
|
||||||
|
|
Loading…
Reference in New Issue