This bug was originally reported on the community site here:

Hi everyone, I am trying to get AEgir working on my VPS. It runs on Debian 7, AEgir has been installed via auto install (apt-get install aegir2). After install, i patched the RC2 of aegir as stated in the current release notes.

1/ I create new platform, and a new site (example.com) in the platform.

2/ I clone the example.com to example2.com, into the same platform.

If I verify both sites (example.com and example2.com), they both show the same database name.

Is this how it should be? Or am I missing something very obvious?

It seems to cause troubles later on, when I try to migrate the clone (in order to test out new platform). And once that fails, the original copy of the site (its database) is also damaged.

I would imagine that the original and clone are completely separate - as stated in the manual:

"Is there any relationship between the original and cloned site?

Currently there is no real relationship between the original site and any of its clones."

Could someone point me in the right direction please?

Any help is very appreciated.

Martin

I have since replicated it on the latest 6.x-2.x. It seems pretty clear that this is related to #2055949: Migrate drops wrong database when domain name changes. I'm investigating now.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ergonlogic’s picture

While the vhosts have the proper credentials, the drushrc.php's for the two sites both have the new site's credentials:

$ head ../platforms/drupal-7.23/sites/test0.local/drushrc.php

$options['db_type'] = 'mysql';
$options['db_host'] = 'localhost';
$options['db_port'] = '3306';
$options['db_passwd'] = '3fodXnybGk';
$options['db_name'] = 'test1local';
$options['db_user'] = 'test1local';
$options['installed'] = true;

$ head ../platforms/d1/sites/test1.local/drushrc.php

