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

Deployment doesn't import configuration #1597

Closed
bobbygryzynger opened this issue Jun 5, 2017 · 5 comments
Closed

Deployment doesn't import configuration #1597

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

Comments

@bobbygryzynger
Copy link
Contributor

My system information:

  • Operating system type: Ubunutu
  • Operating system version: 12.04.5
  • BLT version: 8.8.3

When I deploy code on ACE with a change to a configuration file.

I get the following output:

setup:config-import:�[0m
�[00;36m [property] Loading /mnt/www/html/<acquia-site>/blt/project.yml�[0m
�[00;32mblt > target-hook:invoke:�[0m
�[00;36m     [echo] No commands are defined for pre-config-import. Skipping.�[0m
�[00;36m    [drush] Changing working directory to: /mnt/www/html/<acquia-site>/docroot�[0m
�[00;36m    [drush] Executing: /mnt/www/html/<acquia-site>/vendor/bin/drush --include=../drush --uri=<site> --yes --verbose cc drush 2>&1�[0m
�[00;36m    [drush] Include ../drush                                                        [notice]�[0m
�[00;36m    [drush] Executing: mysql --defaults-extra-file=/mnt/tmp/<acquia-site>/drush_mF9LAj --database=<acquia-database> --host=<acquia-host> --port=3306 --silent  < /mnt/tmp/<acquia-site>/drush_aozwJZ�[0m
�[00;36m    [drush] Executing: mysql --defaults-extra-file=/mnt/tmp/<acquia-site>/drush_WaAImX --database=<acquia-database> --host=<acquia-host> --port=3306 --silent  < /mnt/tmp/<acquia-site>/drush_viYJtD�[0m
�[00;36m    [drush] 'drush' cache was cleared.                                             [success]�[0m
�[00;36m    [drush] Command dispatch complete                                               [notice]�[0m
�[00;36m    [drush] Changing working directory back to /mnt/www/html/<acquia-site>/vendor/acquia/blt/phing.�[0m
�[00;36m     [echo] Importing configuration...�[0m
�[00;36m    [drush] Changing working directory to: /mnt/www/html/<acquia-site>/docroot�[0m
�[00;36m    [drush] Executing: /mnt/www/html/<acquia-site>/vendor/bin/drush --include=../drush --uri=<site> --yes --verbose pm-enable config 2>&1�[0m
�[00;36m    [drush] Include ../drush                                                        [notice]�[0m
�[00;36m    [drush] Executing: mysql --defaults-extra-file=/mnt/tmp/<acquia-site>/drush_z9611d --database=<acquia-database> --host=<acquia-host> --port=3306 --silent  < /mnt/tmp/<acquia-site>/drush_LrHOBR�[0m
�[00;36m    [drush] Executing: mysql --defaults-extra-file=/mnt/tmp/<acquia-site>/drush_lhASVW --database=<acquia-database> --host=<acquia-host> --port=3306 --silent  < /mnt/tmp/<acquia-site>/drush_rDWWtA�[0m
�[00;36m    [drush] Loading release_info engine.                                            [notice]�[0m
�[00;36m    [drush] config is already enabled.                                                  [ok]�[0m
�[00;36m    [drush] There were no extensions that could be enabled.                             [ok]�[0m
�[00;36m    [drush] Command dispatch complete                                               [notice]�[0m
�[00;36m    [drush] Changing working directory back to /mnt/www/html/<acquia-site>/vendor/acquia/blt/phing.�[0m
�[00;36m    [drush] Changing working directory to: /mnt/www/html/<acquia-site>/docroot�[0m
�[00;36m    [drush] Executing: /mnt/www/html/<acquia-site>/vendor/bin/drush --include=../drush --uri=<site> --yes --verbose cr 2>&1�[0m
�[00;36m    [drush] Include ../drush                                                        [notice]�[0m
�[00;36m    [drush] Cache rebuild complete.                                                     [ok]�[0m
�[00;36m    [drush] Command dispatch complete                                               [notice]�[0m
�[00;36m    [drush] Changing working directory back to /mnt/www/html/<acquia-site>/vendor/acquia/blt/phing.�[0m
�[00;36m    [drush] Changing working directory to: /mnt/www/html/<acquia-site>/docroot�[0m
�[00;36m    [drush] Executing: /mnt/www/html/<acquia-site>/vendor/bin/drush --include=../drush --uri=<site> --yes --verbose updb 2>&1�[0m
�[00;36m    [drush] Include ../drush                                                        [notice]�[0m
�[00;36m    [drush] Executing: mysql --defaults-extra-file=/mnt/tmp/<acquia-site>/drush_UGLWDk --database=<acquia-database> --host=<acquia-host> --port=3306 --silent  < /mnt/tmp/<acquia-site>/drush_2wehHM�[0m
�[00;36m    [drush] Executing: mysql --defaults-extra-file=/mnt/tmp/<acquia-site>/drush_FiVXAq --database=<acquia-database> --host=<acquia-host> --port=3306 --silent  < /mnt/tmp/<acquia-site>/drush_ClUrCS�[0m
�[00;36m    [drush] No database updates required                                           [success]�[0m
�[00;36m    [drush] Command dispatch complete                                               [notice]�[0m
�[00;36m    [drush] Changing working directory back to /mnt/www/html/<acquia-site>/vendor/acquia/blt/phing.�[0m
�[00;36m [property] Loading /mnt/www/html/<acquia-site>/blt/project.yml�[0m
�[00;32mblt > setup:config-import:core-only:�[0m
�[00;36m    [drush] Changing working directory to: /mnt/www/html/<acquia-site>/docroot�[0m
�[00;36m    [drush] Executing: /mnt/www/html/<acquia-site>/vendor/bin/drush --include=../drush --uri=<site> --yes --verbose cr 2>&1�[0m
�[00;36m    [drush] Include ../drush                                                        [notice]�[0m
�[00;36m    [drush] Cache rebuild complete.                                                     [ok]�[0m
�[00;36m    [drush] Command dispatch complete                                               [notice]�[0m
�[00;36m    [drush] Changing working directory back to /mnt/www/html/<acquia-site>/vendor/acquia/blt/phing.�[0m
�[00;32mblt > setup:update:�

And I expected that the update would be logged in the same manner as it is locally:

blt > setup:config-import:core-only:
    [drush]  Collection  Config       Operation
    [drush]              system.site  update
    [drush] Import the listed configuration changes? (y/n): y
    [drush] Synchronized configuration: update system.site.                             [ok]
    [drush] Finalizing configuration synchronization.                                   [ok]
    [drush] The configuration was imported successfully.                           [success]
    [drush] There are no changes to import.                                             [ok]
    [drush] Cache rebuild complete.                                                     [ok]

My untested assumption is that this has something to do with the verbose flag that is set as part of ace_deploy: blt deploy:update -Denvironment=$target_env -Dblt.verbose=true

@bobbygryzynger
Copy link
Contributor Author

bobbygryzynger commented Jun 5, 2017

Running a config import with the verbose flag locally does include the expected output:

blt > setup:config-import:core-only:
    [drush] Changing working directory to: /Users/<user>/Sites/<site>/docroot
    [drush] Executing: /Users/<user>/Sites/<site>/vendor/bin/drush @<site>.default.local --uri=default --yes --verbose config-import sync 2>&1
    [drush] Loaded alias @<site>.default.local from file                           [notice]
    [drush] /Users/<user>/Sites/<site>/docroot/../drush/site-aliases/aliases.drushrc.php
    [drush] Begin redispatch via drush_invoke_process().                            [notice]
    [drush] Calling proc_open(ssh -o PasswordAuthentication=no -i /Users/<user>/.vagrant.d/insecure_private_key vagrant@<site>.default.local 'drush  --uri=default --yes --verbose --root=/var/www/<site>/docroot  config-import sync 2>&1' 2>&1);
    [drush] Executing: mysql --defaults-extra-file=/tmp/drush_o16ikn --database=<site>_default --host=localhost --port=3306 --silent  < /tmp/drush_4ZWY4O
    [drush] Executing: mysql --defaults-extra-file=/tmp/drush_yaBJQt --database=<site>_default --host=localhost --port=3306 --silent  < /tmp/drush_okJuAV
    [drush]  Collection  Config       Operation
    [drush]              system.site  update
    [drush] Import the listed configuration changes? (y/n): y
    [drush] Synchronized configuration: update system.site.                             [ok]
    [drush] Finalizing configuration synchronization.                                   [ok]
    [drush] The configuration was imported successfully.                           [success]
    [drush] Command dispatch complete                                               [notice]
    [drush] End redispatch via drush_invoke_process().                              [notice]
    [drush] Changing working directory back to /Users/<user>/Sites/<site>/vendor/acquia/blt/phing.
    [drush] Changing working directory to: /Users/<user>/Sites/<site>/docroot
    [drush] Executing: /Users/<user>/Sites/<site>/vendor/bin/drush @<site>.default.local --uri=default --yes --verbose config-import sync 2>&1
    [drush] Loaded alias @<site>.default.local from file                           [notice]
    [drush] /Users/<user>/Sites/<site>/docroot/../drush/site-aliases/aliases.drushrc.php
    [drush] Begin redispatch via drush_invoke_process().                            [notice]
    [drush] Calling proc_open(ssh -o PasswordAuthentication=no -i /Users/<user>/.vagrant.d/insecure_private_key vagrant@<site>.default.local 'drush  --uri=default --yes --verbose --root=/var/www/<site>/docroot  config-import sync 2>&1' 2>&1);
    [drush] Executing: mysql --defaults-extra-file=/tmp/drush_Q5KNu7 --database=<site>_default --host=localhost --port=3306 --silent  < /tmp/drush_JRmxvc
    [drush] Executing: mysql --defaults-extra-file=/tmp/drush_yPN8uX --database=<site>_default --host=localhost --port=3306 --silent  < /tmp/drush_DzaXu2
    [drush] There are no changes to import.                                             [ok]
    [drush] Command dispatch complete                                               [notice]
    [drush] End redispatch via drush_invoke_process().                              [notice]
    [drush] Changing working directory back to /Users/<user>/Sites/<site>/vendor/acquia/blt/phing.
    [drush] Changing working directory to: /Users/<user>/Sites/<site>/docroot
    [drush] Executing: /Users/<user>/Sites/<site>/vendor/bin/drush @<site>.default.local --uri=default --yes --verbose cr 2>&1
    [drush] Loaded alias @<site>.default.local from file                           [notice]
    [drush] /Users/<user>/Sites/<site>/docroot/../drush/site-aliases/aliases.drushrc.php
    [drush] Begin redispatch via drush_invoke_process().                            [notice]
    [drush] Calling proc_open(ssh -o PasswordAuthentication=no -i /Users/<user>/.vagrant.d/insecure_private_key vagrant@<site>.default.local 'drush  --uri=default --yes --verbose --root=/var/www/<site>/docroot  cache-rebuild 2>&1' 2>&1);
    [drush] Cache rebuild complete.                                                     [ok]
    [drush] Command dispatch complete                                               [notice]
    [drush] End redispatch via drush_invoke_process().                              [notice]
    [drush] Changing working directory back to /Users/<user>/Sites/<site>/vendor/acquia/blt/phing.
blt > setup:update

So this doesn't seem to be entirely a problem with the verbose flag being set.

@bobbygryzynger
Copy link
Contributor Author

Actually, I'm finding that this isn't simply an issue with the logging missing.

The configuration is not being imported as expected. If I try to import with drush, I see that my change is un-imported:

$ drush @<site>.remote cim vcs
 Collection  Config       Operation 
             system.site  update
Import the listed configuration changes? (y/n):

@bobbygryzynger bobbygryzynger changed the title Deployment missing configuration management logging Deployment doesn't import configuration Jun 5, 2017
@grasmash grasmash added the Bug Something isn't working label Jun 5, 2017
@bobbygryzynger
Copy link
Contributor Author

Some additional information here. If I ssh into the server and run the import command alone, this works as expected:

vendor/bin/blt setup:config-import -Ddrush.alias=<site>.dev
blt > setup:config-import:
blt > target-hook:invoke:
     [echo] No commands are defined for pre-config-import. Skipping.
    [drush] 'drush' cache was cleared.                                           [success]
     [echo] Importing configuration...
    [drush] config is already enabled.                                           [ok]
    [drush] There were no extensions that could be enabled.                      [ok]
    [drush] Cache rebuild complete.                                              [ok]
    [drush] No database updates required                                         [success]
blt > setup:config-import:core-only:
    [drush]  Collection  Config       Operation
    [drush]              system.site  update
    [drush] Import the listed configuration changes? (y/n): y
    [drush] Synchronized configuration: update system.site.                      [ok]
    [drush] Finalizing configuration synchronization.                            [ok]
    [drush] The configuration was imported successfully.                         [success]
    [drush] There are no changes to import.                                      [ok]
    [drush] Cache rebuild complete.                                              [ok]

BUILD FINISHED; 10.9952 seconds

@bobbygryzynger
Copy link
Contributor Author

bobbygryzynger commented Jun 5, 2017

I've been able to trace this issue down to this line of the verbose output:

[Available] Unable to find /mnt/www/html/<ace-site>/docroot/${cm.core.dirs.vcs.path}/core.extension.yml to set property 

Is there some configuration I'm missing here? build.yml only includes:

cm:
  dirs:
    sync:
      path: ${cm.core.path}/default

If I set this variable in my project.yml, then the deployment works as expected:

cm:
  core:
    dirs:
      vcs:
        path: ${cm.core.dirs.sync.path}

But is it expected that I should need to set this value in this version of BLT (8.8.3)? I hadn't needed to in the 8.7.x series.

@grasmash grasmash added the 8.8.x label Jun 6, 2017
@grasmash
Copy link
Contributor

grasmash commented Jun 6, 2017

build.yml in 8.8.3 contains the following:
https://github.com/acquia/blt/blob/8.8.3/phing/build.yml


cm:
  # Possible values: core-only, config-split, features, none.
  strategy: config-split
  core:
    # The parent directory for configuration directories, relative to the docroot.
    path: ../config
    # The default config key to use for imports. This is the key used in Drupal's global $config_directories variable.
    # E.g., $config_directories['sync']. It must have a corresponding key in cm.core.dirs. E.g., `cm.core.dirs.sync`.
    key: sync
    # A different config key is used by the deploy:update step, which is executed on Acquia Cloud.
    deploy-key: vcs
    dirs:
      # Corresponding values are defined in default.local.settings.php.
      sync:
        path: ${cm.core.path}/default

This is indeed missing cm.core.dirs.vcs.path.

@grasmash grasmash added the 8.9.x label Jun 6, 2017
grasmash added a commit to grasmash/bolt that referenced this issue Jun 6, 2017
@grasmash grasmash self-assigned this Jun 6, 2017
grasmash added a commit to grasmash/bolt that referenced this issue Jun 6, 2017
grasmash added a commit to grasmash/bolt that referenced this issue Jun 6, 2017
grasmash added a commit to grasmash/bolt that referenced this issue Jun 6, 2017
grasmash added a commit to grasmash/bolt that referenced this issue Jun 6, 2017
grasmash added a commit to grasmash/bolt that referenced this issue Jun 6, 2017
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

2 participants