Add a failsafe for etcd not returning a connection string

This commit is contained in:
Konstantinos Tsakalozos 2017-06-26 13:00:00 +03:00
parent 9139666704
commit b3a1115796

View File

@ -305,6 +305,11 @@ def start_master(etcd):
hookenv.status_set('maintenance',
'Configuring the Kubernetes master services.')
freeze_service_cidr()
if not etcd.get_connection_string():
# etcd is not returning a connection string. This hapens when
# the master unit disconnects from etcd and is ready to terminate.
# No point in trying to start master services and fail. Just return.
return
handle_etcd_relation(etcd)
configure_master_services()
hookenv.status_set('maintenance',