Closed (fixed)
Project:
Provision
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
26 Jan 2010 at 01:50 UTC
Updated:
3 Jan 2014 at 01:08 UTC
Jump to comment: Most recent
Before describing this bug, I need to describe my setup.
* webserver A: main aegir production sites, bunch of sites, connected to:
* database server B: main mysql server, serving the production site
* webserver C: test aegir site, with a local MySQL server
To be clear: C is isolated from A or B and runs its own mysql server.
I made an Aegir backup of site.example.com on webserver A and tried to provision-deploy it on webserver C. A clone of the platform from webserver A was done using drush generate-makefile and drush make (awesome thing). During the provision-deploy, I see the following lines:
Granting privileges to site_1781_0@127.0.0.1 on site_1781_0 [29.24 [notice]
sec, 9.87 MB]
Created site_1781_0 database [29.34 sec, 9.87 MB] [success]
Found database dump at [message]
/var/hostmaster/drupal-6.15-1.0-prod/sites/sitetest.example.com/database.sql.
[29.34 sec, 9.87 MB]
Database dump at [message]
/var/hostmaster/drupal-6.15-1.0-prod/sites/sitetest.example.com/database.sql
is readable [29.34 sec, 9.87 MB]
Importing database using command: mysql --defaults-file=/dev/fd/3 [notice]
site_1781_0 [29.34 sec, 9.87 MB]
Database import failed: ERROR 1045 (28000): Access denied for user [error]
'site_1781_0'@'192.168.0.122' (using password: YES)
[30.05 sec, 9.88 MB]
An error occurred at function : [error]
drush_provision_mysql_provision_deploy [30.05 sec, 9.87 MB]
Dropping database site_1781_0 [30.05 sec, 9.88 MB] [notice]
Revoking privileges of site_1781_0@127.0.0.1 from site_1781_0 [30.05 [notice]
sec, 9.88 MB]
Provision was called as such:
drush provision-deploy sitetest.example.com ~anarcat/site.example.com-20100125.201505.tar.gz --debug
Quite recent HEAD on both installs, a bit more recent on server C.
Comments
Comment #1
anarcat commentedSo the trick here is to specify a db_host on the commandline, as such:
Shouldn't we use the database from the platform? It's not as if we had access to anything else in the first place...
Also consider how this relates to #605414: multiple database server support.
Comment #2
adrian commentedThis will be resolved by -
#723288: Introduce the concept of 'shortnames' for all major entities.
Aegir will manage individual records for each of the servers it would need to connect to.
So it would be
[?
drush platformid provision-deploy url.com tarball --db_server=dbalias
?]
Comment #3
adrian commentedThat's for the next alpha.
Comment #4
adrian commentedThis works in head.
The db_server is stred inside the site alias, and is maintained when migrating.