Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Provisioner] make azure state check more robust #3483

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

Michaelvll
Copy link
Collaborator

A user reported that when launching a spot Azure VM, it is possible that a state code does not contain / which causes the following error:

  File "/home/azureuser/miniconda3/lib/python3.10/site-packages/sky/skylet/providers/azure/node_provider.py", line 105, in <listcomp>
    nodes = [self._extract_metadata(vm) for vm in filter(match_tags, vms)]
  File "/home/azureuser/miniconda3/lib/python3.10/site-packages/sky/skylet/providers/azure/node_provider.py", line 119, in _extract_metadata
    code, state = status["code"].split("/")
ValueError: too many values to unpack (expected 2)

We now add a handling for this special case.

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
  • All smoke tests: pytest tests/test_smoke.py
  • Relevant individual smoke tests: pytest tests/test_smoke.py::test_fill_in_the_name
  • Backward compatibility tests: bash tests/backward_comaptibility_tests.sh

@Michaelvll Michaelvll requested a review from cblmemo April 25, 2024 20:07
Copy link
Collaborator

@cblmemo cblmemo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this! LGTM.

@Michaelvll Michaelvll merged commit 9de6d14 into master Apr 26, 2024
20 checks passed
@Michaelvll Michaelvll deleted the robust-azure-state-check branch April 26, 2024 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants