Closed (fixed)
Project:
Hostmaster (Aegir)
Version:
6.x-0.4-alpha2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Jun 2010 at 20:24 UTC
Updated:
26 Mar 2011 at 09:04 UTC
On top of marvelous problems with drush_make, I had a lot of fun making the alpha2 -> alpha8 upgrade on solaris. Everything was going well up to hostmaster-resume. I was able to salvage this part of the logfile:
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [bootstrap]
[61.81 sec, 4.83 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [61.81 [bootstrap]
sec, 4.84 MB]
Successfully connected to the Drupal database. [61.81 sec, 4.84 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [61.81 sec, [bootstrap]
4.84 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_login() [61.81 sec, [bootstrap]
4.84 MB]
Found command: hosting-setup (commandfile=hosting) [61.81 sec, 4.84 [bootstrap]
MB]
Warning: The command callback function hosting_setup has a deprecated [notice]
name. It must begin with drush_hosting_. Skipping hook functions.
[61.81 sec, 4.84 MB]
Dispatch command could not be run. Returned: [error]
Could not find a Drupal settings.php file at
[error]
./sites/default/settings.php.
The drush command 'hosting-dispatch' could not be found.
[error] [61.81 sec, 4.84 MB]
The command did not complete successfully, please fix the issues and [error]
re-run this script [61.81 sec, 4.84 MB]
Command dispatch complete [61.81 sec, 4.84 MB] [notice]
Peak memory usage was 11.6 MB [61.81 sec, 4.84 MB] [memory]
An error occurred at function : drush_hosting_hostmaster_resume [error]
[61.81 sec, 4.84 MB]
Command dispatch complete [61.81 sec, 4.84 MB] [notice]
Peak memory usage was 13.49 MB [61.81 sec, 4.84 MB] [memory]
This command will replace your crontab for this user. continue? (y/n): y
/var/aegir/drush/drush.php hosting-dispatch --root='/var/aegir/hostmaster-HEAD' --uri='aegir.example.com'
An error occurred at function : [error]
drush_provision_post_hostmaster_migrate [61.81 sec, 4.54 MB]
Command dispatch complete [61.81 sec, 4.53 MB] [notice]
Peak memory usage was 5 MB [61.81 sec, 4.53 MB] [memory]
Notice how hosting-dispatch is called with the wrong --root argument: that should be /var/aegir/hostmaster-0.4-alpha8, that's where the site was migrated to earlier.
Now it seems there's a problem with the services on the server. Running tasks fails in hosting:
# /usr/local/bin/php /var/aegir/drush/drush.php --php=/usr/local/bin/php --root='/var/aegir/hostmaster-0.4-alpha8' --uri='http://aegir.example.com' hosting-task '582' --debug
PHP Warning: Module 'mcrypt' already loaded in Unknown on line 0
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.21 sec, [bootstrap]
3.45 MB]
Loading drushrc "/var/aegir/hostmaster-0.4-alpha8/drushrc.php" into [bootstrap]
"drupal" scope. [0.21 sec, 3.45 MB]
Initialized Drupal 6.17 root directory at [notice]
/var/aegir/hostmaster-0.4-alpha8 [0.24 sec, 4.19 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.28 sec, [bootstrap]
4.19 MB]
Initialized Drupal site aegir.example.com at sites/aegir.example.com [notice]
[0.28 sec, 4.19 MB]
Loading drushrc [bootstrap]
"/var/aegir/hostmaster-0.4-alpha8/sites/aegir.example.com/drushrc.php"
into "site" scope. [0.28 sec, 4.19 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.32[bootstrap]
sec, 4.34 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.36 sec,[bootstrap]
4.35 MB]
Successfully connected to the Drupal database. [0.36 sec, 4.35 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.41 sec, [bootstrap]
4.61 MB]
Found command: hosting-task (commandfile=hosting) [0.76 sec, 11.14 [bootstrap]
MB]
Initializing drush commandfile: drush_make [0.76 sec, 11.14 MB] [bootstrap]
Initializing drush commandfile: drush_make_d_o [0.76 sec, 11.14 MB] [bootstrap]
Initializing drush commandfile: provision [0.76 sec, 11.14 MB] [bootstrap]
Initializing drush commandfile: provision_apache [0.76 sec, 11.14 MB][bootstrap]
Initializing drush commandfile: provision_drupal [0.76 sec, 11.14 MB][bootstrap]
Initializing drush commandfile: provision_mysql [0.76 sec, 11.14 MB] [bootstrap]
Including profiles/hostmaster/modules/hosting/task.hosting.inc [0.76 [bootstrap]
sec, 11.15 MB]
The drush command hook naming conventions have changed; the function [error]
drush_hosting_hosting_task_validate must be renamed to
drush_hosting_task_validate. The old function will be called, but
this will be removed shortly. [0.76 sec, 11.17 MB]
The drush command hook naming conventions have changed; the function [error]
drush_hosting_hosting_task must be renamed to drush_hosting_task.
The old function will be called, but this will be removed shortly.
[0.77 sec, 11.18 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_login() [0.77 sec, [bootstrap]
11.19 MB]
Task starts processing [0.79 sec, 11.48 MB] [queue]
Fatal error: Call to a member function options() on a non-object in /var/aegir/hostmaster-0.4-alpha8/profiles/hostmaster/modules/hosting/db_server/hosting_db_server.drush.inc on line 8
That line is:
$server->services['db']->options($task->task_type, $task->ref->type, $task
... so I guess that those services on the main server were not setup properly during the upgrade.
Comments
Comment #1
anarcat commentedSo there's code missing in hostmaster-migrate for remote DB servers. If you try to upgrade aegir in this case, you will end up with the above problems, because the "default DB server" is more or less hardcoded right now. The above $server variable is defined like this:
... which, in case of platforms, calls:
That define is:
I have therefore worked around the problem by creating the server node for the mysql server manually in the frontend, and then assign that variable to point to it:
Tasks are now running properly. Obviously, it would be nice to implement this in hostmaster-migrate or document this better in UPGRADE.txt. I know I'll get bitten by this at least one more time...
Comment #2
adrian commentedthis is not relevant anymore i believe.