mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 17:35:43 +03:00
node-status fix panic
This commit is contained in:
@@ -277,6 +277,9 @@ func getResources(client *api.Client, node *api.Node) ([]string, error) {
|
||||
// Compute the total
|
||||
r := node.Resources
|
||||
res := node.Reserved
|
||||
if res == nil {
|
||||
res = &api.Resources{}
|
||||
}
|
||||
totalCpu = r.CPU - res.CPU
|
||||
totalMem = r.MemoryMB - res.MemoryMB
|
||||
totalDisk = r.DiskMB - res.DiskMB
|
||||
|
||||
Reference in New Issue
Block a user