From 326e0dc4d72b97ffecdc10855c6e45d220c934f3 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Thu, 21 Jan 2021 15:12:15 -0800 Subject: [PATCH] Set stop_grace_period on nodepool-builder containers By default docker-compose sends a sigterm to containers when they are stopping. It then waitsfor 10 seconds before sending a sigkill. Our nodepool-builder containers are restarted when new images are available and if that happens during a dib build we leak contents into dib_tmp. One theory is that we aren't giving dib enough time to clean up after itself so increase the 10 second period before sending sigkill to 90 seconds. I'm not sure if this will actually help, but it can't hurt much. If the processes die quicker we don't go any slower and if they don't die quicker then we're giving them more time to clean up. Change-Id: Id12cac89cccfc14a8d262e8f8494046df777a80a --- .../roles/nodepool-builder/templates/docker-compose.yaml.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/playbooks/roles/nodepool-builder/templates/docker-compose.yaml.j2 b/playbooks/roles/nodepool-builder/templates/docker-compose.yaml.j2 index 39ba5dd76c..5c02d9f609 100644 --- a/playbooks/roles/nodepool-builder/templates/docker-compose.yaml.j2 +++ b/playbooks/roles/nodepool-builder/templates/docker-compose.yaml.j2 @@ -5,6 +5,7 @@ services: user: nodepool network_mode: host restart: always + stop_grace_period: 90s command: nodepool-builder -f -c /etc/nodepool/nodepool.yaml -l /etc/nodepool/builder-logging.conf --upload-workers 8 privileged: true