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 govc cns.* commands to manage CNS volumes #2051

Closed
bburky opened this issue Jul 7, 2020 · 3 comments · Fixed by #2103
Closed

Add govc cns.* commands to manage CNS volumes #2051

bburky opened this issue Jul 7, 2020 · 3 comments · Fixed by #2103

Comments

@bburky
Copy link

bburky commented Jul 7, 2020

While working with CAPV I ran into this issue: kubernetes-sigs/vsphere-csi-driver#251. If you delete your cluster before deleting your volumes you get a ton of orphaned CNS volumes.

There is no way to delete these volumes from the vCenter console. @chethanv28 suggested using VSAN Managed Object Browser (MOB) to delete the volumes: kubernetes-sigs/vsphere-csi-driver#251 (comment). But didn't want to enable a debugging tool on my cluster, and I would have had to delete each volume manually.

Please consider adding all the CNS client methods as govc cns.* command line tools. It would be nice to script together simple things like govc cns.ls | govc cns.rm to delete batches of volumes at once. It might be nice to query by metadata from the command line too.

I ended up writing a simple go program using govmomi to do delete all CNS volumes:
https://gist.github.com/bburky/7047be4866881aa22030ba4a74b89538

@dougm
Copy link
Member

dougm commented Jul 8, 2020

Thanks @bburky , can see how this'd be useful, I think we should consider it.

@SandeepPissay
Copy link
Contributor

@dougm This keeps coming up more often. When do you think CNS support will be added to govc?

@dougm
Copy link
Member

dougm commented Aug 25, 2020

We could start with ls + rm at least, I could also use this as part of some upcoming work.

Would folks prefer a cns.* prefix for these commands or volume.* ?

cc @vmwiz @dxlsunshine @dimatha

dougm added a commit to dougm/govmomi that referenced this issue Sep 3, 2020
dougm added a commit to dougm/govmomi that referenced this issue Sep 3, 2020
dougm added a commit to dougm/govmomi that referenced this issue Sep 9, 2020
marunachalam pushed a commit to marunachalam/govmomi that referenced this issue Sep 14, 2020
marunachalam pushed a commit to marunachalam/govmomi that referenced this issue Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants