Provision Verify - DB Connection

davexoxide - August 12, 2009 - 19:56
Project:Provision
Version:6.x-0.3-rc2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Fedora 10
PHP 5.2.10
Apache 2.2.12
MySQL 5.0.81
Installed w/ Aegir 0.3RC2

Site Verify message

The command 'drush.php provision verify' could not be found.

So I ran 'drush provision verify' from command line

aegir@admin [~/drupal]# drush provision verify
Could not connect to the master database.                            [error]
An error occurred at function :                                      [error]
drush_provision_mysql_provision_verify_validate

Stumbled across this issue on groups. http://groups.drupal.org/node/23817
So I tried 'drush provision verify --master_db_host=localhost --master_db_user=USERNAME --master_db_passwd=PASSWORD --debug'

aegir@admin [~/drupal]# drush provision verify --master_db_host=localhost --master_db_user=USERNAME --master_db_passwd=PASSWORD --debug
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.051 sec]   [bootstrap]
Loading drushrc "/var/aegir/drupal/drushrc.php" into "drupal" scope. [bootstrap]
[0.051 sec]
Initialized Drupal 6.13 root directory at /var/aegir/drupal [0.073      [notice]
sec]
Found command: provision verify [0.077 sec]                          [bootstrap]
Initializing drush commandfile: provision_apache [0.077 sec]         [bootstrap]
Undefined index:  base_url [0.078 sec]                                  [notice]
Initializing drush commandfile: provision_drupal [0.078 sec]         [bootstrap]
Initializing drush commandfile: provision_mysql [0.079 sec]          [bootstrap]
Undefined index:  db_url [0.079 sec]                                    [notice]
Undefined index:  user [0.079 sec]                                      [notice]
Undefined index:  pass [0.079 sec]                                      [notice]
Undefined index:  host [0.079 sec]                                      [notice]
Undefined index:  host [0.079 sec]                                      [notice]
Undefined index:  scheme [0.079 sec]                                    [notice]
Undefined index:  scheme [0.079 sec]                                    [notice]
Including /var/aegir/.drush/provision/web_server/verify.provision.inc[bootstrap]
[0.08 sec]
Including /var/aegir/.drush/provision/platform/verify.provision.inc  [bootstrap]
[0.08 sec]
Including /var/aegir/.drush/provision/db_server/verify.provision.inc [bootstrap]
[0.081 sec]
Virtual host configuration path exists. [0.085 sec]                    [message]
Virtual host configuration ownership of path has been changed to       [message]
aegir. [0.085 sec]
Virtual host configuration permissions of path have been changed to    [message]
0700. [0.086 sec]
Virtual host configuration path is writable. [0.086 sec]               [message]
Undefined index:  platform [0.086 sec]                                  [notice]
Generating apache host configuration file platform_.conf. [0.087 sec]   [notice]
Executing: sudo /usr/sbin/apachectl graceful
Apache has been restarted [0.281 sec]                                   [notice]
Provision configuration path exists. [0.281 sec]                       [message]
Provision configuration ownership of path has been changed to aegir.   [message]
[0.282 sec]
Provision configuration permissions of path have been changed to       [message]
0700. [0.282 sec]
Provision configuration path is writable. [0.282 sec]                  [message]
Backup path exists. [0.282 sec]                                        [message]
Backup ownership of path has been changed to aegir. [0.283 sec]        [message]
Backup permissions of path have been changed to 0700. [0.283 sec]      [message]
Backup path is writable. [0.283 sec]                                   [message]
Drupal sites directory is writable by the provisioning script [0.283   [message]
sec]
Undefined variable: sites [0.283 sec]                                   [notice]
This platform is running drupal 6.13 [0.284 sec]                        [notice]
Including non-version specific file :                                   [notice]
/var/aegir/.drush/provision/platform/drupal/packages.inc [0.284 sec]
Found 33 modules in base [0.316 sec]                                    [notice]
Found 6 themes in base [0.323 sec]                                      [notice]
Undefined property: stdClass::$info [0.327 sec]                         [notice]
Found install profile hostmaster [0.331 sec]                            [notice]
Undefined property: stdClass::$info [0.332 sec]                         [notice]
Found install profile default [0.333 sec]                               [notice]
Undefined index:  project [0.333 sec]                                   [notice]
Undefined index:  project [0.338 sec]                                   [notice]
Undefined index:  project [0.339 sec]                                   [notice]
Undefined index:  project [0.34 sec]                                    [notice]
Undefined index:  project [0.341 sec]                                   [notice]
Undefined index:  project [0.342 sec]                                   [notice]
Undefined index:  project [0.343 sec]                                   [notice]
Undefined index:  project [0.343 sec]                                   [notice]
Undefined index:  project [0.344 sec]                                   [notice]
Undefined index:  project [0.345 sec]                                   [notice]
Undefined index:  project [0.346 sec]                                   [notice]
Undefined index:  project [0.347 sec]                                   [notice]
Undefined index:  project [0.348 sec]                                   [notice]
Found 13 modules in profiles/hostmaster [0.348 sec]                     [notice]
Undefined index:  project [0.349 sec]                                   [notice]
Found 1 themes in profiles/hostmaster [0.35 sec]                        [notice]
Undefined index:  project [0.35 sec]                                    [notice]
Mysql can create new databases. [0.362 sec]                            [message]
Generating drushrc.php file [0.363 sec]                                 [notice]
Changed permissions of drushrc.php to 0600 [0.363 sec]                 [message]
Drushrc file (/var/aegir/drupal/drushrc.php) was written successfully   [notice]
[0.367 sec]
Changed permissions of drushrc.php to 0400 [0.367 sec]                 [message]
Command dispatch complete [0.367 sec]                                   [notice]

