Skip to content

Commit

Permalink
Wait for server to get IP
Browse files Browse the repository at this point in the history
  • Loading branch information
milliams committed Aug 25, 2023
1 parent 0c4b482 commit 757d99b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions roles/slurm/files/citc_openstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ async def start_node(log, host: str, nodespace: Dict[str, str], ssh_keys: str) -
return

if not slurm_ip:
instance = await asyncio.get_event_loop().run_in_executor(None, lambda: conn.compute.wait_for_server(instance))
private_ip = instance.addresses[nodespace["network_name"]][0]["addr"]
log.info(f"{host}: Private IP {private_ip}")
subprocess.run(["scontrol", "update", f"NodeName={host}", f"NodeAddr={private_ip}"])
Expand Down

0 comments on commit 757d99b

Please sign in to comment.