Allow Deploy Allocated Node

Updated the maas diver to allow node deploy in Allocated state.

Change-Id: Ic68279e641431e61ec714d94867bd7bbaea083c6
This commit is contained in:
Mahmoudi, Ahmad (am495p) 2019-08-26 21:16:53 -05:00
parent 2cf960f4fc
commit a6fa70dff8
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)