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

[BUG] Cannot delete cluster when create is interrupted #683

Closed
jawabuu opened this issue Jul 21, 2021 · 1 comment
Closed

[BUG] Cannot delete cluster when create is interrupted #683

jawabuu opened this issue Jul 21, 2021 · 1 comment
Assignees
Labels
bug Something isn't working priority/high
Milestone

Comments

@jawabuu
Copy link

jawabuu commented Jul 21, 2021

What did you do

  • How was the cluster created?

    • k3d cluster create k1
  • What did you do afterwards?
    Creation was interrupted before completion.
    Try to delete the cluster.

What did you expect to happen

Expect cluster to be deleted.

Screenshots or terminal output

If applicable, add screenshots or terminal output (code block) to help explain your problem.

$ k3d cluster list
NAME   SERVERS   AGENTS   LOADBALANCER
k1     0/0       0/0      true
$ k3d cluster delete k1
FATA[0000] error getting loadbalancer config for cluster k1: Error: No such container:path: c4aa9409179ea791604c31cf737657e786f1b46c89dc0ef135d1981f788a90a5:/etc/confd/values.yaml: file not found

Which OS & Architecture

  • Linux, Windows, MacOS / amd64, x86, ...?

Which version of k3d

  • k3d version v5.0.0-dev.0

Which version of docker

  • output of docker version and docker info
Client: Docker Engine - Community
 Cloud integration: 1.0.12
 Version:           20.10.5
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        55c4c88
 Built:             Tue Mar  2 20:14:53 2021
 OS/Arch:           windows/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.5
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       363e9a8
  Built:            Tue Mar  2 20:15:47 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.4
  GitCommit:        05f951a3781f4f2c1911b05e61c160e9c30eaa8e
 runc:
  Version:          1.0.0-rc93
  GitCommit:        12644e614e25b05da6fd08a38ffa0cfe1903fdec
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
@jawabuu jawabuu added the bug Something isn't working label Jul 21, 2021
@iwilltry42 iwilltry42 added this to the v5.0.0 milestone Jul 21, 2021
@iwilltry42 iwilltry42 self-assigned this Jul 21, 2021
iwilltry42 added a commit that referenced this issue Jul 21, 2021
- clusterGet should not return an error, if it cannot get the
loadbalancer config, as it's not critical
  -> it should not rely on files created in nodehook actions
- this also fixes a nil pointer exception when cluster creation was
interrupted even before the loadbalancer was added to the cluster in
memory

Fixes #683
@iwilltry42
Copy link
Member

Hi @jawabuu , thanks for opening this issue!
This is actually not a real bug but an issue with what the ClusterGet function should be concerned with, which should not necessarily depend on the loadbalancer config which is written in a node hook (preStart hook).
Commit 25c6f65 fixes that behavior by just printing an error log instead (and also fixes a nil pointer exception, for the case that cluster creation is interrupted even earlier).
Functions relying on the lb config should issue a follow-up request to get the config after getting the cluster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority/high
Projects
None yet
Development

No branches or pull requests

2 participants