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

Race condition exists in starting two fpm containers #110

Closed
davidalger opened this issue Feb 29, 2020 · 0 comments
Closed

Race condition exists in starting two fpm containers #110

davidalger opened this issue Feb 29, 2020 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@davidalger
Copy link
Collaborator

There is apparently a race condition which affects Docker when simultaneously starting two different containers mounting the same host path on macOS. Every now and then when creating an environment I'll see the following (which is resolved by simply running env up -d again):

==> [16:15:37] Initializing environment
Pulling redis         ... done
Pulling mailhog       ... done
Pulling rabbitmq      ... done
Pulling elasticsearch ... done
Pulling db            ... done
Pulling php-fpm       ... done
Pulling nginx         ... done
Pulling varnish       ... done
Pulling php-debug     ... done
mailhog uses an image, skipping
rabbitmq uses an image, skipping
db uses an image, skipping
php-debug uses an image, skipping
php-fpm uses an image, skipping
nginx uses an image, skipping
varnish uses an image, skipping
elasticsearch uses an image, skipping
redis uses an image, skipping
Creating network "exampleproject_default" with the default driver
Creating volume "exampleproject_dbdata" with default driver
Creating volume "exampleproject_esdata" with default driver
Creating volume "exampleproject_appdata" with default driver
Creating exampleproject_elasticsearch_1 ... done
Creating exampleproject_db_1            ... done
Creating exampleproject_mailhog_1       ... done
Creating exampleproject_rabbitmq_1      ... done
Creating exampleproject_redis_1         ... done
Creating exampleproject_php-fpm_1       ... error
Creating exampleproject_php-debug_1     ... 

Creating exampleproject_php-debug_1     ... done

ERROR: for php-fpm  Cannot create container for service php-fpm: failed to mkdir /var/lib/docker/volumes/exampleproject_appdata/_data/pub: mkdir /var/lib/docker/volumes/exampleproject_appdata/_data/pub: file exists
ERROR: Encountered errors while bringing up the project.
ERROR: Command `warden env up -d` on line 188 failed with exit code 1

This may be solvable by making php-debug depend on php-fpm to prevent it from starting simultaneously.

@davidalger davidalger added the bug Something isn't working label Feb 29, 2020
@davidalger davidalger added this to the Warden 0.2.5 milestone Feb 29, 2020
@davidalger davidalger modified the milestones: Warden 0.2.5, Warden 0.4.0 Mar 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant