-
Notifications
You must be signed in to change notification settings - Fork 2k
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
API docs don't include invariants for CSI volume delete #24756
Comments
Once you've deregistered the volume from Nomad, Nomad no longer has any ability to manipulate the volume. You'd need to re-register it before making the
We should probably expand the API documentation to make sure that invariant is described. I'll mark this as a documentation issue but we'd also welcome a PR to improve the API docs if you're interested. |
@tgross I just tried Deleting the volume from the external provider while it's still registered in nomad, and I am still caught with the same error |
@Vickysomtee I did a little more digging and it looks like there's a bug in the API here, but not one we can easily fix without breaking backwards compatibility: The architectural problem is this: even with the external storage provider's ID, we can't delete the volume unless we can lookup the plugin for that volume, and to do that, we need Nomad's ID for the volume. The error you're seeing comes only one place on the server
But as we just saw, that's not possible because we can't lookup the plugin to send the delete RPC. So the So the docstring for the |
@tgross It took a while for me to understand your explaination so I decided to run a test and I understand it now. So I passed the volume ID for nomad instead of the external storage id and it worked. The volume got deleted from the the storage provider and deregistred from nomad. You are right. What needs to be done is to add a new field name. Any chance I pick this up? |
Sure, I'd be happy to review a PR! |
Nomad version
Nomad v1.6.0
BuildDate 2023-07-18T18:51:11Z
Revision 87d411f
Operating system and Environment details
Ubuntu
Issue
I am using the go sdk to successfully create Hetzner volumes for Postgres Databases on Nomad but I am unable to delete the volume from the external storage provider (Hetzner) after deregistering it from nomad.
I use the info func to get the volume
Then pass the externalID gotten from the above res to the DeleteOpts func to delete the volume from the external storage provider (Hetzner)
But I get this error
Unexpected response code: 500 (rpc error: volume not found: xxxxxxxxx)
The text was updated successfully, but these errors were encountered: