Repository navigation
ci: Retry the SSH connection to the smoke test VM - #1471
Closed
marcleblanc2 wants to merge 3 commits into
Closed
marcleblanc2 wants to merge 3 commits into
marcleblanc2 wants to merge 3 commits into
Conversation
vagrant up fails if the test VM drops off the network after its first SSH connection. That is not a test result, so check whether the VM still answers SSH when vagrant up fails, and exit with a status which Buildkite retries once, on a new VM. Amp-Thread-ID: https://ampcode.com/threads/T-01a1c753-39cc-72c6-b71a-0a24497aaf5a Co-authored-by: Amp <amp@ampcode.com>
Review feedback: keep the retry in the script. When the test VM stops answering SSH, destroy it and run the test once more on a new VM, in the same job. Amp-Thread-ID: https://ampcode.com/threads/T-01a1c753-39cc-72c6-b71a-0a24497aaf5a Co-authored-by: Amp <amp@ampcode.com>
1 task done
Review feedback: the job must not create a second VM. Undo the retry of the whole test, and retry only the SSH connection to the VM which vagrant up created. Once it answers, vagrant provision syncs the repo and runs the test on that VM. Amp-Thread-ID: https://ampcode.com/threads/T-01a1c753-39cc-72c6-b71a-0a24497aaf5a Co-authored-by: Amp <amp@ampcode.com>
Contributor
Author
|
Closing in favor of #1488, which retries the SSH connection on the same VM from the gcloud script. The branch stays. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The smoke test in build 16777 (#1465) failed before it ran. The test VM booted and answered SSH, then stopped answering a few seconds later, while Vagrant was syncing the repo to it. Vagrant gave up after about 20 seconds, and the job failed as if the test had failed.
This PR retries the SSH connection to that same VM. It never creates a second VM.
vagrant upfails,vagrant-run.shchecks whether the VM answers SSH (vagrant sshwith a 15 second connect timeout).vagrant provisionsyncs the repo to it and runs the test.vagrant upcannot be resumed, andvagrant provisionruns the same two steps whichvagrant updid not get to.Not covered:
sourcegraph-ciproject.#1468 changes the same lines of
vagrant-run.sh, so whichever PR merges second needs a small rebase.Checklist
Test plan
Ran
.buildkite/vagrant-run.sh docker-testlocally with stubvagrant,gcloud, andsleepcommands on thePATH, and checked the exit status and thevagrantcalls made. Every case callsvagrant uponce andvagrant destroyonce.vagrant upvagrant provisionRead the Vagrant 2.4.1 and vagrant-google 2.7.0 source to confirm that a failed
vagrant upkeeps the VM, and thatvagrant provisionsyncs the folder before it runs the provisioners.Not tested against a real VM which stops answering. CI on this PR only covers the first row.