Skip to content

Commit c668b01

Browse files
committed
config-linux: allow empty strings in memory policy nodes field
When runtime-tools validator checks mandatory fields, it expects every string field either to be tagged "omitempty" or contain a non-empty string. Linux memory policy modes MPOL_DEFAULT and MPOL_LOCAL must have empty nodes field. This change adds "omitempty" tag to LinuxMemoryPolicy.Nodes in order to pass runtime-tools validation in these modes. Signed-off-by: Antti Kervinen <[email protected]>
1 parent fd25dd3 commit c668b01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

specs-go/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ type LinuxMemoryPolicy struct {
899899

900900
// Nodes representing the nodemask for the set_mempolicy syscall in comma separated ranges format.
901901
// Format: "<node0>-<node1>,<node2>,<node3>-<node4>,..."
902-
Nodes string `json:"nodes"`
902+
Nodes string `json:"nodes,omitempty"`
903903

904904
// Flags for the set_mempolicy syscall.
905905
Flags []MemoryPolicyFlagType `json:"flags,omitempty"`

0 commit comments

Comments
 (0)