Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retry to fetch binary if it fails first time #7839

Merged
merged 1 commit into from
Jul 30, 2021

Conversation

Smita8081
Copy link
Contributor

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change

/kind bug

/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:
This PR introduces an until/retry with a task that fetches binary to ansible host[running kubespray] from k8s master nodes

Which issue(s) this PR fixes:

Recently while testing the k8s upgrade with kubespray v2.14.2, I had faced below mentioned issue on my platform.
TASK [kubernetes/client : Copy kubectl binary to ansible host] ***************** Friday 09 July 2021 20:53:23 +0000 (0:00:00.400) 0:15:48.785 *********** [0;31mAn exception occurred during task execution. To see the full traceback, use -vvv. The error was: OSError: [Errno 26] Text file busy: b'/usr/local/bin/kubectl'[0m [0;31mfatal: [m1-kms0001.mgmt.oiaas]: FAILED! => [0m [0;31m msg: Unexpected failure during module execution.[0m [0;31m stdout: ''[0m

By the error it seems that binary is used at the time of execution of this task and hence upgrade process terminated, I have introduced an until/retry to tackle such error and try to fetch binary for at least 20 attempts before terminating the upgrade process.

I am open to suggestions for improvising this task, so as to avoid termination of k8s upgrade due to this task.

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 29, 2021
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 29, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @Smita8081. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 29, 2021
@Smita8081
Copy link
Contributor Author

Hello @oomichi, can you please review this PR which is a duplicate of PR. I had closed earlier PR.

This one you can consider to proceed further. Thank you for understanding.

@oomichi
Copy link
Contributor

oomichi commented Jul 30, 2021

Hello @oomichi, can you please review this PR which is a duplicate of PR. I had closed earlier PR.

This one you can consider to proceed further. Thank you for understanding.

Thanks for your effort.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 30, 2021
Copy link
Member

@floryut floryut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 30, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: floryut, Smita8081

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 30, 2021
@k8s-ci-robot k8s-ci-robot merged commit 31a5a4e into kubernetes-sigs:master Jul 30, 2021
Quehenr added a commit to Quehenr/unstable-laboratory-infrastructure-kubespray that referenced this pull request Aug 2, 2021
* master: (23 commits)
  retry to fetch binary if it fails first time (kubernetes-sigs#7839)
  Update vSphere CPI (kubernetes-sigs#7838)
  doc: Update 'Kubespray vs Kubeadm' (kubernetes-sigs#7834)
  Update MetalLB documentation (kubernetes-sigs#7833)
  Disable OVH CI until  voucher situation is cleared up (kubernetes-sigs#7824)
  Fix how to get image ID on offline deployment (kubernetes-sigs#7808)
  CRI-O: Install libseccomp2 from backports on Debian 10 (kubernetes-sigs#7816)
  fix(misc): contrib/terraform/aws (kubernetes-sigs#7818)
  Separate gvisor_download_url for runsc and shim (kubernetes-sigs#7760)
  Allow failure on tf-elax_ubuntu18-calico (kubernetes-sigs#7814)
  Add containerd on Flatcar Container Linux (kubernetes-sigs#7681)
  Fixup label for oracle linux bootstrap
  Update multus to 3.7.2 (and move to ghcr.io)
  Set default k8s version to 1.21.3
  Add hashes for k8s 1.20.8/.9 and 1.19.12/.13 and 1.21.3
  Fix erroneous ansible args
  Update kube-router to 1.3.0
  Update flannel to 0.14.0 (moved from coreos repo to flannel-io)
  Use dashboard 2.3.1 image
  Set Helm default version to 3.6.3
  ...
@floryut floryut mentioned this pull request Sep 8, 2021
LuckySB pushed a commit to southbridgeio/kubespray that referenced this pull request Oct 23, 2021
sakuraiyuta pushed a commit to sakuraiyuta/kubespray that referenced this pull request Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants