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.
```
pull/6/head
Kubernetes Submit Queue 2018-02-02 10:25:36 -08:00 committed by GitHub
commit ea501413ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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):
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: