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

Unable to delete external volume because of special character in secret key/value pair #15663

Closed
digi-talo opened this issue Jan 3, 2023 · 2 comments · Fixed by #15670
Closed

Comments

@digi-talo
Copy link

Nomad version

Output from v1.4.3

Operating system and Environment details

Debian buster - 3 node dev environment running both server and client mode

Issue

Can't delete an external storage volumes because the adminKey contains an = sign.

Reproduction steps

nomad volume delete -secret adminID=csiAdmin -secret adminKey=xxxxxxxxxxxxxxxxxx== vol-test

Using quotes around the key=value renders the same result. There seems to be no way to have the value correctly interpreted when it contains an equal sign.
When I remove the equal signs from the adminKey I get a rados authentication error as expected.

Expected Result

Deleted volume

Actual Result

Secret must be in the format: -secret key=value

@tgross tgross added this to Needs Triage in Nomad - Community Issues Triage via automation Jan 3, 2023
@tgross
Copy link
Member

tgross commented Jan 3, 2023

Hi @digi-talo! This looks like a bug in the command line parsing of the k/v format. See volume_delete.go#L105-L114 but it looks like we have the exact same bug in volume snapshot create, volume snapshot list, and volume snapshot delete as well.

The fix for this should be straightforward: we need to grab only the first = and not the rest of them. I'll try to get a patch up shortly for this.

@github-actions
Copy link

github-actions bot commented May 4, 2023

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

Successfully merging a pull request may close this issue.

2 participants