Christian Nuss
04/08/2022, 5:32 PMprefect agent docker start
... is there a way to prevent the container from being removed once its completed?Kevin Kho
04/08/2022, 5:39 PMChristian Nuss
04/08/2022, 5:40 PMdocker create ...
docker run ... --rm
docker run ... --rm
Kevin Kho
04/08/2022, 5:45 PMZanie
04/08/2022, 5:48 PM# By default, auto-remove containers
host_config: Dict[str, Any] = {"auto_remove": True}
auto_remove=False
on the run config host config which gets merged hereif run_config is not None and run_config.host_config:
# The host_config passed from the run_config will overwrite defaults
host_config.update(run_config.host_config)
Christian Nuss
04/08/2022, 5:50 PMZanie
04/08/2022, 5:51 PMChristian Nuss
04/08/2022, 5:54 PMZanie
04/08/2022, 5:55 PMTrue
there.Christian Nuss
04/08/2022, 5:56 PMdict
internallyChristian Nuss
04/08/2022, 6:15 PMhost_config={auto_remove=False}
🤔root@ca683cf00884:/app# prefect version
1.1.0
Kevin Kho
04/08/2022, 6:26 PMhost_config={"auto_remove":False}
? Or were you just typing and that’s not a copy paste?Christian Nuss
04/08/2022, 6:27 PMrequests.exceptions.ConnectionError: HTTPConnectionPool(host='apollo', port=4200): Max retries exceeded with url: /graphql (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x400a087ad0>: Failed to establish a new connection: [Errno 111] Connection refused'))
still very strange that didn't end up in flow logs and the job stays in Submitted state... feels like a bug?
perhaps a race condition when the container is launched, fails, and gets rm'd before prefect agent can gather logs?Kevin Kho
04/08/2022, 6:34 PMZanie
04/08/2022, 6:42 PMapollo
as the API url, are you running your server on the same machine as your agent?Christian Nuss
04/08/2022, 6:42 PM--network
to prefect agent docker start
and got past the issue!Zanie
04/08/2022, 6:43 PMChristian Nuss
04/08/2022, 6:44 PM