{"record":{"id":"8c76c41b1111f249","repo":"hashicorp/nomad","slug":"max-requested-capacity-s-less-than-or-equal-to","errorCode":null,"errorMessage":"max requested capacity (%s) less than or equal to min (%s)","messagePattern":"max requested capacity \\((.+?)\\) less than or equal to min \\((.+?)\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/csi_endpoint.go","lineNumber":1327,"sourceCode":"\t)\n\n\t// If requested capacity values are unset, skip everything.\n\tif newMax == 0 && newMin == 0 {\n\t\tlogger.Debug(\"min and max values are zero\")\n\t\treturn nil\n\t}\n\n\t// New values same as current, so nothing to do.\n\tif vol.RequestedCapacityMax == newMax &&\n\t\tvol.RequestedCapacityMin == newMin {\n\t\tlogger.Debug(\"requested capacity unchanged\")\n\t\treturn nil\n\t}\n\n\t// If max is specified, it cannot be less than min or current capacity.\n\tif newMax > 0 {\n\t\tif newMax < newMin {\n\t\t\treturn fmt.Errorf(\"max requested capacity (%s) less than or equal to min (%s)\",\n\t\t\t\thumanize.Bytes(uint64(newMax)),\n\t\t\t\thumanize.Bytes(uint64(newMin)))\n\t\t}\n\t\tif newMax < vol.Capacity {\n\t\t\treturn fmt.Errorf(\"max requested capacity (%s) less than or equal to current (%s)\",\n\t\t\t\thumanize.Bytes(uint64(newMax)),\n\t\t\t\thumanize.Bytes(uint64(vol.Capacity)))\n\t\t}\n\t}\n\n\t// Values are validated, so go ahead and update vol to commit to state,\n\t// even if the external volume does not need expanding.\n\tvol.RequestedCapacityMin = newMin\n\tvol.RequestedCapacityMax = newMax\n\n\t// Only expand if new min is greater than current capacity.\n\tif newMin <= vol.Capacity {\n\t\treturn nil","sourceCodeStart":1309,"sourceCodeEnd":1345,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/csi_endpoint.go#L1309-L1345","documentation":"Fires in expandVolume: the requested maximum capacity is smaller than the requested minimum (both humanized in the message); a valid expansion needs max >= min, indicating the claim's capacity fields were swapped or mistyped.","triggerScenarios":"Thrown at nomad/csi_endpoint.go:1327 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set min_requests_max greater than or equal to min_requests_min in the claim","Re-issue the volume claim/expansion with corrected capacities"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}