Skip to content

Commit

Permalink
internal/instance: Allow 0 as value to limits.cpu.nodes
Browse files Browse the repository at this point in the history
The `0` value isn't valid for a `limits.cpu`, but for a NUMA node, it is
valid to want to pin to node `0`.

Signed-off-by: Stéphane Graber <[email protected]>
Sponsored-by: https://webdock.io
  • Loading branch information
stgraber committed Nov 7, 2024
1 parent 5157bfe commit 676ba92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/instance/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ var InstanceConfigKeysAny = map[string]func(value string) error{
// type: string
// liveupdate: yes
// shortdesc: Which NUMA nodes to place the instance CPUs on
"limits.cpu.nodes": validate.Optional(validate.Or(validate.IsValidCPUSet, validate.IsOneOf("balanced"))),
"limits.cpu.nodes": validate.Optional(validate.Or(validate.IsValidCPUSet, validate.IsOneOf("0", "balanced"))),

// gendoc:generate(entity=instance, group=resource-limits, key=limits.disk.priority)
// Controls how much priority to give to the instance's I/O requests when under load.
Expand Down

0 comments on commit 676ba92

Please sign in to comment.