terra-ops / terra-cli

The Terra Command Line Interface
http://terra.readthedocs.org
GNU General Public License v2.0
48 stars 17 forks source link

Process timeout for docker commands. #12

Closed xendk closed 9 years ago

xendk commented 9 years ago

Running docker might take a while, so the process timeout should be increased (or completely disabled):

~/dev/terra-app$ ./terra e:en terra_test first_env
DOCKER > Creating terratestfirstenv_database_1...
DOCKER > Pulling image mariadb:latest...
DOCKER > Pulling repository mariadb
DOCKER > 
DOCKER > 
DOCKER > 
DOCKER > 
DOCKER > 
DOCKER > 
DOCKER > 
DOCKER > 
DOCKER > 
DOCKER > 
DOCKER > 
DOCKER > 
DOCKER > 
DOCKER > Status: Downloaded newer image for mariadb:latest
DOCKER > Creating terratestfirstenv_app_1...
DOCKER > Pulling image terra/drupal:latest...
DOCKER > Pulling repository terra/drupal
DOCKER > 
DOCKER > 

  [Symfony\Component\Process\Exception\ProcessTimedOutException]          
  The process "docker-compose up -d" exceeded the timeout of 60 seconds.  

environment:enable [app_name] [environment_name]

~/dev/terra-app$ 

Either by passing null for timeout in the Process constructor or calling Process::setTimeout().

jonpugh commented 9 years ago

Excellent, thanks for the issue report. I set it to Null, I can't see any reason not to let it run as long as it needs to, especially since the plan is to support more complex docker-compose projects, we would need to support downloading a lot more images.

xendk commented 9 years ago

Good, good. Personally I'd prefer using setTimeout() as it's more verbose about the intention, and looks better than three null arguments.