Skip to content

Commit

Permalink
Merge pull request #68 from sjones4/issue-node-stats
Browse files Browse the repository at this point in the history
Node controller should ignore teardown instances for nc-stats
  • Loading branch information
sjones4 authored Jul 6, 2018
2 parents 0af32cc + 3a5a0c1 commit 2eafb16
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions node/handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -3129,6 +3129,8 @@ int doDescribeInstances(ncMetadata * pMeta, char **instIds, int instIdsLen, ncIn
used_disk = used_mem = used_cores = 0;
for (i = 0; i < (*outInstsLen); i++) {
ncInstance *instance = (*outInsts)[i];
if (instance->state == TEARDOWN)
continue;
used_disk += instance->params.disk;
used_mem += instance->params.mem;
used_cores += instance->params.cores;
Expand Down

0 comments on commit 2eafb16

Please sign in to comment.