Merge "Allow Deploy Allocated Node"

This commit is contained in:
Zuul 2019-09-06 18:12:15 +00:00 committed by Gerrit Code Review
commit 82bb197053
1 changed files with 5 additions and 0 deletions

View File

@ -2306,6 +2306,11 @@ class DeployNode(BaseMaasAction):
machine = machine_list.acquire_node(n.name)
self.task.add_status_msg(
msg=msg, error=False, ctx=n.name, ctx_type='node')
elif machine.status_name.startswith('Allocated'):
msg = "Node %s already acquired." % (n.name)
self.logger.info(msg)
self.task.add_status_msg(
msg=msg, error=False, ctx=n.name, ctx_type='node')
else:
msg = "Unexpected status %s for node %s, skipping deployment." % (
machine.status_name, n.name)