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

DT-595: When provisioning a new multisite, Acquia code hooks will always fail #3277

Closed
bkosborne opened this issue Dec 3, 2018 · 7 comments · Fixed by #3831
Closed

DT-595: When provisioning a new multisite, Acquia code hooks will always fail #3277

bkosborne opened this issue Dec 3, 2018 · 7 comments · Fixed by #3831
Labels
Bug Something isn't working

Comments

@bkosborne
Copy link
Contributor

bkosborne commented Dec 3, 2018

Adding a new multisite involves the following:

  • Add the site settings folder to dev repo and commit
  • Deploy build artifact to host (Acquia)
  • Acquia's post code deploy hooks run as deploy artifact is deployed, which check if config needs to be imported or db updates be run for each multisite
  • Command fails when it reaches the new multisite, because the site hasn't yet been installed, so drush cache rebuild errors out indicating a DB table is missing
  • Acquia reports task as failed

Any workaround for this? I think we need a way for BLT to understand that a site's may not be installed yet (database has no tables) and to skip it when running drupal:config:import?

@mikemadison13 mikemadison13 added the Bug Something isn't working label Dec 3, 2018
@mikemadison13
Copy link
Contributor

@lcatlett is this something on your radar of existing multi-site issues or is this a new one?

@lcatlett
Copy link
Contributor

lcatlett commented Dec 5, 2018

this was fixed in #3231 and #3166. You might also want to validate that Cloud Hooks have been refreshed via blt setup:cloud-hooks and that Drush has been updated to the latest release, as there have been a number changes to host detection and mapping the correct multisite path which might otherwise result in drush losing the site context on older versions of drush 9.

@bkosborne - After updating to blt 9.2.x and provisioning a new multisite per the docs
in https://blt.readthedocs.io/en/latest/multisite/#acquia-cloud-setup do you still have this issue?

@lcatlett
Copy link
Contributor

In reviewing other issues, I noticed that @bkosborne actually reported this issue in #2814, which I fixed in #2997 but the revert in #3028 re-introduced it. The solution proposed (18aab15) enables the dynamic creation of databases on ODE environments as well as site installs through BLT so I'll open a PR

@bkosborne
Copy link
Contributor Author

Hi - Sorry for the delay. I have this on my list to test and provide more feedback, just haven't found the time yet.

@bkosborne
Copy link
Contributor Author

bkosborne commented Dec 31, 2018

@lcatlett The commit you linked to (18aab15) should indeed fix the original issue I reported (#2814), but I don't know how it would fix this particular issue. The problem I reported here is that drush cr command fails when it reaches a multisite that has not yet been installed and thus it's database (which already exists) doesn't have any tables in it. Drush craps out.

@danepowell danepowell added this to the 10.1.0 milestone Mar 21, 2019
@danepowell danepowell modified the milestones: 10.1.0, 10.2.0 May 30, 2019
@richardbporter
Copy link
Contributor

I would love to see a fix for this and would be willing to help. Is there a clear direction the maintainers want to go?

@richardbporter
Copy link
Contributor

One potential workaround for this would be to:

  • Explicitly define multisites in BLT configuration
  • Deploy the new site code
  • Install the site in the environment(s)
  • Add the multisite to the BLT configuration

I think Cloud Hooks would work after that but it is an extra step that is a bit annoying. Its nice to have BLT dynamically get the list of multisites.

https://docs.acquia.com/blt/tech-architect/multisite/#add-a-multisite-array

@danepowell danepowell changed the title When provisioning a new multisite, Acquia code hooks will always fail DT-595: When provisioning a new multisite, Acquia code hooks will always fail Aug 28, 2019
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
5 participants