From f70173f96761f68b5528dbc52d9bb2c622118f1e Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Thu, 31 Jul 2003 19:23:20 +0000
Subject: [PATCH] Consider nodes in state COMPLETING to still be allocated in
 the tally.

---
 src/sinfo/sinfo.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/sinfo/sinfo.c b/src/sinfo/sinfo.c
index 9bc21b8caf1..ffe8c57eb11 100644
--- a/src/sinfo/sinfo.c
+++ b/src/sinfo/sinfo.c
@@ -418,7 +418,8 @@ static void _update_sinfo(sinfo_data_t *sinfo_ptr, partition_info_t* part_ptr,
 			sinfo_ptr->max_weight = node_ptr->weight;
 	}
 
-	if (node_ptr->node_state == NODE_STATE_ALLOCATED)
+	if ((node_ptr->node_state == NODE_STATE_ALLOCATED) ||
+	    (node_ptr->node_state == NODE_STATE_COMPLETING))
 		sinfo_ptr->nodes_alloc++;
 	else if (node_ptr->node_state == NODE_STATE_IDLE)
 		sinfo_ptr->nodes_idle++;
@@ -441,7 +442,8 @@ static void _create_sinfo(List sinfo_list, partition_info_t* part_ptr,
 
 	if (node_ptr) {
 		sinfo_ptr->node_state = node_ptr->node_state;
-		if (node_ptr->node_state == NODE_STATE_ALLOCATED)
+		if ((node_ptr->node_state == NODE_STATE_ALLOCATED) ||
+		    (node_ptr->node_state == NODE_STATE_COMPLETING))
 			sinfo_ptr->nodes_alloc++;
 		else if (node_ptr->node_state == NODE_STATE_IDLE)
 			sinfo_ptr->nodes_idle++;
-- 
GitLab