Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Retry SSH keyscan command #1971

Merged
merged 5 commits into from
Apr 24, 2019
Merged

Retry SSH keyscan command #1971

merged 5 commits into from
Apr 24, 2019

Conversation

stefanprodan
Copy link
Member

Prevent CircleCI build from failing due to transient network errors

Fix: #1969

Prevent CircleCI build from failing due to transient network errors
Copy link
Member

@squaremo squaremo left a comment

Choose a reason for hiding this comment

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

Could known_hosts.sh and verify_known_hosts.sh be combined?

@squaremo
Copy link
Member

(I don't know why I did that as a review)

@stefanprodan
Copy link
Member Author

I'm going to rerun the e2e tests a couple of times and see if the number of retries needs to be increased.

@stefanprodan
Copy link
Member Author

stefanprodan commented Apr 24, 2019

Hmm looks like shh-keyscan doesn't fail on host timeout:

Step 5/17 : RUN sh /home/flux/known_hosts.sh /etc/ssh/ssh_known_hosts &&     rm /home/flux/known_hosts.sh
 ---> Running in 5f438543d24b
# gitlab.com:22 SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.8
# gitlab.com:22 SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.8
# gitlab.com:22 SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.8
# ssh.dev.azure.com:22 SSH-2.0-SSHBlackbox.10
# ssh.dev.azure.com:22 SSH-2.0-SSHBlackbox.10
# ssh.dev.azure.com:22 SSH-2.0-SSHBlackbox.10
# vs-ssh.visualstudio.com:22 SSH-2.0-SSHBlackbox.10
# vs-ssh.visualstudio.com:22 SSH-2.0-SSHBlackbox.10
# vs-ssh.visualstudio.com:22 SSH-2.0-SSHBlackbox.10
# github.com:22 SSH-2.0-babeld-873429c4
# github.com:22 SSH-2.0-babeld-873429c4
# github.com:22 SSH-2.0-babeld-873429c4
--- -
+++ /tmp/tmp.GPfpPo
@@ -2,6 +2,5 @@
 2048 SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8 github.com (RSA)
 2048 SHA256:ohD8VZEXGWo6Ez8GSEJQ9WpafgLFsOfLOtGGQCQo6Og ssh.dev.azure.com (RSA)
 2048 SHA256:ohD8VZEXGWo6Ez8GSEJQ9WpafgLFsOfLOtGGQCQo6Og vs-ssh.visualstudio.com (RSA)
-2048 SHA256:zzXQOXSRBEiUtuE8AikJYKwbHaxvSc0ojez9YXaGp1A bitbucket.org (RSA)
 256 SHA256:HbW3g8zUjNSksFbqTiUWPWg2Bq1x8xdGUrliXFzSnUw gitlab.com (ECDSA)
 256 SHA256:eUXGGm1YGsMAS7vkcx6JOJdOGHPem5gQp4taiCfCLB8 gitlab.com (ED25519)
The command '/bin/sh -c sh /home/flux/known_hosts.sh /etc/ssh/ssh_known_hosts &&     rm /home/flux/known_hosts.sh' returned a non-zero code: 1
Makefile:64: recipe for target 'build/.helm-operator.done' failed

The approach with two scripts was better, it would've retry both actions

docker/known_hosts.sh Outdated Show resolved Hide resolved
@stefanprodan
Copy link
Member Author

@squaremo @hiddeco now it works as expected, both operations will retry if any of them fail.

docker/known_hosts.sh Outdated Show resolved Hide resolved
Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

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

🚢

@stefanprodan stefanprodan merged commit 12b4420 into master Apr 24, 2019
@stefanprodan stefanprodan deleted the retry-ssh-keyscan branch April 24, 2019 13:47
@squaremo squaremo added this to the v1.12.1 milestone Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retry ssh-keyscan command
3 participants