Skip to content

Conversation

mafredri
Copy link
Member

By stopping Docker, we can hopefully avoid errors like this:

2025-03-26 12:14:53.280+02:00 Error: Error deleting container aa313fca0f72e59d4571afec898392e0ae34567d56c0ad15554c87394d2ca1e1: Error response from daemon: container aa313fca0f72e59d4571afec898392e0ae34567d56c0ad15554c87394d2ca1e1: driver "overlay2" failed to remove root filesystem: unlinkat /var/data/docker/overlay2/2e8e509237c79ebec972cccae9867f3bd6f71d49d4ed68db1b5ba229c3a2ff62/diff/var/lib/docker/overlay2/9c7c4ab0187ece1ca270d146090a8e852808996279d103cb394b2821c472af4c/diff/usr/lib/python3/dist-packages/ansible_collections: directory not empty

By stopping Docker, we can hopefully avoid errors like this:

```
2025-03-26 12:14:53.280+02:00 Error: Error deleting container aa313fca0f72e59d4571afec898392e0ae34567d56c0ad15554c87394d2ca1e1: Error response from daemon: container aa313fca0f72e59d4571afec898392e0ae34567d56c0ad15554c87394d2ca1e1: driver "overlay2" failed to remove root filesystem: unlinkat /var/data/docker/overlay2/2e8e509237c79ebec972cccae9867f3bd6f71d49d4ed68db1b5ba229c3a2ff62/diff/var/lib/docker/overlay2/9c7c4ab0187ece1ca270d146090a8e852808996279d103cb394b2821c472af4c/diff/usr/lib/python3/dist-packages/ansible_collections: directory not empty
```
@mafredri mafredri self-assigned this Mar 26, 2025
Copy link
Member

@matifali matifali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@@ -418,6 +426,10 @@ resource "docker_container" "workspace" {
# CPU limits are unnecessary since Docker will load balance automatically
memory = data.coder_workspace_owner.me.name == "code-asher" ? 65536 : 32768
runtime = "sysbox-runc"
# Ensure the workspace is given time to execute shutdown scripts.
destroy_grace_seconds = 60
stop_timeout = 60
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this make sense as we actually do not stop the container but destroy it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe when a container is destroyed, it is first stopped. See motivation here #6174 which explains why we're setting both destroy_grace_seconds and stop_timeout.

Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@mafredri mafredri merged commit 310f148 into main Mar 26, 2025
29 checks passed
@mafredri mafredri deleted the mafredri/fix-dogfood-shutdown-script branch March 26, 2025 11:17
@github-actions github-actions bot locked and limited conversation to collaborators Mar 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy