Commit fb783308 by Őry Máté

manager: do not deploy/schedule to disabled nodes

closes #103
parent 7fa48338
......@@ -23,7 +23,8 @@ def select_node(instance, nodes):
''' Select a node for hosting an instance based on its requirements.
'''
# check required traits
nodes = [n for n in nodes if has_traits(instance.req_traits.all(), n)]
nodes = [n for n in nodes
if n.enabled and has_traits(instance.req_traits.all(), n)]
if not nodes:
raise TraitsUnsatisfiableException()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment