I've been testing the upgrade of an experimental aegir hostmaster .... which is far from a clean install. But that's probably more realistic then the jenkins job we have now.

Error just at the start of running database updates:

PHP Fatal error:  Class 'DrupalDefaultEntityController' not found in /data/aegir/hostmaster-7.x-3.x/modules/user/user.module on line 300
Drush command terminated abnormally due to an unrecoverable error.   

And after some tinkering...
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'source' in 'field list' [35.21 sec, 5.17 MB]

I've also been looking at /includes/update.inc from core 7.x which has some extra code to smooth the upgrade path.

With cck enabled I got this error:

Drush command terminated abnormally due to an unrecoverable error.                                                                                                                                                                                                               [error]
Error: Call to undefined function db_fetch_array() in /var/aegir/hostmaster-6.x-2.1/sites/aegir.example.com/modules/cck/content.install, line 188 [35.28 sec, 5.16 MB]
PHP Fatal error:  Call to undefined function db_fetch_array() in /var/aegir/hostmaster-6.x-2.1/sites/aegir.example.com/modules/cck/content.install on line 188

Fatal error: Call to undefined function db_fetch_array() in /var/aegir/hostmaster-6.x-2.1/sites/aegir.example.com/modules/cck/content.install on line 188
Cache HIT cid: 7.0-dev-alias-path--63d267a057dad22af3267291be26789f [35.28 sec, 16.82 MB]                                                                                                                                                                                            [debug]
The external command could not be executed due to an application error. [35.45 sec, 5.16 MB]                                                                                                                                                                                     [error]
finish upgrade_7.inc [35.45 sec, 9.81 MB]    

So, another preparation step, to disable site specific modules as these will not automatically have a new D7 version on the target platform:
ls /var/aegir/hostmaster-6.x-2.1/sites/aegir.example.com/modules/ | xargs drush @hostmaster pm-disable

I'm working on a patch to work passed these...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

helmo’s picture

With this patch I get to another error:

Drush bootstrap phase : _drush_bootstrap_drupal_login() [38.35 sec, 10.4 MB]                                                                                                                                                                                                     [bootstrap]
WD php: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'disabled' in 'where clause': SELECT nt.*                                                                                                                                                           [error]
FROM 
{node_type} nt
WHERE  (disabled = :db_condition_placeholder_0) 
ORDER BY nt.type ASC; Array
(
    [:db_condition_placeholder_0] => 0
)
 in _node_types_build() (line 738 of /var/aegir/hostmaster-7.x-3.x/modules/node/node.module). [38.36 sec, 10.45 MB]
Cannot modify header information - headers already sent by (output started at /var/aegir/src/drush/includes/output.inc:38) bootstrap.inc:1233 [38.36 sec, 10.45 MB]                                                                                                             [warning]
Drush command terminated abnormally due to an unrecoverable error. [38.36 sec, 5.25 MB]                                                                                                                                                                                          [error]
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'disabled' in 'where clause': SELECT nt.*
FROM 
{node_type} nt
WHERE  (disabled = :db_condition_placeholder_0) 
ORDER BY nt.type ASC; Array
(
    [:db_condition_placeholder_0] => 0
)
 in _node_types_build() (line 738 of /var/aegir/hostmaster-7.x-3.x/modules/node/node.module).
Drush was not able to start (bootstrap) Drupal.                                                                                                                                                                                                                                  [error]

The node_type.disabled column is added in node_update_7000() so it seems that I'm bootstrapping to far ... before the database updates are run.

helmo’s picture

The result of having ctools not enabled before starting the upgrade ... I had disabled it with the xargs command in #0

Executing system_update_7053 [44.93 sec, 16.25 MB]                                                                                                                                                                                                                                  [notice]
PHP Fatal error:  Call to undefined function ctools_include() in /var/aegir/hostmaster-7.x-3.x/profiles/hostmaster/modules/contrib/views/views.module on line 1066

Fatal error: Call to undefined function ctools_include() in /var/aegir/hostmaster-7.x-3.x/profiles/hostmaster/modules/contrib/views/views.module on line 1066
Drush command terminated abnormally due to an unrecoverable error.                                                                                                                                                                                                               [error]
Error: Call to undefined function ctools_include() in /var/aegir/hostmaster-7.x-3.x/profiles/hostmaster/modules/contrib/views/views.module, line 1066 [44.95 sec, 5.41 MB]
helmo’s picture

I think I solved the error from #1 with a bootstrap change in Drush, see patch.

This was introduced in Drush in https://github.com/drush-ops/drush/commit/b45184a02b914a8a1055d37733d5f4...

After this all updates ran successful. Follow up work is still needed to check any customizations...

helmo’s picture

I've opened a drush issue on https://github.com/drush-ops/drush/issues/961

helmo’s picture

Status: Active » Needs work

Drush issue https://github.com/drush-ops/drush/issues/961 is now fixed :)

The patch from #1 still seems like a good idea... It probably solves #2373835-7: 3.x doesn't currently install
It just needs a test to see if we're upgrading from 6 to 7.

helmo’s picture

Status: Needs work » Fixed

As it's now a generic D6 D7 upgrade problem ... continuing in a new issue: #2382663: Upgrade D6-D7 broken with Drush master

Status: Fixed » Closed (fixed)

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