Beau Albiston
06/29/2023, 5:17 AMdagster-io/dagster-cloud-hybrid-quickstart
. The prod
deployment works fine when merging a PR into main. However, branch deployments fail during on: pull_request
. I get the following error with step "Deploy to Dagster Cloud":
Exception: Invalid image <MY DOCKER IMAGE>. Only images managed by Dagster Cloud can be used in Serverless deployments.
File "/dagster-cloud/dagster_cloud/workspace/user_code_launcher/user_code_launcher.py", line 1308, in _reconcile
self._check_for_image(code_deployment_metadata)
File "/dagster-cloud-serverless-agent/dagster_cloud_serverless_agent/serverless/user_code_launcher.py", line 95, in _check_for_image
raise Exception(
The agent dagster.yaml
looks like this (note branch_deployments: true
):
# dagster.yaml
instance_class:
module: dagster_cloud.instance
class: DagsterCloudAgentInstance
dagster_cloud_api:
agent_token: <MY AGENT TOKEN>
branch_deployments: true
deployment: prod
user_code_launcher:
module: dagster_cloud.workspace.docker
class: DockerUserCodeLauncher
config:
networks:
- dagster_cloud_agent
server_ttl:
enabled: true
ttl_seconds: 7200 # 2 hours
The branch deployments seem to remain configured for Serverless -- they have a "Managed by Dagster Cloud" agent assigned to them. BUT... A couple of times I have seen both my hybrid agent AND the serverless agent assigned to the branch deployment.
Thanks!Beau Albiston
06/29/2023, 3:38 PMCopy
docker.errors.APIError: 500 Server Error for <http+docker://localhost/v1.43/containers/60b492f372a6bc2dc74bb243b14574befc9388ed3abc8fdcf7b5245c2a9fc311/start>: Internal Server Error ("failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: sethostname: invalid argument: unknown")
File "/dagster-cloud/dagster_cloud/workspace/user_code_launcher/user_code_launcher.py", line 1310, in _reconcile
new_dagster_servers[to_update_key] = self._start_new_dagster_server(
File "/dagster-cloud/dagster_cloud/workspace/user_code_launcher/user_code_launcher.py", line 1605, in _start_new_dagster_server
return self._start_new_server_spinup(
File "/dagster-cloud/dagster_cloud/workspace/docker/__init__.py", line 298, in _start_new_server_spinup
container, server_endpoint = self._launch_container(
File "/dagster-cloud/dagster_cloud/workspace/docker/__init__.py", line 240, in _launch_container
container.start()
File "/usr/local/lib/python3.10/site-packages/docker/models/containers.py", line 406, in start
return self.client.api.start(self.id, **kwargs)
File "/usr/local/lib/python3.10/site-packages/docker/utils/decorators.py", line 19, in wrapped
return f(self, resource_id, *args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/docker/api/container.py", line 1127, in start
self._raise_for_status(res)
File "/usr/local/lib/python3.10/site-packages/docker/api/client.py", line 270, in _raise_for_status
raise create_api_error_from_http_exception(e) from e
File "/usr/local/lib/python3.10/site-packages/docker/errors.py", line 39, in create_api_error_from_http_exception
raise cls(e, response=response, explanation=explanation) from e
The above exception was caused by the following exception:
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: <http+docker://localhost/v1.43/containers/60b492f372a6bc2dc74bb243b14574befc9388ed3abc8fdcf7b5245c2a9fc311/start>
File "/usr/local/lib/python3.10/site-packages/docker/api/client.py", line 268, in _raise_for_status
response.raise_for_status()
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
prha
06/29/2023, 6:56 PMprha
06/29/2023, 6:57 PMBeau Albiston
06/29/2023, 6:59 PMdagster-cloud-hybrid-quickstart
, which I would expect would setup all deployments as Hybrid...Beau Albiston
06/29/2023, 7:01 PMprha
06/29/2023, 8:07 PMBeau Albiston
06/29/2023, 8:32 PMBeau Albiston
06/29/2023, 8:44 PMprod
works):
Copy
docker.errors.APIError: 500 Server Error for <http+docker://localhost/v1.43/containers/dc1870de17e0e757e80077f57ed07a561ca7d9ced6511a6ed7082defe32a1804/start>: Internal Server Error ("failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: sethostname: invalid argument: unknown")
File "/dagster-cloud/dagster_cloud/workspace/user_code_launcher/user_code_launcher.py", line 1310, in _reconcile
new_dagster_servers[to_update_key] = self._start_new_dagster_server(
File "/dagster-cloud/dagster_cloud/workspace/user_code_launcher/user_code_launcher.py", line 1605, in _start_new_dagster_server
return self._start_new_server_spinup(
File "/dagster-cloud/dagster_cloud/workspace/docker/__init__.py", line 298, in _start_new_server_spinup
container, server_endpoint = self._launch_container(
File "/dagster-cloud/dagster_cloud/workspace/docker/__init__.py", line 240, in _launch_container
container.start()
File "/usr/local/lib/python3.10/site-packages/docker/models/containers.py", line 406, in start
return self.client.api.start(self.id, **kwargs)
File "/usr/local/lib/python3.10/site-packages/docker/utils/decorators.py", line 19, in wrapped
return f(self, resource_id, *args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/docker/api/container.py", line 1127, in start
self._raise_for_status(res)
File "/usr/local/lib/python3.10/site-packages/docker/api/client.py", line 270, in _raise_for_status
raise create_api_error_from_http_exception(e) from e
File "/usr/local/lib/python3.10/site-packages/docker/errors.py", line 39, in create_api_error_from_http_exception
raise cls(e, response=response, explanation=explanation) from e
The above exception was caused by the following exception:
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: <http+docker://localhost/v1.43/containers/dc1870de17e0e757e80077f57ed07a561ca7d9ced6511a6ed7082defe32a1804/start>
File "/usr/local/lib/python3.10/site-packages/docker/api/client.py", line 268, in _raise_for_status
response.raise_for_status()
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
prha
06/29/2023, 9:30 PMlocalhost
even though you have a network configured in your user code launcherBeau Albiston
06/29/2023, 9:51 PMBeau Albiston
06/29/2023, 9:58 PM2023-06-29 21:46:51 +0000 - dagster_cloud.user_code_launcher - INFO - Pulling image <MY IMAGE URL>
. But, as you've noticed already, immediately after pulling the image, my agent errors with: requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: <http+docker://localhost/v1.43/containers/a63fae1297789ace53ec6722e15c8f142c0f24fd106f3c801ebea382e4fc7831/start>
.prha
06/29/2023, 10:06 PMBeau Albiston
06/29/2023, 10:11 PMprha
06/29/2023, 10:11 PMBeau Albiston
06/29/2023, 10:12 PMBeau Albiston
07/03/2023, 8:10 PMBeau Albiston
07/03/2023, 8:11 PMBeau Albiston
08/26/2023, 3:41 AMdocker.errors.APIError: 500 Server Error for <http+docker://localhost/v1.43/containers/dc1870de17e0e757e80077f57ed07a561ca7d9ced6511a6ed7082defe32a1804/start>: Internal Server Error ("failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: sethostname: invalid argument: unknown
I'm see two names floating around in the docker logs related to the dagster docker agent:
dataorchestration-8086304f9bdf87e07c7d838ac9ba292ad80e89f5-b751bb
dataorchestration-prod-e9dc38
I believe the branch deployment "name" is the first one, and prod
the second -- obviously. Also, to be clear, prod
deployments are presently working fine... dataorchestration-prod-e9dc38
is less than 64 characters. The branch deployment docker host name, on the other hand, is 66 characters.
Anyhoo... any help would be greatly appreciated.daniel
08/28/2023, 4:01 PMBeau Albiston
08/28/2023, 4:29 PMdaniel
08/28/2023, 5:07 PMBeau Albiston
08/30/2023, 5:00 AM