Merge pull request #3597 from tbartelmess/b-fix-exhaustion-strings

Changed Superset to only return the resource name
This commit is contained in:
Chelsea Komlo
2017-11-29 11:19:18 -05:00
committed by GitHub
5 changed files with 9 additions and 9 deletions

View File

@@ -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, ""
}

View File

@@ -1477,7 +1477,7 @@ $ curl \
"NodesExhausted": 1,
"ClassExhausted": null,
"DimensionExhausted": {
"cpu exhausted": 1
"cpu": 1
}
}
},

View File

@@ -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

View File

@@ -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:

View File

@@ -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
@@ -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
```