mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 13:55:41 +00:00
Add a failsafe for etcd not returning a connection string
This commit is contained in:
parent
9139666704
commit
b3a1115796
@ -305,6 +305,11 @@ def start_master(etcd):
|
|||||||
hookenv.status_set('maintenance',
|
hookenv.status_set('maintenance',
|
||||||
'Configuring the Kubernetes master services.')
|
'Configuring the Kubernetes master services.')
|
||||||
freeze_service_cidr()
|
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)
|
handle_etcd_relation(etcd)
|
||||||
configure_master_services()
|
configure_master_services()
|
||||||
hookenv.status_set('maintenance',
|
hookenv.status_set('maintenance',
|
||||||
|
Loading…
Reference in New Issue
Block a user