Skip to content

Commit

Permalink
Merge pull request #3597 from tbartelmess/b-fix-exhaustion-strings
Browse files Browse the repository at this point in the history
Changed Superset to only return the resource name
  • Loading branch information
chelseakomlo authored Nov 29, 2017
2 parents fe53f72 + 51a407f commit e0d657f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions nomad/structs/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1339,16 +1339,16 @@ func (r *Resources) NetIndex(n *NetworkResource) int {
// should be used for that.
func (r *Resources) Superset(other *Resources) (bool, string) {
if r.CPU < other.CPU {
return false, "cpu exhausted"
return false, "cpu"
}
if r.MemoryMB < other.MemoryMB {
return false, "memory exhausted"
return false, "memory"
}
if r.DiskMB < other.DiskMB {
return false, "disk exhausted"
return false, "disk"
}
if r.IOPS < other.IOPS {
return false, "iops exhausted"
return false, "iops"
}
return true, ""
}
Expand Down
2 changes: 1 addition & 1 deletion website/source/api/jobs.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,7 @@ $ curl \
"NodesExhausted": 1,
"ClassExhausted": null,
"DimensionExhausted": {
"cpu exhausted": 1
"cpu": 1
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion website/source/docs/commands/job/status.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ cache 1 0 4 0 0 0
Placement Failure
Task Group "cache":
* Resources exhausted on 1 nodes
* Dimension "cpu exhausted" exhausted on 1 nodes
* Dimension "cpu" exhausted on 1 nodes

Latest Deployment
ID = bb4b2fb1
Expand Down
2 changes: 1 addition & 1 deletion website/source/docs/commands/plan.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Scheduler dry-run:
- WARNING: Failed to place all allocations.
Task Group "cache" (failed to place 3 allocations):
* Resources exhausted on 1 nodes
* Dimension "cpu exhausted" exhausted on 1 nodes
* Dimension "cpu" exhausted on 1 nodes

Job Modify Index: 15
To submit the job with version verification run:
Expand Down
4 changes: 2 additions & 2 deletions website/source/docs/operating-a-job/inspecting-state.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ ID Priority Triggered By Status Placement Failures
Placement Failure
Task Group "example":
* Resources exhausted on 1 nodes
* Dimension "cpu exhausted" exhausted on 1 nodes
* Dimension "cpu" exhausted on 1 nodes
Allocations
ID Eval ID Node ID Task Group Desired Status Created At
Expand Down Expand Up @@ -135,7 +135,7 @@ Placement Failures = true
Failed Placements
Task Group "example" (failed to place 3 allocations):
* Resources exhausted on 1 nodes
* Dimension "cpu exhausted" exhausted on 1 nodes
* Dimension "cpu" exhausted on 1 nodes
Evaluation "5744eb15" waiting for additional capacity to place remainder
```
Expand Down

0 comments on commit e0d657f

Please sign in to comment.