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

correct docker.Run error handling #54

Merged
merged 1 commit into from
Oct 3, 2018

Conversation

BenTheElder
Copy link
Member

fixes #53
/kind bug

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 3, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder

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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 3, 2018
@k8s-ci-robot k8s-ci-robot requested a review from munnerz October 3, 2018 06:20
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 3, 2018
if len(output) > 0 && containerIDRegex.MatchString(output[0]) {
id = output[0]
}
// log error lines if there were any
if err != nil {
Copy link
Member Author

Choose a reason for hiding this comment

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

checking err should occur before checking the output! fixed here

@BenTheElder BenTheElder requested review from krzyzacy and amwat October 3, 2018 06:20
@BenTheElder
Copy link
Member Author

FYI @mitar sorry about that, I introduced this bug in #51 yesterday.

@BenTheElder
Copy link
Member Author

Now if you kind create twice you will at least get:

$ kind create
INFO[1002-23:23:05] Image: kindest/node:v1.11.3 present locally
INFO[1002-23:23:05] Running: /usr/local/bin/docker [docker run -d --privileged --security-opt seccomp=unconfined --tmpfs /tmp --tmpfs /run --tmpfs /var/lib/docker:exec -v /lib/modules:/lib/modules:ro --hostname kind-1-control-plane --name kind-1-control-plane --label io.k8s.sigs.kind.cluster=1 --expose 6443 --publish-all --entrypoint=/usr/local/bin/entrypoint kindest/node:v1.11.3 /sbin/init]
ERRO[1002-23:23:05] docker: Error response from daemon: Conflict. The container name "/kind-1-control-plane" is already in use by container "26a2d8a696d57f919443ec6fe850627d1809185badb76fb74e1cbea3e11f8cf6". You have to remove (or rename) that container to be able to reuse that name.
ERRO[1002-23:23:05] See 'docker run --help'.
FATA[1002-23:23:05] Failed to create cluster: docker run error: exit status 125

Next step is #39 and #23 to give nice, quieter output about resources from a previous cluster existing for this instead.

@BenTheElder BenTheElder mentioned this pull request Oct 3, 2018
Copy link

@krzyzacy krzyzacy left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 3, 2018
@k8s-ci-robot k8s-ci-robot merged commit 2ae73f8 into kubernetes-sigs:master Oct 3, 2018
@BenTheElder BenTheElder deleted the run-err branch July 19, 2020 23:47
stg-0 pushed a commit to stg-0/kind that referenced this pull request Mar 22, 2023
…d_labels_to_node_groups

[EOS-11009] Add labels to node groups
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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SIGSEGV error
3 participants