Commands able to use this parallelisation are `stop`, `kill` and `rm`.
We're using a backported function from python 3, to allow us to make
the most of a pool of threads without having to write the low level
code for managing this ourselves.
A default value for number of threads is a low enough number so it
shouldn't cause performance problems but if someone knows the
capability of their system and wants to increase it, they can via
an environment variable DEFAULT_MAX_WORKERS
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
Show an error on 'run' when there are legacy one-off containers
(cherry picked from commit 81707ef1ad94403789166d2fe042c8a718a4c748)
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Fix smart recreate when 'image' is changed to something nonexistent
(cherry picked from commit 2bc10db5451ec8e69119997061b0ba5c692feb90)
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Fix bug where duplicate container is leftover after 'up' fails
(cherry picked from commit f42fd6a3ad17cf9688e709bfed1639196777a342)
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Stop 'rm' and 'ps' listing services not defined in the current file
(cherry picked from commit d85688892cb64128093db98d6f03d97ff8bd0e40)
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Validate that service names passed to Project.containers aren't bogus.
(cherry picked from commit bc14c473c97af14ed150160fe84d23fcb05fe4e2)
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Rather than creating a docker client within each test, create one
at setup and make it accessible to the whole class.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
Change in behaviour, `file` key is optional and if not set the
default is to look within the same file as `extends` is defined.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
When specifying a log_driver you want to specify some options for
the logger as per the docker run --log-opt option. The logger
options are key value pairs.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
By allowing the memswap_limit option to be defined we also need to
check that mem_limit is set, you can't have swap without a limit.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
Also warn the user about the one-off containers in the standard error
message about legacy containers.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This top level function is a test helper, so I've moved it into the
config_test file and updated accordingly.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>