volumeoptions.go defaults logic broken
Closed this issue · 1 comments
fbarreir commented
I came across this problem with a docker image built from the cvmfs-csi master branch code.
Hash and tag options are supposed to be optional, so I didn't set them. However I was getting
"missing required field tag" or "missing required field hash" errors.
I don't know go, but I think the problem is in the newVolumeOptions function. The call to validate, which sets a default for tag, needs to be moved up before the extractOption(tag) call
When setting both tag and hash, the error "specifying both hash and tag is not allowed" jumps, so the image is unusable.