Unverified Commit ea501413 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #59219 from hyperbolic2346/mwilson/get-node-name-timeout-bump

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. bumping timeouts for apiserver communication. **What this PR does / why we need it**: Our CI is failing due to timeouts. The times we set node names intersects with apiserver restarts, which can sometimes get caught up for longer than one minute. This is a temporary fix until we can decide on the best long-term solution. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note Upped the timeout for apiserver communication in the juju kubernetes-worker charm. ```
parents d4064ac3 af71c967
...@@ -976,7 +976,7 @@ def get_node_name(): ...@@ -976,7 +976,7 @@ def get_node_name():
# Get all the nodes in the cluster # Get all the nodes in the cluster
cmd = 'kubectl --kubeconfig={} get no -o=json'.format(kubeconfig_path) cmd = 'kubectl --kubeconfig={} get no -o=json'.format(kubeconfig_path)
cmd = cmd.split() cmd = cmd.split()
deadline = time.time() + 60 deadline = time.time() + 180
while time.time() < deadline: while time.time() < deadline:
try: try:
raw = check_output(cmd) raw = check_output(cmd)
...@@ -1029,7 +1029,7 @@ def _apply_node_label(label, delete=False, overwrite=False): ...@@ -1029,7 +1029,7 @@ def _apply_node_label(label, delete=False, overwrite=False):
cmd = '{} --overwrite'.format(cmd) cmd = '{} --overwrite'.format(cmd)
cmd = cmd.split() cmd = cmd.split()
deadline = time.time() + 60 deadline = time.time() + 180
while time.time() < deadline: while time.time() < deadline:
code = subprocess.call(cmd) code = subprocess.call(cmd)
if code == 0: if code == 0:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment