Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

blt doctor only returns error output #1590

Closed
bobbygryzynger opened this issue Jun 3, 2017 · 4 comments
Closed

blt doctor only returns error output #1590

bobbygryzynger opened this issue Jun 3, 2017 · 4 comments
Assignees
Labels
Bug Something isn't working

Comments

@bobbygryzynger
Copy link
Contributor

bobbygryzynger commented Jun 3, 2017

My system information:

  • Operating system type: macOS
  • Operating system version: 10.12.5
  • BLT version: 8.9.x

When I run this command:

blt doctor

I get the following output:

$ blt doctor
Drupal VM was detected. Running blt doctor inside of VM...
Executing command cd /var/www/{{ vagrant_machine_name }} && /var/www/{{ vagrant_machine_name }}/vendor/bin/drush cc drush && /var/www/{{ vagrant_machine_name }}/vendor/bin/drush --include=/var/www/{{ vagrant_machine_name }}/vendor/acquia/blt/drush blt-doctor -r /var/www/{{ vagrant_machine_name }}/docroot inside of Drupal VM...
[warning] The vagrant-exec plugin is not installed! Attempting to install it...
[Exec] Running vagrant plugin install vagrant-exec
Installing the 'vagrant-exec' plugin. This can take a few minutes...
Installed the plugin 'vagrant-exec (0.5.2)'!
[Exec] Done in 10.067s
bash: line 0: cd: /var/www/{{: No such file or directory
Attempting to run doctor on host machine...
[Acquia\Blt\Robo\Tasks\DrushTask]  The drush command 'blt-doctor' could not be found.  Run `drush           [error]
cache-clear drush` to clear the commandfile cache if you have
installed new extensions. 
[Acquia\Blt\Robo\Tasks\DrushTask]  Exit code 1 
[warning] Unable to run the doctor using alias '@<site>.local'. Trying with '@self'...
[warning] Unable to run the doctor using alias '@self'. Trying without alias...
[error]   

And I expected that the command would run successfully after running drush cc drush and verifying the local site is reachable:

$ drush @<site>.local status
 Drupal version                  :  8.3.2                                                                                                                                              
 Site URI                        :  http://<site>.local                                                                                                                               
 Database driver                 :  mysql                                                                                                                                              
 Database hostname               :  localhost                                                                                                                                          
 Database port                   :  3306                                                                                                                                               
 Database username               :  admin                                                                                                                                              
 Database name                   :  <site>                                                                                                                                            
 Database                        :  Connected                                                                                                                                          
 Drupal bootstrap                :  Successful                                                                                                                                         
 Drupal user                     :                                                                                                                                                     
 Default theme                   :  bartik                                                                                                                                             
 Administration theme            :  seven                                                                                                                                              
 PHP executable                  :  /usr/bin/php                                                                                                                                       
 PHP configuration               :  /etc/php/5.6/cli/php.ini                                                                                                                           
 PHP OS                          :  Linux                                                                                                                                              
 Drush script                    :  /var/www/<site>/vendor/drush/drush/drush.php                                                                                                      
 Drush version                   :  8.1.10                                                                                                                                             
 Drush temp directory            :  /tmp                                                                                                                                               
 Drush configuration             :  /var/www/<site>/drush/drushrc.php                                                                                                                 
 Drush alias files               :  /var/www/<site>/docroot/../drush/site-aliases/aliases.drushrc.php /var/www/<site>/docroot/../drush/site-aliases/example.acsf.aliases.drushrc.php 
                                    /var/www/<site>/docroot/../drush/site-aliases/example.local.aliases.drushrc.php                                                                   
 Install profile                 :  standard                                                                                                                                           
 Drupal root                     :  /var/www/<site>/docroot                                                                                                                           
 Drupal Settings File            :  sites/default/settings.php                                                                                                                         
 Site path                       :  sites/default                                                                                                                                      
 File directory path             :  sites/default/files                                                                                                                                
 Private file directory path     :  /var/www/<site>/files-private                                                                                                                     
 Temporary file directory path   :  /tmp                                                                                                                                               
 Sync config path                :  /var/www/<site>/config/default                                                                                                                    
@grasmash grasmash added the Bug Something isn't working label Jun 5, 2017
@grasmash
Copy link
Contributor

grasmash commented Jun 5, 2017

How much of that output is manually redacted? Is Executing command cd /var/www/{{ vagrant_machine_name }} the literal string that's being outputted?

I ask because it looks like {{ vagrant_machine_name }} is not being replaced with real value, which would cause BLT to fail. BLT isn't able to parse ansible variable place holders. Perhaps we need a better way for BLT to find the Drupal docroot within the VM.

What is the value of vagrant_synced_folders.0.destination in box/config.yml?

@bobbygryzynger
Copy link
Contributor Author

@grasmash the output above is the literal output and yeah, the issue is how I have the box configured:

vagrant_synced_folders:
  - local_path: .
    destination: "/var/www/{{ vagrant_machine_name }}"
    type: nfs

@grasmash
Copy link
Contributor

grasmash commented Jun 5, 2017

For the time being, I'm just going to have BLT emit an informative warning if you're using Ansible variable placeholders here. I'd accept a PR that introduces Ansible variable resolution, but I'm going to stick with MVP for now.

grasmash added a commit to grasmash/bolt that referenced this issue Jun 5, 2017
@grasmash grasmash self-assigned this Jun 5, 2017
grasmash added a commit to grasmash/bolt that referenced this issue Jun 5, 2017
@bobbygryzynger
Copy link
Contributor Author

@grasmash that's fine. This should be an easy enough fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants