Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

cluster deletion does not clean up pvc #216

Closed
colhom opened this issue Oct 12, 2016 · 5 comments
Closed

cluster deletion does not clean up pvc #216

colhom opened this issue Oct 12, 2016 · 5 comments

Comments

@colhom
Copy link
Contributor

colhom commented Oct 12, 2016

creating, deleting, and re-creating an etcdcluster with the same name results in:

panic: persistentvolumeclaims "etcd-cluster-pvc" already exists

goroutine 1 [running]:
panic(0x147a3a0, 0xc42034d080)
        /usr/lib/go/src/runtime/panic.go:500 +0x1a1
github.com/coreos/kube-etcd-controller/pkg/controller.(*Controller).Run(0xc420386a20)
        /home/chom/gopaths/kube-etcd-controller/src/github.com/coreos/kube-etcd-controller/pkg/controller/controller.go:206 +0x6c5
main.main()
        /home/chom/gopaths/kube-etcd-controller/src/github.com/coreos/kube-etcd-controller/cmd/controller/main.go:49 +0x55

@hongchaodeng should we be delete the pvc along with the pods and services when an etcd cluster is deleted?

@colhom
Copy link
Contributor Author

colhom commented Oct 12, 2016

Also, I do believe in that case we would have to clean up the backup pod for the cluster as well.

@hongchaodeng
Copy link
Member

  1. We do delete all pods/services when etcd cluster is deleted. Please rebase to master.
  2. Regarding PVC, we have another field CleanupBackupIfDeleted to help clean up. However, we don't delete by default because we want to keep data in case of user mistake.
  3. Instead of deleting it, I think there are better solution to this: we will have an option in backup policy to specify any existing pvc to mount, and we will make pvc name more random

@hongchaodeng
Copy link
Member

@colhom
This and #217 is not an issue.
Is it ok for you to close them?

@colhom
Copy link
Contributor Author

colhom commented Oct 17, 2016

@hongchaodeng yes, not an issue. I'll close them both now.

That being said- should we file an issue to randomize pvc names on creation so we can re-create controllers without cleaning up old PVCs?

@colhom colhom closed this as completed Oct 17, 2016
@hongchaodeng
Copy link
Member

hongchaodeng commented Oct 17, 2016

@colhom

should we file an issue to randomize pvc names on creation

Yes. Feel free to create an issue.

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 a pull request may close this issue.

2 participants