Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cblmemo committed Aug 26, 2024
1 parent 6067e2b commit c79abce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sky/provision/runpod/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ def list_instances() -> Dict[str, Dict[str, Any]]:
info['name'] = instance['name']
info['port2endpoint'] = {}

if instance['desiredStatus'] == 'RUNNING' and instance.get('runtime'):
# Sometimes when the cluster is in the process of being created,
# the `port` field in the runtime is None and we need to check for it.
if (instance['desiredStatus'] == 'RUNNING' and
instance.get('runtime') and
instance.get('runtime').get('ports')):
for port in instance['runtime']['ports']:
if port['isIpPublic']:
if port['privatePort'] == 22:
Expand Down

0 comments on commit c79abce

Please sign in to comment.