$options['db_type'] = 'mysql';
$options['db_host'] = 'localhost';
$options['db_port'] = '3306';
$options['db_passwd'] = '3fodXnybGk';
$options['db_name'] = 'test1local';
$options['db_user'] = 'test1local';
$options['packages'] = array (

Below is a task log for a clone task. Note that right at the end, we see:

Undefined property: stdClass::$db_name hosting_site.nodeapi.inc:156
Task starts processing
Returned from hook drush_hosting_task_validate
Calling hook drush_hosting_alias_pre_hosting_task
Returned from hook drush_hosting_alias_pre_hosting_task
Calling hook drush_hosting_clone_pre_hosting_task
Undefined variable: site hosting_clone.drush.inc:23
Trying to get property of non-object hosting_clone.drush.inc:23
Returned from hook drush_hosting_clone_pre_hosting_task
Calling hook drush_hosting_migrate_pre_hosting_task
Returned from hook drush_hosting_migrate_pre_hosting_task
Calling hook drush_hosting_package_pre_hosting_task
Returned from hook drush_hosting_package_pre_hosting_task
Calling hook drush_hosting_site_pre_hosting_task
Returned from hook drush_hosting_site_pre_hosting_task
Calling hook drush_hosting_task
Loaded alias @test0.local from file /var/aegir/.drush/test0.local.alias.drushrc.php
Loading drushrc "/var/aegir/platforms/drupal-7.23/sites/test0.local/drushrc.php" into "site" scope.
Backend invoke: /usr/bin/php -d magic_quotes_gpc=Off -d magic_quotes_runti... (Expand)
/usr/bin/php -d magic_quotes_gpc=Off -d magic_quotes_runtime=Off -d magic_... (Expand)
Bootstrap to phase 0.
Bootstrap to phase 1.
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Initialized Drupal 7.23 root directory at /var/aegir/platforms/drupal-7.23
Found command: provision-clone (commandfile=provision)
Loaded alias @server_localhost from file /var/aegir/.drush/server_localhost.alias.drushrc.php
Loaded alias @server_master from file /var/aegir/.drush/server_master.alias.drushrc.php
Loading apache driver for the http service
Loading mysql driver for the db service
Loaded alias @platform_Drupal723 from file /var/aegir/.drush/platform_Drupal723.alias.drushrc.php
Including /var/aegir/.drush/provision/db/clone.provision.inc
Including /var/aegir/.drush/provision/platform/clone.provision.inc
Calling hook drush_db_provision_clone_validate
Returned from hook drush_db_provision_clone_validate
Calling hook drush_provision_drupal_provision_clone_validate
Drush bootstrap phase : _drush_bootstrap_drupal_site()
Initialized Drupal site test0.local at sites/test0.local
Cache HIT cid: 6.0-dev-install_profile-c53070057c989c451c359cf077c0740d
Cache HIT cid: 6.0-dev-commandfiles-2-4883ecb9eea4087b33e2e1584481cec1
Returned from hook drush_provision_drupal_provision_clone_validate
Calling hook drush_provision_drupal_pre_provision_clone
Including /var/aegir/.drush/provision/db/backup.provision.inc
Including /var/aegir/.drush/provision/platform/backup.provision.inc
Calling hook drush_provision_drupal_provision_backup_validate
Drush bootstrap phase : _drush_bootstrap_drupal_configuration()
Returned from hook drush_provision_drupal_provision_backup_validate
Calling hook drush_db_pre_provision_backup
Returned from hook drush_db_pre_provision_backup
Calling hook drush_provision_drupal_provision_backup
Adding sites directory to /var/aegir/backups/test0.local-20130826.183005.tar.gz
Temporarily uncloaking database credentials for backup
Template loaded: /var/aegir/.drush/provision/Provision/Config/Drupal/provision_drupal_settings.tpl.php
Changed permissions of /var/aegir/platforms/drupal-7.23/sites/test0.local/settings.php to 640
Generated config Drupal settings.php file
Changed permissions of /var/aegir/platforms/drupal-7.23/sites/test0.local/settings.php to 440
Change group ownership of /var/aegir/platforms/drupal-7.23/sites/test0.local/settings.php to www-data
Platforms path /var/aegir/platforms exists.
Platforms ownership of /var/aegir/platforms has been changed to aegir.
Platforms permissions of /var/aegir/platforms have been changed to 755.
Platforms path /var/aegir/platforms is writable.
Re-cloaking database credentials after backup
Template loaded: /var/aegir/.drush/provision/Provision/Config/Drupal/provision_drupal_settings.tpl.php
Changed permissions of /var/aegir/platforms/drupal-7.23/sites/test0.local/settings.php to 640
Generated config Drupal settings.php file
Changed permissions of /var/aegir/platforms/drupal-7.23/sites/test0.local/settings.php to 440
Change group ownership of /var/aegir/platforms/drupal-7.23/sites/test0.local/settings.php to www-data
Platforms path /var/aegir/platforms exists.
Platforms ownership of /var/aegir/platforms has been changed to aegir.
Platforms permissions of /var/aegir/platforms have been changed to 755.
Platforms path /var/aegir/platforms is writable.
Returned from hook drush_provision_drupal_provision_backup
Calling hook drush_db_post_provision_backup
Deleted mysql dump from sites directory
Returned from hook drush_db_post_provision_backup
Calling hook drush_provision_drupal_post_provision_backup
Backed up site up to /var/aegir/backups/test0.local-20130826.183005.tar.gz.
Client backup directory for admin path /var/aegir/clients/admin/backups has been created.
Client backup directory for admin ownership of /var/aegir/clients/admin/backups has been changed to aegir.
Client backup directory for admin permissions of /var/aegir/clients/admin/backups have been changed to 750.
Client backup directory for admin path /var/aegir/clients/admin/backups is writable.
Created symlink /var/aegir/clients/admin/backups/test0.local-20130826.183005.tar.gz to /var/aegir/backups/test0.local-20130826.183005.tar.gz
Returned from hook drush_provision_drupal_post_provision_backup
Template loaded: /var/aegir/.drush/provision/Provision/Config/Drushrc/provision_drushrc_site.tpl.php
Changed permissions of /var/aegir/platforms/drupal-7.23/sites/test0.local/drushrc.php to 640
Generated config Site Drush configuration file
Changed permissions of /var/aegir/platforms/drupal-7.23/sites/test0.local/drushrc.php to 440
Platforms path /var/aegir/platforms exists.
Platforms ownership of /var/aegir/platforms has been changed to aegir.
Platforms permissions of /var/aegir/platforms have been changed to 755.
Platforms path /var/aegir/platforms is writable.
Command dispatch complete
Returned from hook drush_provision_drupal_pre_provision_clone
Calling hook drush_provision_drupal_provision_clone
Loaded alias @platform_d1 from file /var/aegir/.drush/platform_d1.alias.drushrc.php
Backend invoke: /usr/bin/php -d magic_quotes_gpc=Off -d magic_quotes_runti... (Expand)
/usr/bin/php -d magic_quotes_gpc=Off -d magic_quotes_runtime=Off -d magic_... (Expand)
Bootstrap to phase 0.
Bootstrap to phase 0.
Found command: provision-save (commandfile=provision)
Cache MISS cid: 6.0-dev-alias-path--8a241734318d2b5970a5a83f181cd1df
Loaded alias @server_localhost from file /var/aegir/.drush/server_localhost.alias.drushrc.php
Loaded alias @server_master from file /var/aegir/.drush/server_master.alias.drushrc.php
Loading apache driver for the http service
Loading mysql driver for the db service
Loaded alias @platform_d1 from file /var/aegir/.drush/platform_d1.alias.drushrc.php
Calling hook drush_provision_save
Template loaded: /var/aegir/.drush/provision/Provision/Config/Drushrc/provision_drushrc_alias.tpl.php
Generated config Drush configuration file
Changed permissions of /var/aegir/.drush/test1.local.alias.drushrc.php to 440
Returned from hook drush_provision_save
Command dispatch complete
Peak memory usage was 8.87 MB
Cache MISS cid: 6.0-dev-alias-path--8a241734318d2b5970a5a83f181cd1df
Cache SET cid: 6.0-dev-alias-path--8a241734318d2b5970a5a83f181cd1df
Loaded alias @test1.local from file /var/aegir/.drush/test1.local.alias.drushrc.php
Backend invoke: /usr/bin/php -d magic_quotes_gpc=Off -d magic_quotes_runti... (Expand)
/usr/bin/php -d magic_quotes_gpc=Off -d magic_quotes_runtime=Off -d magic_... (Expand)
Bootstrap to phase 0.
Bootstrap to phase 1.
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Initialized Drupal 7.23 root directory at /var/aegir/platforms/d1
Found command: provision-deploy (commandfile=provision)
Loaded alias @server_localhost from file /var/aegir/.drush/server_localhost.alias.drushrc.php
Loaded alias @server_master from file /var/aegir/.drush/server_master.alias.drushrc.php
Loading apache driver for the http service
Loading mysql driver for the db service
Loaded alias @platform_d1 from file /var/aegir/.drush/platform_d1.alias.drushrc.php
Including /var/aegir/.drush/provision/db/deploy.provision.inc
Including /var/aegir/.drush/provision/http/deploy.provision.inc
Including /var/aegir/.drush/provision/platform/deploy.provision.inc
Calling hook drush_db_provision_deploy_validate
Returned from hook drush_db_provision_deploy_validate
Calling hook drush_provision_drupal_provision_deploy_validate
Deploying site from /var/aegir/backups/test0.local-20130826.183005.tar.gz
Returned from hook drush_provision_drupal_provision_deploy_validate
Calling hook drush_db_pre_provision_deploy
Undefined index: pass pdo.php:89
Undefined index: pass pdo.php:89
Granting privileges to test1local@localhost on test1local
Undefined index: pass pdo.php:89
Created test1local database
Returned from hook drush_db_pre_provision_deploy
Calling hook drush_provision_drupal_pre_provision_deploy
Running: gunzip -c /var/aegir/backups/test0.local-20130826.183005.tar.gz | tar pxf - in /var/aegir/platforms/d1/sites/test1.local
Successfully extracted the contents of /var/aegir/platforms/d1/sites/test1.local
Changed group ownership of files in /var/aegir/platforms/d1/sites/test1.local/files to www-data
Changed group ownership of private files in /var/aegir/platforms/d1/sites/test1.local/private/files to www-data
Template loaded: /var/aegir/.drush/provision/Provision/Config/Drushrc/provision_drushrc_site.tpl.php
Changed permissions of /var/aegir/platforms/d1/sites/test1.local/drushrc.php to 640
Generated config Site Drush configuration file
Changed permissions of /var/aegir/platforms/d1/sites/test1.local/drushrc.php to 440
Platforms path /var/aegir/platforms exists.
Platforms ownership of /var/aegir/platforms has been changed to aegir.
Platforms permissions of /var/aegir/platforms have been changed to 755.
Platforms path /var/aegir/platforms is writable.
Drush bootstrap phase : _drush_bootstrap_drupal_site()
Initialized Drupal site test1.local at sites/test1.local
Cache MISS cid: 6.0-dev-install_profile-62bbcb68b3b8c0c5fda85915845a756a
Cache MISS cid: 6.0-dev-commandfiles-2-d56035ee2e86387deffa088ea873fe3d
Cache SET cid: 6.0-dev-commandfiles-2-d56035ee2e86387deffa088ea873fe3d
Template loaded: /var/aegir/.drush/provision/Provision/Config/Drupal/provision_drupal_settings.tpl.php
Changed permissions of /var/aegir/platforms/d1/sites/test1.local/settings.php to 640
Generated config Drupal settings.php file
Changed permissions of /var/aegir/platforms/d1/sites/test1.local/settings.php to 440
Change group ownership of /var/aegir/platforms/d1/sites/test1.local/settings.php to www-data
Platforms path /var/aegir/platforms exists.
Platforms ownership of /var/aegir/platforms has been changed to aegir.
Platforms permissions of /var/aegir/platforms have been changed to 755.
Platforms path /var/aegir/platforms is writable.
Returned from hook drush_provision_drupal_pre_provision_deploy
Calling hook drush_subdirs_pre_provision_deploy
Returned from hook drush_subdirs_pre_provision_deploy
Calling hook drush_db_provision_deploy
Found database dump at /var/aegir/platforms/d1/sites/test1.local/database.sql.
Database dump at /var/aegir/platforms/d1/sites/test1.local/database.sql is readable
Importing database using command: mysql --defaults-file=/dev/fd/3 test1local
Returned from hook drush_db_provision_deploy
Calling hook drush_provision_drupal_provision_deploy
Template loaded: /var/aegir/.drush/provision/Provision/Config/Drupal/Alias/provision_drupal_sites.tpl.php
Generated config Drupal sites.php file
Changed permissions of /var/aegir/platforms/d1/sites/sites.php to 644
Changed permissions of sites/test1.local to 755
Changed permissions of sites/test1.local/themes to 2775
Changed permissions of sites/test1.local/modules to 2775
Changed permissions of sites/test1.local/libraries to 2775
Changed permissions of sites/test1.local/files to 2770
Changed permissions of sites/test1.local/files/tmp to 2770
Changed permissions of sites/test1.local/files/images to 2770
Changed permissions of sites/test1.local/files/pictures to 2770
Changed permissions of sites/test1.local/files/css to 2770
Changed permissions of sites/test1.local/files/js to 2770
Changed permissions of sites/test1.local/files/ctools to 2770
Changed permissions of sites/test1.local/files/imagecache to 2770
Changed permissions of sites/test1.local/files/locations to 2770
Changed permissions of sites/test1.local/private to 2770
Changed permissions of sites/test1.local/private/files to 2770
Changed permissions of sites/test1.local/private/temp to 2770
Changed group ownership of sites/test1.local/files to www-data
Changed group ownership of sites/test1.local/files/tmp to www-data
Changed group ownership of sites/test1.local/files/images to www-data
Changed group ownership of sites/test1.local/files/pictures to www-data
Changed group ownership of sites/test1.local/files/css to www-data
Changed group ownership of sites/test1.local/files/js to www-data
Changed group ownership of sites/test1.local/files/ctools to www-data
Changed group ownership of sites/test1.local/files/imagecache to www-data
Changed group ownership of sites/test1.local/files/locations to www-data
Changed group ownership of sites/test1.local/private to www-data
Changed group ownership of sites/test1.local/private/files to www-data
Changed group ownership of sites/test1.local/private/temp to www-data
Returned from hook drush_provision_drupal_provision_deploy
Calling hook drush_db_post_provision_deploy
Removed dump file /var/aegir/platforms/d1/sites/test1.local/database.sql after restoring from it
Returned from hook drush_db_post_provision_deploy
Calling hook drush_http_post_provision_deploy
Template loaded: /var/aegir/.drush/provision/http/Provision/Config/Apache/vhost.tpl.php
Generated config virtual host configuration file
apache on aegir2-dev has been restarted
Returned from hook drush_http_post_provision_deploy
Calling hook drush_provision_drupal_post_provision_deploy
Loading drushrc "/var/aegir/platforms/d1/sites/test1.local/drushrc.php" into "site" scope.
Backend invoke: /usr/bin/php -d magic_quotes_gpc=Off -d magic_quotes_runtime=Off -d magic_quotes_sybase=Off /usr/share/drush/drush.php --php=/usr/bin/php --php-options=' -d magic_quotes_gpc=Off -d magic_quotes_runtime=Off -d magic_quotes_sybase=Off' --backend=2 --yes @test1.local updatedb 2>&1
/usr/bin/php -d magic_quotes_gpc=Off -d magic_quotes_runtime=Off -d magic_quotes_sybase=Off /usr/share/drush/drush.php --php=/usr/bin/php --php-options=' -d magic_quotes_gpc=Off -d magic_quotes_runtime=Off -d magic_quotes_sybase=Off' --backend=2 --yes @test1.local updatedb 2>&1
Bootstrap to phase 0.
Bootstrap to phase 2.
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Initialized Drupal 7.23 root directory at /var/aegir/platforms/d1
Drush bootstrap phase : _drush_bootstrap_drupal_site()
Initialized Drupal site test1.local at sites/test1.local
Cache MISS cid: 6.0-dev-install_profile-62bbcb68b3b8c0c5fda85915845a756a
Cache HIT cid: 6.0-dev-commandfiles-2-d56035ee2e86387deffa088ea873fe3d
Found command: updatedb (commandfile=core)
Loaded alias @server_localhost from file /var/aegir/.drush/server_localhost.alias.drushrc.php
Loaded alias @server_master from file /var/aegir/.drush/server_master.alias.drushrc.php
Loading apache driver for the http service
Loading mysql driver for the db service
Loaded alias @platform_d1 from file /var/aegir/.drush/platform_d1.alias.drushrc.php
Calling hook drush_core_updatedb
Drush bootstrap phase : _drush_bootstrap_drupal_configuration()
Drush bootstrap phase : _drush_bootstrap_drupal_database()
Successfully connected to the Drupal database.
Drush bootstrap phase : _drush_bootstrap_drupal_full()
Cache MISS cid: 6.0-dev-install_profile-62bbcb68b3b8c0c5fda85915845a756a
Cache SET cid: 6.0-dev-install_profile-62bbcb68b3b8c0c5fda85915845a756a
Cache HIT cid: 6.0-dev-commandfiles-5-0be991903be8e3acc3ef40b318cf5b67
No database updates required
Backend invoke: /usr/bin/php -d magic_quotes_gpc=Off -d magic_quotes_runti... (Expand)
/usr/bin/php -d magic_quotes_gpc=Off -d magic_quotes_runtime=Off -d magic_... (Expand)
Bootstrap to phase 0.
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Initialized Drupal 7.23 root directory at /var/aegir/platforms/d1
Drush bootstrap phase : _drush_bootstrap_drupal_site()
Initialized Drupal site test1.local at sites/test1.local
Cache HIT cid: 6.0-dev-install_profile-62bbcb68b3b8c0c5fda85915845a756a
Cache MISS cid: 6.0-dev-commandfiles-2-1ae9cfad1de0a7385f13ad40c49bc434
Cache SET cid: 6.0-dev-commandfiles-2-1ae9cfad1de0a7385f13ad40c49bc434
Drush bootstrap phase : _drush_bootstrap_drupal_configuration()
Drush bootstrap phase : _drush_bootstrap_drupal_database()
Successfully connected to the Drupal database.
Drush bootstrap phase : _drush_bootstrap_drupal_full()
Cache HIT cid: 6.0-dev-install_profile-62bbcb68b3b8c0c5fda85915845a756a
Cache HIT cid: 6.0-dev-commandfiles-5-0be991903be8e3acc3ef40b318cf5b67
Drush bootstrap phase : _drush_bootstrap_drupal_login()
Successfully logged into Drupal as Anonymous (uid=0)
Found command: cache-clear (commandfile=cache)
Loading drushrc "/var/aegir/platforms/d1/sites/test1.local/drushrc.php" into "site" scope.
Cache HIT cid: 6.0-dev-alias-path--c98c786645e00d089c2769197c7f917f
Loaded alias @server_localhost from file /var/aegir/.drush/server_localhost.alias.drushrc.php
Loaded alias @server_master from file /var/aegir/.drush/server_master.alias.drushrc.php
Loading apache driver for the http service
Loading mysql driver for the db service
Loaded alias @platform_d1 from file /var/aegir/.drush/platform_d1.alias.drushrc.php
Calling hook drush_cache_command_clear
Cache MISS cid: 6.0-dev-alias-path--c98c786645e00d089c2769197c7f917f
Cache SET cid: 6.0-dev-alias-path--c98c786645e00d089c2769197c7f917f
'all' cache was cleared in test1.local
Returned from hook drush_cache_command_clear
Command dispatch complete
Peak memory usage was 23.96 MB
Cache HIT cid: 6.0-dev-alias-path--c98c786645e00d089c2769197c7f917f
Finished performing updates.
Returned from hook drush_core_updatedb
Command dispatch complete
Peak memory usage was 22.71 MB
Drush bootstrap phase : _drush_bootstrap_drupal_configuration()
Drush bootstrap phase : _drush_bootstrap_drupal_database()
Successfully connected to the Drupal database.
Drush bootstrap phase : _drush_bootstrap_drupal_full()
Cache MISS cid: 6.0-dev-install_profile-62bbcb68b3b8c0c5fda85915845a756a
Cache SET cid: 6.0-dev-install_profile-62bbcb68b3b8c0c5fda85915845a756a
Cache MISS cid: 6.0-dev-commandfiles-5-0be991903be8e3acc3ef40b318cf5b67
Cache SET cid: 6.0-dev-commandfiles-5-0be991903be8e3acc3ef40b318cf5b67
Changed paths from sites/test1.local to sites/test1.local
Found install profile standard
Found install profile minimal
Found 45 modules
Found 4 themes
All caches flushed
Returned from hook drush_provision_drupal_post_provision_deploy
Command dispatch complete
Peak memory usage was 26.43 MB
Loading drushrc "/var/aegir/platforms/d1/sites/test1.local/drushrc.php" into "site" scope.
Loading drushrc "/var/aegir/platforms/d1/sites/test1.local/drushrc.php" into "site" scope.
Backend invoke: /usr/bin/php -d magic_quotes_gpc=Off -d magic_quotes_runti... (Expand)
/usr/bin/php -d magic_quotes_gpc=Off -d magic_quotes_runtime=Off -d magic_quotes_sybase=Off /usr/share/drush/drush.php --php=/usr/bin/php --php-options=' -d magic_quotes_gpc=Off -d magic_quotes_runtime=Off -d magic_quotes_sybase=Off' --backend=2 --yes @test1.local provision-verify 2>&1
Bootstrap to phase 0.
Bootstrap to phase 0.
Found command: provision-verify (commandfile=provision)
Loaded alias @server_localhost from file /var/aegir/.drush/server_localhost.alias.drushrc.php
Loaded alias @server_master from file /var/aegir/.drush/server_master.alias.drushrc.php
Loading apache driver for the http service
Loading mysql driver for the db service
Loaded alias @platform_d1 from file /var/aegir/.drush/platform_d1.alias.drushrc.php
Including /var/aegir/.drush/provision/dns/verify.provision.inc
Including /var/aegir/.drush/provision/platform/backupmigrate/verify.provision.inc
Including /var/aegir/.drush/provision/platform/verify.provision.inc
Calling hook drush_provision_drupal_provision_verify_validate
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Initialized Drupal 7.23 root directory at /var/aegir/platforms/d1
Drush bootstrap phase : _drush_bootstrap_drupal_site()
Initialized Drupal site test1.local at sites/test1.local
Cache HIT cid: 6.0-dev-install_profile-62bbcb68b3b8c0c5fda85915845a756a
Cache MISS cid: 6.0-dev-commandfiles-2-9ed8b0e9d7ac40e64cc4a83cae99bf82
Cache SET cid: 6.0-dev-commandfiles-2-9ed8b0e9d7ac40e64cc4a83cae99bf82
Template loaded: /var/aegir/.drush/provision/Provision/Config/Drupal/provision_drupal_settings.tpl.php
Changed permissions of /var/aegir/platforms/d1/sites/test1.local/settings.php to 640
Generated config Drupal settings.php file
Changed permissions of /var/aegir/platforms/d1/sites/test1.local/settings.php to 440
Change group ownership of /var/aegir/platforms/d1/sites/test1.local/settings.php to www-data
Platforms path /var/aegir/platforms exists.
Platforms ownership of /var/aegir/platforms has been changed to aegir.
Platforms permissions of /var/aegir/platforms have been changed to 755.
Platforms path /var/aegir/platforms is writable.
Drush bootstrap phase : _drush_bootstrap_drupal_configuration()
Drush bootstrap phase : _drush_bootstrap_drupal_database()
Successfully connected to the Drupal database.
Drush bootstrap phase : _drush_bootstrap_drupal_full()
Cache HIT cid: 6.0-dev-install_profile-62bbcb68b3b8c0c5fda85915845a756a
Cache HIT cid: 6.0-dev-commandfiles-5-0be991903be8e3acc3ef40b318cf5b67
Returned from hook drush_provision_drupal_provision_verify_validate
Calling hook drush_provision_drupal_pre_provision_verify
Found install profile standard
Found install profile minimal
Found 45 modules
Found 4 themes
Changed permissions of sites/test1.local to 755
Changed permissions of sites/test1.local/themes to 2775
Changed permissions of sites/test1.local/modules to 2775
Changed permissions of sites/test1.local/libraries to 2775
Changed permissions of sites/test1.local/files to 2770
Changed permissions of sites/test1.local/files/tmp to 2770
Changed permissions of sites/test1.local/files/images to 2770
Changed permissions of sites/test1.local/files/pictures to 2770
Changed permissions of sites/test1.local/files/css to 2770
Changed permissions of sites/test1.local/files/js to 2770
Changed permissions of sites/test1.local/files/ctools to 2770
Changed permissions of sites/test1.local/files/imagecache to 2770
Changed permissions of sites/test1.local/files/locations to 2770
Changed permissions of sites/test1.local/private to 2770
Changed permissions of sites/test1.local/private/files to 2770
Changed permissions of sites/test1.local/private/temp to 2770
Changed group ownership of sites/test1.local/files to www-data
Changed group ownership of sites/test1.local/files/tmp to www-data
Changed group ownership of sites/test1.local/files/images to www-data
Changed group ownership of sites/test1.local/files/pictures to www-data
Changed group ownership of sites/test1.local/files/css to www-data
Changed group ownership of sites/test1.local/files/js to www-data
Changed group ownership of sites/test1.local/files/ctools to www-data
Changed group ownership of sites/test1.local/files/imagecache to www-data
Changed group ownership of sites/test1.local/files/locations to www-data
Changed group ownership of sites/test1.local/private to www-data
Changed group ownership of sites/test1.local/private/files to www-data
Changed group ownership of sites/test1.local/private/temp to www-data
Template loaded: /var/aegir/.drush/provision/Provision/Config/Drupal/Alias/provision_drupal_sites.tpl.php
Generated config Drupal sites.php file
Changed permissions of /var/aegir/platforms/d1/sites/sites.php to 644
Template loaded: /var/aegir/.drush/provision/Provision/Config/Drupal/provision_drupal_settings.tpl.php
Changed permissions of /var/aegir/platforms/d1/sites/test1.local/settings.php to 640
Generated config Drupal settings.php file
Changed permissions of /var/aegir/platforms/d1/sites/test1.local/settings.php to 440
Change group ownership of /var/aegir/platforms/d1/sites/test1.local/settings.php to www-data
Platforms path /var/aegir/platforms exists.
Platforms ownership of /var/aegir/platforms has been changed to aegir.
Platforms permissions of /var/aegir/platforms have been changed to 755.
Platforms path /var/aegir/platforms is writable.
Returned from hook drush_provision_drupal_pre_provision_verify
Calling hook drush_subdirs_pre_provision_verify
Returned from hook drush_subdirs_pre_provision_verify
Calling hook drush_provision_verify
Template loaded: /var/aegir/.drush/provision/http/Provision/Config/Apache/vhost.tpl.php
Generated config virtual host configuration file
apache on aegir2-dev has been restarted
Returned from hook drush_provision_verify
Calling hook drush_dns_post_provision_verify
Returned from hook drush_dns_post_provision_verify
Calling hook drush_provision_drupal_post_provision_verify
All caches flushed
Client home directory for admin path /var/aegir/clients/admin exists.
Client home directory for admin ownership of /var/aegir/clients/admin has been changed to aegir.
Client home directory for admin permissions of /var/aegir/clients/admin have been changed to 750.
Client home directory for admin path /var/aegir/clients/admin is writable.
couldn't find previous client symlink, iterating through all sites
Created symlink /var/aegir/clients/admin/test1.local to /var/aegir/platforms/d1/sites/test1.local
Returned from hook drush_provision_drupal_post_provision_verify
Template loaded: /var/aegir/.drush/provision/Provision/Config/Drushrc/provision_drushrc_site.tpl.php
Changed permissions of /var/aegir/platforms/d1/sites/test1.local/drushrc.php to 640
Generated config Site Drush configuration file
Changed permissions of /var/aegir/platforms/d1/sites/test1.local/drushrc.php to 440
Platforms path /var/aegir/platforms exists.
Platforms ownership of /var/aegir/platforms has been changed to aegir.
Platforms permissions of /var/aegir/platforms have been changed to 755.
Platforms path /var/aegir/platforms is writable.
Command dispatch complete
Peak memory usage was 24.53 MB
Returned from hook drush_provision_drupal_provision_clone
Template loaded: /var/aegir/.drush/provision/Provision/Config/Drushrc/provision_drushrc_site.tpl.php
Changed permissions of /var/aegir/platforms/drupal-7.23/sites/test0.local/drushrc.php to 640
Generated config Site Drush configuration file
Changed permissions of /var/aegir/platforms/drupal-7.23/sites/test0.local/drushrc.php to 440
Platforms path /var/aegir/platforms exists.
Platforms ownership of /var/aegir/platforms has been changed to aegir.
Platforms permissions of /var/aegir/platforms have been changed to 755.
Platforms path /var/aegir/platforms is writable.
Command dispatch complete
Peak memory usage was 11.84 MB
Returned from hook drush_hosting_task
Calling hook drush_hosting_post_hosting_task
Undefined property: stdClass::$db_name hosting_site.nodeapi.inc:156
Returned from hook drush_hosting_post_hosting_task
Task import was added to the queue. Next queue run is 18:31:01+0200, server time is 18:30:17+0200.
Command dispatch complete
Peak memory usage was 19.93 MB
Updated task status to "Successful"

Note that right at the end, we see:

Undefined property: stdClass::$db_name hosting_site.nodeapi.inc:156
ergonlogic’s picture

I think the problem is that we're re-writing the source site's drushrc.php here, and presumably using the new site's credentials to do it:

Returned from hook drush_provision_drupal_provision_clone
Template loaded: /var/aegir/.drush/provision/Provision/Config/Drushrc/provision_drushrc_site.tpl.php
Changed permissions of /var/aegir/platforms/drupal-7.23/sites/test0.local/drushrc.php to 640
Generated config Site Drush configuration file
Changed permissions of /var/aegir/platforms/drupal-7.23/sites/test0.local/drushrc.php to 440
Platforms path /var/aegir/platforms exists.
Platforms ownership of /var/aegir/platforms has been changed to aegir.
Platforms permissions of /var/aegir/platforms have been changed to 755.
Platforms path /var/aegir/platforms is writable.
Command dispatch complete

I'm not sure why we're doing anything with the source site's drushrc.php at this point... The simpler solution is probably to reset the active config to the source site, as we do here in #2055949: Migrate drops wrong database when domain name changes.

ergonlogic’s picture

Fixed in c477816 in the same way as #2055949: Migrate drops wrong database when domain name changes. This is attached as the first patch (3a) too, for those wanting to patch RC2.

However, an alternative solution that also appears to work is just not to trigger a verify on the new site. Maybe there's some reason to do this, but I don't see it at the moment. I'd prefer this approach, since it removes code, but it'll require further testing and feedback from other maintainers. So, I'm leaving this issue as 'needs review'.

ergonlogic’s picture

Category: bug » task
Priority: Critical » Normal

Downgrading priority, as this is mostly a coding style/optimization issue now.

anarcat’s picture

well, not triggering the verify wouldn't actually fix the problem - it would just delay it, wouldn't it?

but yeah, i have always wondered why the heck we reverify like this, but I am not sure we should drop this during the RC cycle. this should be a separate issue.

anarcat’s picture

Status: Needs review » Fixed
ergonlogic’s picture

IIRC, the (3b) in #3 (not doing the extra verify), actually solved the problem because up to that point everything worked properly. The drushrc.php was properly written, but then got overwritten by the wrong context during the last verify.

See #2088761: Do not verify after clone for the follow-up issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit c477816 on dev-drupal-8, 6.x-2.x, dev-ssl-ip-allocation-refactor, 7.x-3.x, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x by ergonlogic:
    Issue #2067603: Fix original and cloned site pointing to the same...