Problem/Motivation

We have a new VM with Ubuntu 15.10 and have just installed Aegir 3.4. All works as expected, except when using profiles to create sites. We have created a platform based upon the Commerce Kickstart make file (from within hostmaster). The platform creation and verification works without a problem. When we then create a site based upon the Commerce Kickstart profile (located on our just deployed platform), we keep seeing the following error:
(Same happens when using a self created profile for the same purpose, that is why the issue isn't created within the Commerce Kickstart project)

exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cktest1.system' doesn't exist' in /var/aegir/platforms/com_kick44/includes/database/database.inc:2171 Stack trace: #0 /var/aegir/platforms/com_kick44/includes/database/database.inc(2171): PDOStatement->execute(Array) #1 /var/aegir/platforms/com_kick44/includes/database/database.inc(683): DatabaseStatementBase->execute(Array, Array) #2 /var/aegir/platforms/com_kick44/includes/database/database.inc(2350): DatabaseConnection->query('SELECT * FROM {...', Array, Array) #3 /var/aegir/platforms/com_kick44/includes/module.inc(165): db_query('SELECT * FROM {...') #4 /var/aegir/platforms/com_kick44/includes/module.inc(89): system_list('module_enabled') #5 /var/aegir/platforms/com_kick44/includes/bootstrap.inc(3049): module_list(true) #6 /var/aegir/platforms/com_kick44/includes/bootstrap.inc(3013): drupal_get_complete_schema() #7 /var/aegir/platforms/com_kick44/includes/bootstrap.inc(369): SchemaCache->resolveCacheMiss('file_managed') #8 /var/aegir/platforms/com_kick44/includes/bootstrap.inc(358): DrupalCacheArray->offsetGet('file_managed') #9 /var/aegir/platforms/com_kick44/includes/bootstrap.inc(2988): DrupalCacheArray->offsetExists('file_managed') #10 /var/aegir/platforms/com_kick44/includes/common.inc(7320): drupal_get_schema('file_managed') #11 /var/aegir/platforms/com_kick44/includes/common.inc(7970): drupal_schema_field_types('file_managed') #12 /var/aegir/platforms/com_kick44/includes/common.inc(8142): entity_get_info('user') #13 /var/aegir/platforms/com_kick44/includes/common.inc(8108): entity_get_controller('user') #14 /var/aegir/platforms/com_kick44/modules/user/user.module(291): entity_load('user', Array, Array, false) #15 /var/aegir/platforms/com_kick44/modules/user/user.module(366): user_load_multiple(Array, Array, false) #16 /usr/share/drush/commands/provision/platform/drupal/install_7.inc(159): user_load(1) #17 /usr/share/drush/commands/provision/platform/drupal/install_7.inc(169): install_main() #18 phar:///usr/local/bin/drush/includes/drush.inc(78): include_once('/usr/share/drus...') #19 phar:///usr/local/bin/drush/includes/engines.inc(520): drush_include('/usr/share/drus...', 'install') #20 /usr/share/drush/commands/provision/platform/provision_drupal.drush.inc(89): drush_include_engine('drupal', 'install') #21 [internal function]: drush_provision_drupal_provision_install_backend() #22 phar:///usr/local/bin/drush/includes/command.inc(366): call_user_func_array('drush_provision...', Array) #23 phar:///usr/local/bin/drush/includes/command.inc(217): _drush_invoke_hooks(Array, Array) #24 [internal function]: drush_command() #25 phar:///usr/local/bin/drush/includes/command.inc(185): call_user_func_array('drush_command', Array) #26 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array) #27 phar:///usr/local/bin/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch() #28 phar:///usr/local/bin/drush/includes/startup.inc(321): drush_main() #29 phar:///usr/local/bin/drush/drush(114): drush_startup(Array) #30 /usr/local/bin/drush(10): require('phar:///usr/loc...') #31 {main}

Commerce Kickstart build file:

api = 2
core = 7.x
; Include the definition for how to build Drupal core directly, including patches:
includes[] = drupal-org-core.make
; Download the install profile and recursively build all its dependencies:
projects[commerce_kickstart][version] = 2.x-dev

Proposed resolution

So that table indeed does not exist, the database has been created at that point of provision-install, but no tables have been created yet. So is there a step that I am missing?

CommentFileSizeAuthor
error_message.txt20.02 KBbel_sander
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bel_sander created an issue. See original summary.

omega8cc’s picture

Status: Active » Postponed (maintainer needs more info)

This could be either a result of using Redis as a cache backend selectively, or just a bug in the platform codebase with db updates trying to access some tables via cache clear calls, before they are created/updated, etc. Can you reproduce this with different version of Commerce Kickstart? Do you use Redis perhaps?

Jon Pugh’s picture

Version: 7.x-3.0 » 7.x-3.x-dev
Category: Support request » Feature request
Status: Postponed (maintainer needs more info) » Active
Issue tags: +ux

Actually, I just ran into this recently because a distro's required modules were not in place.

Further up the logs (above the SQL error) look for more logs that look like the distribution logs: "Installed node module" for example...

You might find more information here.

omega8cc: try it out: Add a "dependency:" in a distro's info file, it will fail but it will also throw that wicked looking PDO Exception....

Now at least we catch it and print the error!

From install_7.inc:


  try {
    install_drupal($settings);
  }
  catch (Exception $e) {
    drush_set_error('DRUPAL_INSTALL_FAILED');
    drush_log('Site installation caused an exception: ' . $e->getMessage(), 'error');

Since this is a pretty poor user experience, I am going to use this issue for the patch I was going to submit that prints the "Site Install Failed" trace when it fails.

Jon Pugh’s picture

Version: 7.x-3.x-dev » 7.x-4.x-dev

This happens if something as simple as a module is missing or a stray error comes through the install profile process.

Provision is checking for a site after it was rolled back, without event trying to catch the exception if the tables are not there.

This should be resolved with the new architecture in 4.x.

  • Jon Pugh committed d5171cc on 7.x-4.x
    Issue #2708727: Return from install_main() when install failed to...

  • Jon Pugh committed 37d19d1 on 2708727-site-install-fail-errors
    Issue #2708727: Return from install_main() when install failed to...
Jon Pugh’s picture

"Missing table"? But of course, the site didn't install!

Push to issue branch returns from install_main() after the site install failure is detected. The rest of install_main() code
assumes a working site. This prevents many bad error messages.

Jon Pugh’s picture

Version: 7.x-4.x-dev » 7.x-3.x-dev
Assigned: Unassigned » Jon Pugh
Priority: Normal » Major
Status: Active » Needs review
Jon Pugh’s picture

  • Jon Pugh committed 37d19d1 on 7.x-3.x
    Issue #2708727: Return from install_main() when install failed to...
helmo’s picture

Status: Needs review » Fixed

Merged

Status: Fixed » Closed (fixed)

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