Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

service_run_+1 #4688

Closed
bscheshirwork opened this issue Mar 31, 2017 · 3 comments
Closed

service_run_+1 #4688

bscheshirwork opened this issue Mar 31, 2017 · 3 comments

Comments

@bscheshirwork
Copy link

I have a two cronjob for run php service in same time.

Only one run command execute correctly

Cannot create container for service php: Conflict. The container name "/folder_php_run_1" is already in use by container {hashhere}. You have to remove (or rename) that container to be able to reuse that name.
Command exited with non-zero status 1
@shin-
Copy link

shin- commented Mar 31, 2017

That probably means the container is being created between the time we check for availability and the time we actually issue the create command. A solution would be to run those two jobs at slightly different times (a 5 second interval would likely be enough)

@CrabDude
Copy link

I encounter this as well by running docker-compose up foo bar & docker-compose up baz bar programmatically in different tmux tabs. It seems like if creation fails, it should re-run the check and attempt to (wait and) attach.

@yajo
Copy link

yajo commented Sep 22, 2017

Very simple reproduction case:

➤ cat docker-compose.yml 
version: "2.2"
services:
  test:
    image: alpine

➤ docker-compose run --rm test true
Creating network "test_default" with the default driver

➤ docker-compose run --rm test docker-compose run --rm test true &; docker-compose run --rm test true
ERROR: Cannot create container for service test: Conflict. The container name "/test_test_run_1" is already in use by container "76db8705667961966468d66d0667417862ad6edb3fb4c09b95a8ebab4ec36bf8". You have to remove (or rename) that container to be able to reuse that name.
Job 4, 'docker-compose run --rm test do…' has ended

In my case the problem is a CI that triggers parallel jobs based on its internal schedule. It's very sad to have to hack that scheduling just because of this.

@shin- shin- added this to the 1.23.0 milestone Jul 5, 2018
pedrobaeza pushed a commit to Tecnativa/doodba that referenced this issue Feb 3, 2019
Includes workaround for docker/compose#4688.

Fixes !3
pedrobaeza pushed a commit to Tecnativa/doodba that referenced this issue Feb 3, 2019
After building, boot all services that odoo will need to avoid hitting docker/compose#4688 on parallel jobs.

Add `--no-deps` to linters.

Add coverage report.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants