I have succeeded installing Aegir and loading the installation wizard. Everything worked OK until step 12.

On the 'intialize system' step 12 of the aegir installation wizard I get the following error:

Could not find a Drupal settings.php file at .../sites/default/settings.php.

The settings.php file was installed at the sites/aegir.example.com subdirectory, according to the instructions. So why can't drush find it when I run /home/aegir1/drush/drush.php hosting setup
from the main drupal directory of the installation? And how do I find where is the source of the drush hosting setup script?

Configuration:

Drush help doesn't show any hosting command - see below - is it related?

The complete versions of my Drupal core, provision, hosting, drush and the hostmaster install profile:

Drupal core: 6.13
Provision: 6.x-0.3-rc2
hosting: 6.x-0.3-rc2
drush: DRUPAL-6--2-0
hostmaster: DRUPAL-6--0-3-RC2

The operating system you are using, its version, the version of PHP and Apache

CentOS release 4.7 (Final)
PHP Version 5.2.6
Apache Server version: Apache/1.3.41 (Unix). Server built: Jun 26 2008 17:34:01
MySQL Server version: 5.0.77-community
Control Panel: DirectAdmin

The output of 'id' as the aegir user:

uid=565(aegir1) gid=566(aegir1) groups=501(apache),566(aegir1)

The commend I've tried to run:

[aegir1@server ~/domains/aegir.levavie.info/public_html]$          /home/aegir1/drush/drush.php --verbose=2 --debug hosting setup

The detailed error message:

Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.046 sec]   [bootstrap]
Initialized Drupal 6.13 root directory at                               [notice]
/home/aegir1/domains/aegir.levavie.info/public_html [0.062 sec]
Could not find a Drupal settings.php file at                         [error]
./sites/default/settings.php. [0.066 sec]
The command 'drush.php hosting setup' could not be found. [0.066 sec][error]

The output of 'drush help' doesn't contain any 'hosting' commands:


 help                  Print this help message. Use --filter to limit command
                       list to one command file (e.g. --filter=pm)
 cron                  Run all cron hooks.
 updatedb              Execute the update.php process from the command line
 status                Provides a birds-eye view of the current Drupal
                       installation, if any.
 script                Run php script(s).
 cache clear           Clear all caches.
 watchdog show         Shows recent watchdog log messages. Optionally filter
                       for a specific type.
 watchdog delete       Delete all messages or only those of a specified type.
 sync                  Rsync the Drupal tree to/from another server using ssh.
 eval                  Evaluate arbitrary php code after bootstrapping Drupal.
 enable                Enable one or more modules.
 disable               Disable one or more modules.
 uninstall             Uninstall one or more modules.
 statusmodules         Show module enabled/disabled status
 refresh               Refresh update status information
 updatecode            Update your project code
 update                Update your project code and apply any database updates
                       required (update.php)
 info                  Release information for a project
 dl                    Download core Drupal and projects like CCK, Zen, etc.
 provision install     Provision a new site using the provided data.
 provision import      Turn an already running site into a provisioned site.
 provision backup      Generate a back up for the site.
 provision enable      Enable a disabled site.
 provision disable     Disable a site.
 provision verify      Verify that the provisioning framework is correctly
                       installed.
 provision restore     Restore the site to a previous backup. This will also
                       generate a backup of the site as it was.
 provision deploy      Deploy an existing backup to a new url.
 provision migrate     Migrate a site between platforms.
 provision delete      Delete a site.
 test mail             Run all tests and mail the results to your team.
 test clean            Delete leftover tables and files from prior test runs.
 sql conf              Print database connection details.
 sql connect           A string for connecting to the DB.
 sql dump              Exports the Drupal DB as SQL using mysqldump.
 sql query             Execute a query against the site database.
 sql load              Copy source database to target database.
 sql cli               Open a SQL command-line interface using Drupal's credentials.

Drush is installed in /home/aegir1/drush

aegir is installed on /home/aegir1.

Thanks for the help

Amnon

Comments

druvision’s picture

I've now set again on the sites/default directory and I get another error:

Fatal error: Call to undefined function hosting_get_queues() in /home/aegir1/drupal-6.13/sites/all/modules/hosting/hosting.drush.inc on line 15
Drush command could not be completed.

Running drush help, it seems that no drush hosting commands are available.

druvision’s picture

Title: Drush hosting command not found on step 12 of the profile installatin wizard » drush hosting commands are missing

After analysis, it seems that It doesn't matter if I install the hosting module on site/all/modules or on profiles/hostmaster/modules - the hosting commands doesn't appear on 'drush help'.

adrian’s picture

Title: drush hosting commands are missing » drush hosting commands are not in the drush help command list
Priority: Normal » Minor

The reason this is, is because the hosting commands need a full drupal bootstrap to know which queues are enabled, hence which queues to generate commands for. Even if the commands were to appear there the drush help command would exit with a failure.

Drush does not do a drupal bootstrap to generate the command list, because that takes too long. Additionally if the module is stored in the profile directory, Drupal it self can not detect the modules in that directory until a drupal_bootstrap_database is reached.

However, when you actually EXECUTE the command, Drush will reach the right level needed to resolve it, if it is stored in the profiles directory.

Therefore, store the module in site profiles/hostmaster directory as instructed, and run the command. it will not show up in the drush help listing, and it's not necessary for it to.

The install.txt documentation needs to be updated to _not_ use drush to download these modules, as drush does not support installing module files in profiles/$profile/modules.

druvision’s picture

Title: drush hosting commands are not in the drush help command list » fatal error on drush 'hosting setup' : hosting_get_queues() not found

OK, I put the hosting module in the profiles/hostmaster/modules directory.

I am still getting the same PHP error complaining that hosting_get_queues() is undefined.

Fatal error: Call to undefined function  hosting_get_queues() in /home/aegir1/drupal-6.13/profiles/hostmaster/modules/hosting/hosting.drush.inc on line 15
Drush command could not be completed.
doka’s picture

Delete also the hosting module from sites/all/modules.

anarcat’s picture

Category: bug » support
Status: Active » Fixed

... aaaand hosting setup should be called with a --uri=http://aegir.example.com if you configured the site to be in sites/aegir.example.com. The install docs should say so if no that's a bug, otherwise i consider this is a support request. Note that the install docs originally told you to install hosting in sites/all/modules, that is fixed.

Status: Fixed » Closed (fixed)

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

eggtart’s picture

Status: Closed (fixed) » Active

I am running into the same problem. The hosting module is only present in hostmaster/modules, and I am trying to run drush.php with --url=http://aegir.example.com hosting setup. I am still getting the error msg that settings.php cannot be found.

Please help. Thanks!

eggtart’s picture

Status: Active » Closed (fixed)

Oh, should be uri not url. Sorry about that.