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

Add a preflight check that asserts docker connectivity #583

Closed
wants to merge 2 commits into from

Conversation

zegl
Copy link
Contributor

@zegl zegl commented Jun 2, 2019

Assert that the docker daemon is running, and that we're able to connect to it.
This is done by executing 'docker ps', and checking the exit code.

#39
#554

@k8s-ci-robot k8s-ci-robot added do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 2, 2019
@k8s-ci-robot k8s-ci-robot requested review from munnerz and neolit123 June 2, 2019 11:17
@k8s-ci-robot
Copy link
Contributor

Hi @zegl. Thanks for your PR.

I'm waiting for a kubernetes-sigs or kubernetes 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 2, 2019
Assert that the docker daemon is running, and that we're able to connect to it.
This is done by executing 'docker ps', and checking the exit code.
@zegl zegl force-pushed the preflight-docker branch from 35b2c26 to 9b9630f Compare June 2, 2019 11:18
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Jun 2, 2019
}

// dockerIsRunning asserts that the docker daemon is running and is responsive
func dockerIsRunning() error {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should go to pkg/container/docker

@aojea
Copy link
Contributor

aojea commented Jun 2, 2019

/ok-to-test
/assign @neolit123
/assign @BenTheElder

@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 Jun 2, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: zegl
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: bentheelder

If they are not already assigned, you can assign the PR to them by writing /assign @bentheelder in a comment when ready.

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

@BenTheElder
Copy link
Member

Hi, thanks again for the PR!

If you check the current code, you'll see we actually already do a filtered docker ps to list the existing clusters, what we really need is to surface this error better instead of making another call.

I'm going to discuss at today's meeting (in 9 minutes!) and update the preflight checks issue as well to go from pre-flight to post-failure, which I think will help avoid piling on lots of slow checks (not that this one is, but presumably we'd add more) in the normal case, and instead diagnose the environment on failure.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 6, 2019
@k8s-ci-robot
Copy link
Contributor

@zegl: PR needs rebase.

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.

@BenTheElder
Copy link
Member

going another route, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants