From 0872c8effdf1143ed9dab62c1ac1485f9da5ba4e Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Tue, 22 Mar 2016 16:25:25 -0700 Subject: [PATCH] node-status fix panic --- command/node_status.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/command/node_status.go b/command/node_status.go index 949b7bb38..57c14821d 100644 --- a/command/node_status.go +++ b/command/node_status.go @@ -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