Return SchedulerConfig instead of SchedulerConfigResponse struct (#10799)

This commit is contained in:
Charlie Voiselle
2021-10-13 21:23:13 -04:00
committed by GitHub
parent 6a0dede9b6
commit 8ba714e211
7 changed files with 63 additions and 58 deletions

View File

@@ -37,48 +37,51 @@ $ curl \
```json
{
"Index": 5,
"KnownLeader": true,
"LastContact": 0,
"SchedulerConfig": {
"CreateIndex": 5,
"ModifyIndex": 5,
"SchedulerAlgorithm": "spread",
"MemoryOversubscriptionEnabled": true,
"PreemptionConfig": {
"SystemSchedulerEnabled": true,
"BatchSchedulerEnabled": false,
"ServiceSchedulerEnabled": false
}
}
"CreateIndex": 5,
"MemoryOversubscriptionEnabled": false,
"ModifyIndex": 5,
"PreemptionConfig": {
"BatchSchedulerEnabled": false,
"ServiceSchedulerEnabled": false,
"SysBatchSchedulerEnabled": false,
"SystemSchedulerEnabled": true
},
"SchedulerAlgorithm": "binpack"
}
```
#### Field Reference
- `Index` `(int)` - The `Index` value is the Raft index corresponding to this
configuration.
- `SchedulerAlgorithm` `(string: "binpack")` - Specifies whether scheduler
binpacks or spreads allocations on available nodes.
- `SchedulerConfig` `(SchedulerConfig)` - The returned `SchedulerConfig` object has configuration
settings mentioned below.
- `MemoryOversubscriptionEnabled` `(bool: false)` <sup>1.1 or later</sup> - When
`true`, tasks may exceed their reserved memory limit, if the client has excess
memory capacity. Tasks must specify
[`memory_max`](/docs/job-specification/resources#memory_max) to take advantage
of memory oversubscription.
- `SchedulerAlgorithm` `(string: "binpack")` - Specifies whether scheduler binpacks or spreads allocations on available nodes.
- `PreemptionConfig` `(PreemptionConfig)` - Options to enable preemption for
various schedulers.
- `MemoryOversubscriptionEnabled` `(bool: false)` <sup>1.1 Beta</sup> - When `true`, tasks may exceed their reserved memory limit, if the client has excess memory capacity. Tasks must specify [`memory_max`](/docs/job-specification/resources#memory_max) to take advantage of memory oversubscription.
- `SystemSchedulerEnabled` `(bool: true)` - Specifies whether preemption for
system jobs is enabled. Note that this defaults to true.
- `PreemptionConfig` `(PreemptionConfig)` - Options to enable preemption for various schedulers.
- `SysBatchSchedulerEnabled` `(bool: false)` - Specifies whether preemption
for sysbatch jobs is enabled. Note that this defaults to false and must be
explicitly enabled.
- `SystemSchedulerEnabled` `(bool: true)` - Specifies whether preemption for system jobs is enabled. Note that
this defaults to true.
- `BatchSchedulerEnabled` `(bool: false)` - Specifies whether preemption for
batch jobs is enabled. Note that this defaults to false and must be explicitly
enabled.
- `BatchSchedulerEnabled` `(bool: false)` - Specifies whether preemption for batch jobs is enabled. Note that
this defaults to false and must be explicitly enabled.
- `ServiceSchedulerEnabled` `(bool: false)` - Specifies whether preemption for
service jobs is enabled. Note that this defaults to false and must be
explicitly enabled.
- `ServiceSchedulerEnabled` `(bool: false)` - Specifies whether preemption for service jobs is enabled. Note that
this defaults to false and must be explicitly enabled.
- `CreateIndex` - The Raft index at which the configuration was created.
- `CreateIndex` - The Raft index at which the config was created.
- `ModifyIndex` - The Raft index at which the config was modified.
- `ModifyIndex` - The Raft index at which the configuration was modified.
## Update Scheduler Configuration