moby / moby/swarmkit

Container left in Created state

Open
#2,273 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
3.7k
Forks
676
Avg merge
4d 9h
Merged PRs (30d)
6

Description

Steps to reproduce:
Run this script a couple of times:

#!/bin/bash
docker network create -d overlay --subnet 192.168.23.0/24 --opt com.docker.network.driver.mtu=931 lab-network
docker stack deploy -c docker-compose-bad.yml test
sleep 300
docker stack deploy -c docker-compose.yml test

Results:

7c9cd869d90b        alpine:latest       "op"                17 minutes ago       Created                                 test_srv2.12.tdqwor9o8v8sl6eda2hvxj5kj                                                                                                                 
ebad82ebb9b5        alpine:latest       "op"                17 minutes ago       Created                                 test_srv2.5.an8y551b5c99e1u7kdcumeguz                                                                                                                  
2394cc396fdc        alpine:latest       "op"                17 minutes ago       Created                                 test_srv2.19.xsnwe66tb942wsd0h1z2vgclx                                                                                                                 
830875b700b9        alpine:latest       "op"                17 minutes ago       Created                                 test_srv2.13.y63yxihwy76qdlzyuvnewffrj                                                                                                                 
bab7046702e8        alpine:latest       "op"                17 minutes ago       Created                                 test_srv1.10.qrg8h25aoh9cj71hiuqb2xwce                                                                                                                 
60060c99e02d        alpine:latest       "op"                17 minutes ago       Created                                 test_srv1.9.hplrcfayt7mes8k2jxosnifnl                                                                                                                  
0113d15d3900        alpine:latest       "op"                17 minutes ago       Created                                 test_srv1.21.it7nhycc4jkplox60700zzepu                                                                                                                 
868e7c243b80        alpine:latest       "op"                17 minutes ago       Created                                 test_srv2.8.wywzsd4o6nu8yzg2yk0vpmkla                                                                                                                  
62ecd798d1e5        alpine:latest       "op"                17 minutes ago       Created                                 test_srv2.9.g1ygzxgs8wd5gwbv474zwll5g

These containers are never deleted

files can be found here: https://github.com/bzcnsh/temprepo01

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the provided Bash script and the referenced docker-compose-bad.yml and docker-compose.yml files. Trace the swarmkit task and container cleanup path for services replaced by the second stack deployment. Done means the obsolete containers no longer remain in the Created state after repeated deployments.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
devops, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.