Skip to content

Commit

Permalink
[Azure] Fix status query for Azure (#2120)
Browse files Browse the repository at this point in the history
fix azure refresh when the cluster terminated on the cloud
  • Loading branch information
Michaelvll authored Jun 22, 2023
1 parent bef81e1 commit ca9fed1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sky/clouds/azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,8 @@ def query_status(cls, name: str, tag_filters: Dict[str, str],
if not stdout.strip():
return []
node_ids = json.loads(stdout.strip())
if not node_ids:
return []
state_str = '[].powerState'
if len(node_ids) == 1:
state_str = 'powerState'
Expand Down

0 comments on commit ca9fed1

Please sign in to comment.