dstack
dstack copied to clipboard
[Bug]: GCP doesn't handle 403 response
dstack version
0.16.0
Python version
3.11.8
Host OS
Arch Linux
Host Arch
x86_64
What happened?
I have an service account in without permission "Compute Admin". When I try to create an instance, I get an unhandled error.
CLI logs
No response
Server logs
2024-02-29T07:10:15.075 dstack._internal.server.background.tasks.process_submitted_jobs (e011ab)popular-moose-1-0: got exception when launching e2-highcpu-16 in gcp/us-east1
Traceback (most recent call last):
File "/home/thebits/dstack/dstack/.direnv/python-3.11/lib/python3.11/site-packages/dstack/_internal/server/background/tasks/process_submitted_jobs.py", line 223, in _run_job
launched_instance_info: LaunchedInstanceInfo = await run_async(
^^^^^^^^^^^^^^^^
File "/home/thebits/dstack/dstack/.direnv/python-3.11/lib/python3.11/site-packages/dstack/_internal/server/utils/common.py", line 13, in run_async
return await asyncio.get_running_loop().run_in_executor(None, func_with_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/thebits/dstack/dstack/.direnv/python-3.11/lib/python3.11/site-packages/dstack/_internal/core/backends/gcp/compute.py", line 167, in run_job
launched_instance_info = self.create_instance(instance_offer, instance_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/thebits/dstack/dstack/.direnv/python-3.11/lib/python3.11/site-packages/dstack/_internal/core/backends/gcp/compute.py", line 128, in create_instance
gcp_resources.wait_for_extended_operation(operation, "instance creation")
File "/home/thebits/dstack/dstack/.direnv/python-3.11/lib/python3.11/site-packages/dstack/_internal/core/backends/gcp/resources.py", line 190, in wait_for_extended_operation
result = operation.result(timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/thebits/dstack/dstack/.direnv/python-3.11/lib/python3.11/site-packages/google/api_core/future/polling.py", line 261, in result
raise self._exception
google.api_core.exceptions.BadRequest: 400 BAD REQUEST SERVICE_ACCOUNT_ACCESS_DENIED: The user does not have access to service account '[REDACTED]@[REDACTED].iam.gserviceaccount.com'. User: '[REDACTED]@[REDACTED].iam.gserviceaccount.com'. Ask a project owner to grant you the iam.serviceAccountUser role on the service account
``
Runner logs
No response
Additional Information
No response
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.