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

undocumented update functionality of nomad volume register #17247

Closed
rbastiaans-tc opened this issue May 19, 2023 · 1 comment · Fixed by #17249
Closed

undocumented update functionality of nomad volume register #17247

rbastiaans-tc opened this issue May 19, 2023 · 1 comment · Fixed by #17249
Assignees
Labels
theme/docs Documentation issues and enhancements theme/storage

Comments

@rbastiaans-tc
Copy link

rbastiaans-tc commented May 19, 2023

Nomad version

Nomad v1.3.1 (2b054e38e91af964d1235faa98c286ca3f527e56)

Operating system and Environment details

Issue

CLI help output of nomad volume register says it can be used to update a volume.

Usage: nomad volume register [options] <input>

  Creates or updates a volume in Nomad. The volume must exist on the remote
  storage provider before it can be used by a task.

  If the supplied path is "-" the volume file is read from stdin. Otherwise, it
  is read from the file at the supplied path.

  When ACLs are enabled, this command requires a token with the
  'csi-write-volume' capability for the volume's namespace.

This is however, afaik, the only place where updating is referenced or mentioned.

There is no word about updating in the documentation:

Reproduction steps

Expected Result

More details and explanation of how update of a (CSI) volume works.

I have some questions which are unanswered by the documentation:

  • how does updating work, what does it mean to update a volume?
  • can a volume be in use when it is updated?
  • which properties can be updated and which ones cannot?
  • can I update the size of a volume that has been resized on the remote storage provider?
  • etc

Actual Result

Job file (if appropriate)

Nomad Server logs (if appropriate)

Nomad Client logs (if appropriate)

@tgross
Copy link
Member

tgross commented May 19, 2023

Hi @rbastiaans-tc! Good catch on those docs. I think that's probably left over from when we had only volume register without volume create and then when we came back later the whole semantics of that changed. I'll open a PR to update the docs shortly. But in the meantime, that's mostly controlled by this Merge method:

  • you can update the capacity_min and capacity_max, so long the existing capacity fits (this won't actually change the volume though)
  • you can update the capability blocks but only if you don't remove a capability that's in use (ex. if a volume is currently in use with single-node-reader-only / file-system you can't remove that from the list of capability blocks)
  • you can update mount_options if the volume isn't in use
  • you can update secrets freely
  • you can update context freely (but probably shouldn't, this field is only used if you've created the volume externally so better not to mess with it)

Everything else can't be updated.

@tgross tgross self-assigned this May 19, 2023
@tgross tgross added the theme/docs Documentation issues and enhancements label May 19, 2023
tgross added a commit that referenced this issue May 19, 2023
The `volume register` command can update a small subset of the volume's fields
in-place, with some restrictions depending on whether the volume is currently in
use. Document these in the `volume register` command docs and the volume
specification docs.

Fixes: #17247
tgross added a commit that referenced this issue May 22, 2023
The `volume register` command can update a small subset of the volume's fields
in-place, with some restrictions depending on whether the volume is currently in
use. Document these in the `volume register` command docs and the volume
specification docs.

Fixes: #17247
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/docs Documentation issues and enhancements theme/storage
Projects
Development

Successfully merging a pull request may close this issue.

2 participants