From 676ba92cfceff9c71b3dee70eb983a14540e890f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Thu, 7 Nov 2024 10:34:38 -0500 Subject: [PATCH] internal/instance: Allow 0 as value to limits.cpu.nodes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Sponsored-by: https://webdock.io --- internal/instance/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/instance/config.go b/internal/instance/config.go index aec4538c6a8..e9891248dd3 100644 --- a/internal/instance/config.go +++ b/internal/instance/config.go @@ -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.