As you can see running from command line as the aegir user does work fine when I force values in for the database connection.
I have verified that the USERNAME and PASSWORD do not have any odd characters and that these are the values set in the MASTER DATABASE node created.

#1

mig5 - August 12, 2009 - 23:31

Curious as to whether your /var/aegir/drupal/drushrc.php contains the matching settings you are passing explicitely above?

i.e the $options['master_db'], for me it is the last entry of the drushrc.php

#2

adrian - August 12, 2009 - 23:43
Status:active» postponed (maintainer needs more info)

the master_db is specified as a url

ie:

--master_db='mysqli://username:password@server'

You need to make sure that your aegir user has a home directory set (echo $HOME) and that provision is installed in ~/.drush/provision

#3

davexoxide - August 14, 2009 - 19:19

echo $HOME = /var/aegir
~/.drush/provision is setup correctly

However both master_url and master_db are NULL
This is after I ran 'drush provision verify --master_db_host=localhost --master_db_user=USERNAME --master_db_passwd=PASSWORD --debug'

....
$options['master_url'] = NULL;
$options['publish_path'] = '/var/aegir/drupal';
$options['web_host'] = '127.0.0.1';
$options['web_ip'] = '127.0.0.1';
$options['web_group'] = 'apache';
$options['script_user'] = 'aegir';
$options['restart_cmd'] = 'sudo /usr/sbin/apachectl graceful';
$options['backup_path'] = '/var/aegir/backups';
$options['config_path'] = '/var/aegir/config';
$options['master_db'] = NULL;

#4

davexoxide - August 14, 2009 - 22:32

I went ahead and manually editted the values for
$options['master_url'] = 'admin.mydomain.com';
$options['master_db'] = 'mysqli://username:password@server';

Still no such luck within aegir.
When I go to command line and navigate to my installation root '/var/aegir/drupal' and run any of the following commands it completes without error.

drush provision verify

php /var/aegir/drush/drush.php --root='/var/aegir/drupal' 'provision' 'verify' --debug

I don't understand if hosting and provisioning appear to be setup correctly why I would still be getting failed verification.
It's both the final step in getting aegir fully functioning and the final step in provision verify... so close, yet so far.

#5

mig5 - August 15, 2009 - 02:57

My master_url includes the http:// prefix:

$options['master_url'] = 'http://deploy.mig5.net';

Unsure if this would make a difference, and in fact doesn't make sense to me why via CLI it would work but not via the web interface

#6

davexoxide - August 15, 2009 - 04:42

Just double checked. I do have the http:// in there.

even before I had 'drush provision verify' working I was able to do 'drush sql cli' without any errors.
I guess I'll just wait for a RC3 and try again.

#7

mig5 - August 15, 2009 - 09:42

RC3 was just released today :) will be interesting to here if it still occurs for you. I'm running on rc3 now, haven't seen this issue myself on rc2 or 3 so far.

#8

davexoxide - August 20, 2009 - 18:44
Status:postponed (maintainer needs more info)» closed

I just did a yum update to look for new server packages, I decided to go back in and give it another try. It worked this time.
Thanks for all the help.

 
 

Drupal is a registered trademark of Dries Buytaert.