Hi,

I just installed the latest version of drush (HEAD-all-versions as of 2009-Apr-17) and I am trying to run "drush updatedb" on a fresh DRUPAL-6-9 installation upgraded to DRUPAL-6-10. The status report shows one update (6049 for the system module). Running this update by hand trough the update wizard on the site works fine. However, running it with "drush updatedb" does not seem to do much. The update remains pending and nothing is output to the command line.

Here is the verbose output:

$ drush --verbose updatedb
Initialized Drupal 6.10 root directory at /Users/mb216204/Sites/dev.temp1                                                       [notice]
Initialized Drupal site default at sites/default                                                                                                   [notice]
Including version specific file : /Users/mb216204/Sites/aegir/drush/commands/core/drupal/update_6.inc            [notice] 
$

I've run all sorts of drush commands (enable, disable, statusmodules, cron, provision backup...) to test my installation and they all seem to work fine. Uninstalling provision from ~/.drush didn't change anything apparently.

The behaviour is identical with drush@DRUPAL-6--2-0-ALPHA2

Am I missing something?

Thanks,

Matt

Comments

moshe weitzman’s picture

Assigned: Unassigned » adrian
adrian’s picture

run with --verbose=2 and paste the output.

it seems like it is not reaching the complete bootstrap it needs to.

mlbrgl’s picture

Thanks adrian, here is the --verbose=2 output, run from the drupal root:

$ drush --verbose=2 updatedb

Drush bootstrap phase : _drush_bootstrap_drupal_root()                                                                        [bootstrap]
Initialized Drupal 6.10 root directory at /Users/mb216204/Sites/dev.temp1                                               [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_site()                                                                         [bootstrap]
Initialized Drupal site default at sites/default                                                                                           [notice]
Found command: updatedb                                                                                                                    [bootstrap]
Including version specific file : /Users/mb216204/Sites/aegir/drush/commands/core/drupal/update_6.inc    [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration()                                                            [bootstrap]

Matt

mlbrgl’s picture

Hi,

I retried this in an Aegir 0.2-alpha1 environment, following the steps outlined on http://groups.drupal.org/aegir/0.2-ALPHA1.
As a reminder, here are the versions of the modules used:

  • drush: DRUPAL-5--2-0-ALPHA2
  • provision: DRUPAL-5--0-2-ALPHA1
  • hostmaster: DRUPAL-5--0-2-ALPHA1
  • hosting: DRUPAL-5--0-2-ALPHA1

Then, I created

  • a DRUPAL-6-9 platform
  • a new hosted site on this platform
  • a DRUPAL-6-10 platform

At this point, everything looked OK and all the queued tasks were executed successfully (Install, Verify, etc.). I could also access the newly created hosted site, running on a DRUPAL-6-9 platform.

I then migrated the site from 6.9 to 6.10. Once again, all the tasks completed successfully and my site was now running on the DRUPAL-6-10 platform. However, the update.php was not run during the migration as I thought it would (the update page would show the same pending update as in my first post - 6049 for the system module).

I also tried upgrading the date module within the same version of drupal (6.10), thinking that the automated db update might not work for drupal core yet.
I set up two DRUPAL-6-10 platforms, one with date@DRUPAL-6--2-0-RC4 (on platform [a]) and another one with date@DRUPAL-6--2-0-RC5 on platform [b]. I ran a verify task on both platforms to make sure that the front end was aware of those modules, installed in sites/all/modules. I enabled date@DRUPAL-6--2-0-RC4 on an existing site on platform [a] and migrated it over to platform [b].
The required DB update from date@DRUPAL-6--2-0-RC4 to date@DRUPAL-6--2-0-RC5 didn't run though (update 6003).

Running drush updatedb from the command line still does not help. Here is the output:

$ drush --verbose=2 -l dev.hosted1 updatedb 
Drush bootstrap phase : _drush_bootstrap_drupal_root()                                                                          [bootstrap]
Loading drushrc "/Users/mb216204/Sites/aegir/drupal-6-10-1/drushrc.php" into "drupal" scope.                                    [bootstrap]
Initialized Drupal 6.10 root directory at /Users/mb216204/Sites/aegir/drupal-6-10-1                                             [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_site()                                                                          [bootstrap]
Initialized Drupal site  at sites/dev.hosted1                                                                                   [notice]
Loading drushrc "/Users/mb216204/Sites/aegir/drupal-6-10-1/sites/dev.hosted1/drushrc.php" into "site" scope.                    [bootstrap]
Found command: updatedb                                                                                                         [bootstrap]
Initializing drush commandfile: provision_apache                                                                                [bootstrap]
Initializing drush commandfile: provision_drupal                                                                                [bootstrap]
Initializing drush commandfile: provision_mysql                                                                                 [bootstrap]
Including version specific file : /Users/mb216204/Sites/aegir/drush/commands/core/drupal/update_6.inc                           [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration()                                                                 [bootstrap]

I read on the Aegir 0.2-alpha1 release page:
5. Added the Migrate feature.
The system is now capable of migrating, or upgrading, sites between Drupal platforms. This also includes the execution of update.php and a fully working recovery path, in case anything goes wrong

From this sentence, I would have expected my previous scenarii to successfully run update.php but that didn't happen apparently.
I feel like I am missing or misunderstanding something so could you please tell me whether the current system is capable of automatically running the necessary db updates after a migration, both for drupal core and contributed modules?

Thanks for looking into this. Please let me know if you need more info or testing done on my side.

Matt

chrisschaub’s picture

FYI, I think the problem is using "/usr/bin/env php" at the beginning of drush.php. Try calling drush with:

/usr/local/bin/php -n ./drush/drush/php updatedb

The problem is that env finds the php that runs in apache as cgi, no the CLI version.

moshe weitzman’s picture

Status: Active » Closed (duplicate)
mlbrgl’s picture

Thanks lutegrass. It seems like the "-n" did all the magic so it's got something to do with my php configuration.
NB (from "man php"): -n No php.ini file will be used

I'll try again with a different setup to see if I can troubleshoot any further.

Thanks again for your help,

Matt

Related issue (for reference): #441470: Improve php executable location detection logic