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
Christian Nuss
04/08/2022, 5:40 PMdocker create ...
docker run ... --rmChristian Nuss
04/08/2022, 5:41 PMdocker run ... --rmKevin Kho
Zanie
# By default, auto-remove containers
host_config: Dict[str, Any] = {"auto_remove": True}Zanie
auto_remove=False on the run config host config which gets merged hereZanie
if 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
Zanie
Christian Nuss
04/08/2022, 5:54 PMZanie
Zanie
True there.Christian Nuss
04/08/2022, 5:56 PMZanie
dict internallyChristian Nuss
04/08/2022, 6:15 PMhost_config={auto_remove=False} 🤔Christian Nuss
04/08/2022, 6:16 PMroot@ca683cf00884:/app# prefect version
1.1.0Christian Nuss
04/08/2022, 6:18 PMChristian Nuss
04/08/2022, 6:20 PMChristian Nuss
04/08/2022, 6:21 PMKevin Kho
host_config={"auto_remove":False}
? Or were you just typing and that’s not a copy paste?Christian Nuss
04/08/2022, 6:27 PMChristian Nuss
04/08/2022, 6:27 PMChristian Nuss
04/08/2022, 6:31 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
Kevin Kho
Zanie
Zanie
apollo as the API url, are you running your server on the same machine as your agent?Christian Nuss
04/08/2022, 6:42 PMChristian Nuss
04/08/2022, 6:43 PM--network to prefect agent docker start and got past the issue!Zanie
Christian Nuss
04/08/2022, 6:44 PMChristian Nuss
04/08/2022, 6:44 PM