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

[GCP/Provisioner] Assign VMs launched on GCP with service account #2972

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

Michaelvll
Copy link
Collaborator

@Michaelvll Michaelvll commented Jan 10, 2024

Fixes #2966
Assign the VMs laucnhed on GCP with service account. This is the original behavior which is missed in our new provisioner implementation.

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
    • normal VM: sky launch -c test-gcp-sa --cloud gcp --cpus 2 'curl -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/identity?format=standard&audience=gcp"'; check the VM on the console; `
    • multiple nodes: sky launch -c test-gcp-sa-mn --cloud gcp --num-nodes 4 --cpus 2 'curl -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/identity?format=standard&audience=gcp"'; check the VM on the console`
    • TPU VM: sky launch -c test-gcp-sa-tpu --cloud gcp --gpus tpu-v2-8 'curl -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/identity?format=standard&audience=gcp"'; check the VM on the console; `
    • multi-node TPU VM: sky launch -c test-gcp-sa-tpu --cloud gcp --gpus tpu-v2-8 --num-nodes 2 'curl -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/identity?format=standard&audience=gcp"'; check the VM on the console; `
  • All smoke tests: pytest tests/test_smoke.py
  • Relevant individual smoke tests: pytest tests/test_smoke.py::test_fill_in_the_name
    • pytest tests/test_smoke.py::test_gcp_region_and_service_account
  • Backward compatibility tests: bash tests/backward_comaptibility_tests.sh

Copy link
Member

@concretevitamin concretevitamin 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 the quick fix @Michaelvll. LGTM.

@Michaelvll Michaelvll merged commit 42442fb into master Jan 10, 2024
19 checks passed
@Michaelvll Michaelvll deleted the fix-service-account-gcp branch January 10, 2024 18:58
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.

New GCP provisioner: service account not enabled problem
2 participants