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

drush make times out #64

Closed badri closed 8 years ago

badri commented 8 years ago

When a new app is created with terra build hooks, the enable step times out in drush make.

$ terra app:add d7 git@github.com:jonpugh/terra-drush-make --description="agile deploy"
Host? [manomadhu] localhost
 Name:        d7                                      
 Description: agile deploy                            
 Repo:        git@github.com:jonpugh/terra-drush-make 
 Host:        localhost                               
App saved

When enabling the above app,

$ terra environment:add d7 local ~/Apps/d7-local -v 3
Cloning into '/home/lakshmi/Apps/d7-local'...
* master
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working directory clean
Beginning to build drupal.make.                                      [ok]
drupal-7.35 downloaded.                                              [ok]
Environment saved to registry.
Enable this environment? [y\N] y
DOCKER > Recreating d7local_database_1...
DOCKER > Recreating d7local_app_1...
DOCKER > Recreating d7local_load_1...
DOCKER > Recreating d7local_drush_1...
Environment enabled!  Available at http://d7.local.manomadhu and http://localhost:32776
Drush alias file created at /home/lakshmi/.drush/d7.aliases.drushrc.php
Wrote drush alias file to /home/lakshmi/.drush/d7.aliases.drushrc.php
Use drush @d7.local to access the site.

Running ENABLE app hook...
 drush @d7.local site-install -y
drush @d7.local uli

The authenticity of host '[localhost]:32777 ([127.0.0.1]:32777)' can't be established.
ECDSA key fingerprint is 6e:90:a0:33:fa:3f:19:29:a4:88:15:ed:dd:72:ae:f1.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[localhost]:32777' (ECDSA) to the list of known hosts.
You are about to DROP all tables in your 'drupal' database. Do you want to continue? (y/n): y

  [Symfony\Component\Process\Exception\ProcessTimedOutException]  
  The process "drush @d7.local site-install -y                    
  drush @d7.local uli                                             
  " exceeded the timeout of 60 seconds.                           

Exception trace:
 () at /usr/share/terra/vendor/symfony/process/Process.php:1226
 Symfony\Component\Process\Process->checkTimeout() at /usr/share/terra/vendor/symfony/process/Process.php:356
 Symfony\Component\Process\Process->wait() at /usr/share/terra/vendor/symfony/process/Process.php:210
 Symfony\Component\Process\Process->run() at /usr/share/terra/src/terra/Command/Environment/EnvironmentEnable.php:95
 terra\Command\Environment\EnvironmentEnable->execute() at /usr/share/terra/vendor/symfony/console/Command/Command.php:259
 Symfony\Component\Console\Command\Command->run() at /usr/share/terra/src/terra/Command/Environment/EnvironmentAdd.php:150
 terra\Command\Environment\EnvironmentAdd->execute() at /usr/share/terra/vendor/symfony/console/Command/Command.php:259
 Symfony\Component\Console\Command\Command->run() at /usr/share/terra/vendor/symfony/console/Application.php:878
 Symfony\Component\Console\Application->doRunCommand() at /usr/share/terra/vendor/symfony/console/Application.php:195
 Symfony\Component\Console\Application->doRun() at /usr/share/terra/src/terra/Console/Application.php:70
 terra\Console\Application->doRun() at /usr/share/terra/vendor/symfony/console/Application.php:126
 Symfony\Component\Console\Application->run() at /usr/share/terra/bin/terra:23

environment:add [--enable ENABLE] [--] [<app_name>] [<environment_name>] [<path>] [<document_root>]

Drush make almost always takes more than 60 seconds.

$ time drush @d7.local site-install -y
You are about to DROP all tables in your 'drupal' database. Do you want to continue? (y/n): y
Starting Drupal installation. This takes a while. Consider using the --notify global option.                                                      [ok]
Installation complete.  User name: admin  User password: poch3K8Nmq                                                                               [ok]

real    2m18.254s
user    0m0.113s
sys 0m0.037s

I'd suggest setting the timeout of the enable process to null.

jonpugh commented 8 years ago

Merged your PR. Thanks!