Skip to content

Commit 267944b

Browse files
committed
fixup: review changes
1 parent ddaf97d commit 267944b

File tree

7 files changed

+21
-24
lines changed

7 files changed

+21
-24
lines changed

client/client.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,9 +1629,8 @@ func (c *Client) setupNode() error {
16291629
node.Meta[envoy.DefaultTransparentProxyOutboundPortParam] = envoy.DefaultTransparentProxyOutboundPort
16301630
}
16311631
// Set NodeMaxAllocs before dynamic configuration is set
1632-
if newConfig.NodeMaxAllocs != 0 {
1633-
node.NodeMaxAllocs = newConfig.NodeMaxAllocs
1634-
}
1632+
node.NodeMaxAllocs = newConfig.NodeMaxAllocs
1633+
16351634
// Since node.Meta will get dynamic metadata merged in, save static metadata
16361635
// here.
16371636
c.metaStatic = maps.Clone(node.Meta)

command/agent/agent.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -787,9 +787,7 @@ func convertClientConfig(agentConfig *Config) (*clientconfig.Config, error) {
787787
if agentConfig.Client.NetworkInterface != "" {
788788
conf.NetworkInterface = agentConfig.Client.NetworkInterface
789789
}
790-
if agentConfig.Client.NodeMaxAllocs != 0 {
791-
conf.NodeMaxAllocs = agentConfig.Client.NodeMaxAllocs
792-
}
790+
conf.NodeMaxAllocs = agentConfig.Client.NodeMaxAllocs
793791

794792
// handle rpc yamux configuration
795793
conf.RPCSessionConfig = yamux.DefaultConfig()
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Copyright (c) HashiCorp, Inc.
2-
# SPDX-License-Identifier: BUSL-1.1
3-
4-
client {
5-
enabled = true
6-
node_max_allocs = 5
7-
}
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: BUSL-1.1
3+
4+
client {
5+
enabled = true
6+
node_max_allocs = 5
7+
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"client": {
3-
"enabled": true,
4-
"node_max_allocs": 5
5-
}
6-
}
2+
"client": {
3+
"enabled": true,
4+
"node_max_allocs": 5
5+
}
6+
}\n

scheduler/rank_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2144,9 +2144,9 @@ func TestBinPackIterator_MaxAlloc(t *testing.T) {
21442144
ClientStatus: structs.AllocClientStatusPending,
21452145
TaskGroup: "web",
21462146
}
2147-
require.NoError(t, state.UpsertJobSummary(998, mock.JobSummary(alloc1.JobID)))
2148-
require.NoError(t, state.UpsertJobSummary(999, mock.JobSummary(alloc2.JobID)))
2149-
require.NoError(t, state.UpsertAllocs(structs.MsgTypeTestSetup, 1000, []*structs.Allocation{alloc1, alloc2}))
2147+
must.NoError(t, state.UpsertJobSummary(998, mock.JobSummary(alloc1.JobID)))
2148+
must.NoError(t, state.UpsertJobSummary(999, mock.JobSummary(alloc2.JobID)))
2149+
must.NoError(t, state.UpsertAllocs(structs.MsgTypeTestSetup, 1000, []*structs.Allocation{alloc1, alloc2}))
21502150

21512151
testCases := []struct {
21522152
name string

website/content/docs/commands/node/status.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ Time Subsystem Message
276276
277277
278278
Allocated Resources
279-
CPU Memory Disk Alloc Count
279+
CPU Memory Disk Alloc Count
280280
2500/2600 MHz 1.3 GiB/2.0 GiB 1.5 GiB/32 GiB 5/50
281281
282282
Allocation Resource Utilization

website/content/docs/configuration/client.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ client {
113113
where [variable interpolation][runtime_var_interpolation] is supported.
114114

115115
- `node_max_allocs` `(int: 0)` - Specifies the maximum number of allocations
116-
allowed on a client node and is not enforced if unset. This value can be
117-
seen in `nomad node status` under Allocated Resources.
116+
that may be scheduled on a client node and is not enforced if unset. This
117+
value can be seen in `nomad node status` under Allocated Resources.
118118

119119
- `node_pool` `(string: "default")` - Specifies the node pool in which the
120120
client is registered. If the node pool does not exist yet, it will be created

0 commit comments

Comments
 (0)