avoid attempting to stop services for nodes that are not considered up

This commit is contained in:
Blake Harnden 2020-02-04 10:13:37 -08:00
parent 3846f2b5bd
commit c66ee04db5
4 changed files with 7 additions and 13 deletions

View file

@ -1556,9 +1556,10 @@ class Session:
funcs = []
for node_id in self.nodes:
node = self.nodes[node_id]
if isinstance(node, CoreNodeBase):
args = (node,)
funcs.append((self.services.stop_services, args, {}))
if not isinstance(node, CoreNodeBase) or not node.up:
continue
args = (node,)
funcs.append((self.services.stop_services, args, {}))
utils.threadpool(funcs)
# shutdown emane