mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-18 08:09:58 +00:00
Update status handling and retry network status poking, per review
This commit is contained in:
parent
2b0612247c
commit
38144e5c0f
@ -431,6 +431,12 @@ def set_final_status():
|
|||||||
hookenv.status_set('waiting', 'Waiting to retry addon deployment')
|
hookenv.status_set('waiting', 'Waiting to retry addon deployment')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
req_sent = is_state('kubernetes-master.cloud-request-sent')
|
||||||
|
aws_ready = is_state('endpoint.aws.ready')
|
||||||
|
gcp_ready = is_state('endpoint.gcp.ready')
|
||||||
|
if req_sent and not (aws_ready or gcp_ready):
|
||||||
|
hookenv.status_set('waiting', 'waiting for cloud integration')
|
||||||
|
|
||||||
if addons_configured and not all_kube_system_pods_running():
|
if addons_configured and not all_kube_system_pods_running():
|
||||||
hookenv.status_set('waiting', 'Waiting for kube-system pods to start')
|
hookenv.status_set('waiting', 'Waiting for kube-system pods to start')
|
||||||
return
|
return
|
||||||
@ -1395,8 +1401,6 @@ def poke_network_unavailable():
|
|||||||
discussion about refactoring the affected code but nothing has happened
|
discussion about refactoring the affected code but nothing has happened
|
||||||
in a while.
|
in a while.
|
||||||
"""
|
"""
|
||||||
if is_state('kubernetes-master.networkunavailble.cleared'):
|
|
||||||
return
|
|
||||||
cmd = ['kubectl', 'get', 'nodes', '-o', 'json']
|
cmd = ['kubectl', 'get', 'nodes', '-o', 'json']
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -1448,8 +1452,6 @@ def poke_network_unavailable():
|
|||||||
hookenv.ERROR)
|
hookenv.ERROR)
|
||||||
return
|
return
|
||||||
|
|
||||||
set_state('kubernetes-master.networkunavailble.cleared')
|
|
||||||
|
|
||||||
|
|
||||||
def apiserverVersion():
|
def apiserverVersion():
|
||||||
cmd = 'kube-apiserver --version'.split()
|
cmd = 'kube-apiserver --version'.split()
|
||||||
@ -1527,11 +1529,11 @@ def request_integration():
|
|||||||
cloud.enable_dns_management()
|
cloud.enable_dns_management()
|
||||||
cloud.enable_block_storage_management()
|
cloud.enable_block_storage_management()
|
||||||
set_state('kubernetes-master.cloud-request-sent')
|
set_state('kubernetes-master.cloud-request-sent')
|
||||||
hookenv.status_set('waiting', 'waiting for cloud integration')
|
|
||||||
|
|
||||||
|
|
||||||
@when_none('endpoint.aws.joined',
|
@when_none('endpoint.aws.joined',
|
||||||
'endpoint.gcp.joined')
|
'endpoint.gcp.joined')
|
||||||
|
@when('kubernetes-master.cloud-request-sent')
|
||||||
def clear_requested_integration():
|
def clear_requested_integration():
|
||||||
remove_state('kubernetes-master.cloud-request-sent')
|
remove_state('kubernetes-master.cloud-request-sent')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user