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

CSI Listsnapshot secrets support #10848

Merged
merged 1 commit into from
Aug 10, 2021

Conversation

ggriffiths
Copy link
Contributor

Fixes #10640
Signed-off-by: Grant Griffiths [email protected]

@ggriffiths
Copy link
Contributor Author

Still working on this one, getting a WIP PR out first.

@ggriffiths
Copy link
Contributor Author

ggriffiths commented Jul 21, 2021

Tested with Portworx CSI Driver:

[root@ip-70-0-177-133 nomadspecs]# nomad volume snapshot create pxvol1 snap4
Snapshot ID         Volume ID     Size    Create Time           Ready?
833182824418993564  670065376975  10 GiB  1970-01-01T00:00:01Z  true
[root@ip-70-0-177-133 nomadspecs]# nomad volume snapshot list --secrets=auth-token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImdyYW50QG9wZW5zdG9yYWdlLmlvIiwiZXhwIjoxNjI2OTMzODc0LCJncm91cHMiOlsiKiJdLCJpYXQiOjE2MjY4NDc0NzQsImlzcyI6Im9wZW5zdG9yYWdlLmlvIiwibmFtZSI6IkdyYW50Iiwicm9sZXMiOlsic3lzdGVtLmFkbWluIl0sInN1YiI6ImdyYW50QG9wZW5zdG9yYWdlLmlvIn0.Tvz8ZjXLvXb8Z5JCg4UEfbfYb2MFo3CLBRBXxqZ22yE
Snapshot ID          Volume ID     Size    Create Time  Ready?
833182824418993564   670065376975  10 GiB  <none>       true
523181979236462009   670065376975  10 GiB  <none>       true
1102101751991941593  670065376975  10 GiB  <none>       true
788455741817460122   670065376975  10 GiB  <none>       true
[root@ip-70-0-177-133 nomadspecs]# nomad volume snapshot list --secrets=auth-token=bad
Error querying CSI external snapshots for plugin "": Unexpected response code: 500 (controller list snapshots: CSI.ControllerListSnapshots: controller plugin returned an internal error, check the plugin allocation logs for more information: rpc error: code = Internal desc = Unable to get all snapshots: rpc error: code = Unauthenticated desc = Unable to obtain token issuer from authorization token: Token is invalid: bad)
[root@ip-70-0-177-133 nomadspecs]# nomad volume snapshot list --secrets=a=b,auth-token=second-arg-passed
Error querying CSI external snapshots for plugin "": Unexpected response code: 500 (rpc error: controller list snapshots: rpc error: controller list snapshots: rpc error: controller list snapshots: CSI.ControllerListSnapshots: controller plugin returned an internal error, check the plugin allocation logs for more information: rpc error: code = Internal desc = Unable to get all snapshots: rpc error: code = Unauthenticated desc = Unable to obtain token issuer from authorization token: Token is invalid: second-arg-passed)

@ggriffiths
Copy link
Contributor Author

Added a small unit test addition. Ready for review.

Copy link
Member

@schmichael schmichael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @ggriffiths! Thanks for contributing!

There's a few other steps. I can take care of them if you don't want to! Just let me know.

https://github.com/hashicorp/nomad/blob/main/contributing/checklist-command.md is hopefully helpful, but we don't do a good job of pointing people to it. Sorry!

command/volume_snapshot_list.go Show resolved Hide resolved
@ggriffiths
Copy link
Contributor Author

Cool, I'll work on those steps. Thanks for taking a look!

@ggriffiths
Copy link
Contributor Author

Added the docs and changelog @schmichael

@ggriffiths
Copy link
Contributor Author

ggriffiths commented Aug 9, 2021

@schmichael, let me know if anything else is needed here. Hoping to get this in for the next minor release.

@schmichael
Copy link
Member

Fantastic. Thanks for sticking with this @ggriffiths! It will ship in our next release!

@schmichael schmichael merged commit 734f1d7 into hashicorp:main Aug 10, 2021
notnoop pushed a commit that referenced this pull request Aug 26, 2021
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, 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 Nov 16, 2022
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 this pull request may close these issues.

CSI Volume Snapshot List: support secrets in the request
2 participants