I'm having some trouble running hostmaster-install in 7.x-3.x-dev. I am receiving the following error:

Fatal error: Call to undefined function drupal_install_modules() in /var/aegir/hostmaster-7.x-3.x-dev/profiles/hostmaster/hostmaster.install on line 14
Drush command terminated abnormally due to an unrecoverable error.                                               [error]
Error: Call to undefined function drupal_install_modules() in
/var/aegir/hostmaster-7.x-3.x-dev/profiles/hostmaster/hostmaster.install, line 14
The external command could not be executed due to an application error.                                          [error]
Drush was not able to start (bootstrap) the Drupal database.                                                     [error]
Hint: This may occur when Drush is trying to:
 * bootstrap a site that has not been installed or does not have a configured database. In this case you can
select another site with a working database setup by specifying the URI to use with the --uri parameter on the
command line. See `drush topic docs-aliases` for details.
 * connect the database through a socket. The socket file may be wrong or the php-cli may have no access to it in
a jailed shell. See http://drupal.org/node/1428638 for details.
Server Information:
Operating System: Ubuntu 12.04 (LTS)
Web Server: Nginx (1.4.6)
PHP Version: PHP5-FPM (5.3.10)
MySQL Version: 5.5.35

I've successfully installed Aegir 6.x-2 on a different vps, and I've tried to mimic the environments as much as possible, and it's possible that I ran into this error before, but if I did I do not recall how I fixed it. If there is any information that I can provide (debugs, logs, etc) that may help, please let me know.

Comments

JakeWilund’s picture

Issue summary: View changes

Updated server information

ergonlogic’s picture

Category: Support request » Bug report
Priority: Normal » Major
Issue tags: +nginx

This is specific to nginx installs:

  // add support for nginx
  if (d()->platform->server->http_service_type === 'nginx') {
    drupal_install_modules(array('hosting_nginx'));
  }

drupal_install_modules() was removed in Drupal 7. We should switch to module_enable().

ergonlogic’s picture

I pushed a fix in 4ebc584. Please pull and test.

JakeWilund’s picture

Wow, awesome, will do. I'll report back tomorrow.

JakeWilund’s picture

Pulled latest, got a new error.

Drush command terminated abnormally due to an unrecoverable error.                                               [error]
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'vpsjakewilundc_0.system' doesn't exist: SELECT * FROM {system} WHERE type = 'theme' OR (type = 'module' AND status = 1) ORDER BY weight ASC, name ASC;
Array () in system_list() (line 165 of /var/aegir/hostmaster-7.x-3.x-dev/includes/module.inc).

Looking further up into the install output, I'm also seeing this warning:

nginx on [hostname] could not be restarted. Changes might not be available until this has been done.     [warning]
(error: sudo: >>> /etc/sudoers.d/aegir: syntax error near line 1 <<<
sudo: parse error in /etc/sudoers.d/aegir near line 1

My current aegir file in /etc/sudoers.d

Defaults:aegir  !requiretty
aegir ALL=NOPASSWD: /etc/init.d/nginx

Which is the same as it is on my other vps running Aegir 6.x-2

JakeWilund’s picture

Would it be best to open a new issue? I've done a fair amount of troubleshooting and tinkering and am still having this issue on install.

helmo’s picture

The first error from #5 seems to indicate that you have an empty database. But continuing in a new issue would probably be best.

anarcat’s picture

Status: Active » Fixed

From what I understand, this issue is fixed in git, right?

JakeWilund’s picture

@helmo, that is correct, but isn't the hostmaster-install supposed to be provided an empty database with which it installs the base Drupal/Aegir tables?

@anarcat, the initial error was fixed I believe, but I'm still having issues with the hostmaster install on my nginx server (see post #5). Should I open a new issue?

Status: Fixed » Closed (fixed)

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

  • Commit 4ebc584 on 7.x-3.x, dev-helmo-3.x by ergonlogic:
    Issue #2212635: Fix call to undefined function drupal_install_modules().
    

  • Commit 4ebc584 on 7.x-3.x, dev-helmo-3.x by ergonlogic:
    Issue #2212635: Fix call to undefined function drupal_install_modules().