-
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
Nomad CSI snapshot list: do not shorten snapshot ID #10660
Comments
Hi @ggriffiths!
Yeah this is an unfortunate bug. We typically shorten IDs that come back in the Nomad CLI because it's safe to pass prefixes to Nomad. So for example, an alloc ID might be |
Makes sense, I've updated this issue to reflect that fix. |
This will ship in the next patch version of Nomad. Thanks @ggriffiths! |
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. |
Nomad version
Operating system and Environment details
CentOS Linux 7 (Core)
Issue
"nomad volume snapshot delete" is documented to take a snapshot id:
However, after trying a few combinations, I noticed the delete only goes through when a snapshot name is provided.
Update: After looking into this more, I found that the snapshot id provided in
nomad volume snapshot list
is shortened to 12 characters. I was passing this shortened ID tonomad volume snapshot delete
, which was not correct. Our snapshot ids are 18 characters. By coincidence, our CSI driver supports deleting snapshots by both name and ID, which explains the deletion succeeding via snapshot name.Unless I'm missing something, there isn't a way to find the full snapshot id via
nomad volume snapshot list
. Perhaps anomad volume snapshot list -json
would be useful here? Similar tonomad volume status -json
?Reproduction steps
An example like the follow could allow users to become confused as to why their snapshots aren't being deleted:
Expected Result
nomad volume snapshot delete
docs and CLI help should reflect that this command takes a snapshot nameORnomad volume snapshot delete
implementation should instead take a snapshot_id as documentednomad volume snapshot list
should support a-json
option.Actual Result
nomad volume snapshot delete
only works when a snapshot name is passed.Option is not supported yet
Job file (if appropriate)
n/a
Nomad Server logs (if appropriate)
n/a
Nomad Client logs (if appropriate)
n/a
The text was updated successfully, but these errors were encountered: