I am not sure if this belongs in the Octopus or Aegir issue queue - so sorry if this is the wrong place.

I have set up a fresh BOA installation from HEAD today and have imported a domain access driven site into the Production Drupal 7.12 platform - I can clone or migrate a site generated from a fresh site off the platform but my custom one shows 2 errors in the log when I try to clone or migrate it.

The first is here

Running: /data/disk/***/tools/drush/drush.php @dev2.server2.iaminawe.com updatedb --backend 2>&1
The external command could not be executed due to an application error.
Bootstrap to phase 0.

And the second is here

Load alias @platform_Drupal712P001 [18.46 sec, 20.66 MB]                                                                                  [notice]
Initializing drush commandfile: provision_cdn [18.47 sec, 20.66 MB]                                                                    [bootstrap]
Initializing drush commandfile: provision_civicrm [18.47 sec, 20.66 MB]                                                                [bootstrap]
Drush command terminated abnormally due to an unrecoverable error.                                                                     [error]
Error: Cannot redeclare domain_bootstrap() (previously declared in
/data/disk/****/distro/001/drupal-7.12-prod/sites/new.server2.***.com/modules/domain/domain.bootstrap.inc:56) in
/data/disk/***/distro/001/drupal-7.12-prod/sites/dev.server2.***.com/modules/domain/domain.bootstrap.inc, line 83
[18.47 sec, 20.66 MB]
Drush was not able to start (bootstrap) the Drupal database.      

It seems to be choking on the clone/migrate when it encounters the domain module in the existing site directory and the clone target directory even though they are different directories. I tried disabling the domain access module and clearing the cache before clone or migrate and it still had the same error.

Any advice with how to deal with this would be appreciated

Thank you
Gregg

Comments

omega8cc’s picture

Project: Octopus » Hostmaster (Aegir)
Version: » 6.x-2.x-dev
Component: Code » Documentation
Category: bug » support

The Cannot redeclare error is pretty much self-explaining. It is a duplicate code (on the fly, during clone or migrate).

This is a common recipe for disaster. Don't use sites/domain/modules space to avoid that. Use sites/all/modules or profiles/profile/modules.

iaminawe’s picture

Thanks for the response and for pointing out what I have been doing wrong.

I always thought that best practice was to contain all sites, modules & libraries within the domain folders and *NOT* use sites/all. I thought that this would make the site more contained and less dependent on the platform it currently sits in and therefore make migration/cloning to other platforms easier when upgrades are released.

Could you point me in the direction of any documentation/discussion on the best way to handle this?

Is this likely to be the case with themes and libraries too? Should they also be in the sites/all folder?

Thank you for putting this issue in the correct queue, for your support and for all the wonderful work you have done with BOA - it really is an incredibly useful set of scripts and your effort is appreciated by many.

Thanks
Gregg

omega8cc’s picture

Title: Unable to clone or migrate a site that uses the domain access modulee » Unable to clone or migrate a site that uses the domain access module

The sites/domain-name space is safe to use only for themes - and only when they don't use any includes with absolute system paths.

Some related docs:

http://community.aegirproject.org/content/best-recipes-disaster-and-how-...
http://community.aegirproject.org/faq#How_do_I_update_a_site-s_or_platfo...

Thanks for your kind words!

iaminawe’s picture

Status: Active » Closed (works as designed)

I can't believe I missed this question (or read this a while back before the question was there :)

How to get all kinds of failed migrate or clone tasks?

Very easy. Simply use sites/domain-name/modules space for your code.

Thanks for pointing it out - I will close out this issue