Moodle 2.1 update from 2.0

Moodle 2.1 update from 2.0

by Ross Nicoll -
Number of replies: 6

We (the team at St Andrews university that manages the local Moodle installation) have been asked about moving to Moodle 2.1 over summer. We moved to Moodle 2.0 earlier in the month (with some hiccups, but got there in the end).

 

I've been trying to do an upgrade on our test server, using a copy of our live install. On Friday, it errored due to http://tracker.moodle.org/browse/MDL-27929. Yesterday (Saturday), apparently /lib/setup.php was missing (presumably a packaging hiccup). Today, it appeared to start the upgrade then hang (alas, it took me 4 hours of wishing I'd get some sort of update before I thought to check the processes running and process list on MySQL).

 

Am I cursed/doing it wrong? More specifically, have others tried upgrading large Moodle installs and how has that gone?

Average of ratings: -
In reply to Ross Nicoll

Re: Moodle 2.1 update from 2.0

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Two factors are that it is still beta so you would expect some issues. The other is that it is an entirely new question engine so check if you are particularly dependent on non standard/core question types.

In reply to Ross Nicoll

Re: Moodle 2.1 update from 2.0

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

It should just work - and it will once we have got the bugs ironed out. Thank you for your help with testing MDL-27929.

Are you using the command-line upgrade? That is probably more reliable that going through your web browser. http://docs.moodle.org/20/en/Administration_via_command_line

Also, I would recommend turning on Debugging during the upgrade, to get the maximum amount of diagnostics in case of an error.

Average of ratings: Useful (1)
In reply to Tim Hunt

Re: Moodle 2.1 update from 2.0

by Ross Nicoll -

In hindsight, think I may have assumed the problem was MDL-27929 a little too hastily, sorry. Saw "unsigned" in the MySQL error and assumed that was the issue. I've got the same bug back again (looks like issues over the weekend were a snag with the database, actually). Full log at the bottom of this message, but it looks to me like an objection to making contextid not null. Just looked in the database and there's 562 cases where it's null.

I'm going to guess that's not meant to happen, and is really bad?

/var/www/moodle-2/admin/cli$ /usr/bin/php upgrade.php 
== Upgrading Moodle database from version 2.0.3 (Build: 20110505) (2011033003) to 2.1beta (Build: 20110624) (2011062400) ==

-------------------------------------------------------------------------------
== Notice ==
You are going to install or upgrade Moodle to a version marked as "Beta"
that is not considered as production-ready yet. Please make sure this is intentional
and that you are using correct checkout of Moodle source code.
More help: http://docs.moodle.org/20/en/admin/versions
-------------------------------------------------------------------------------
Your Moodle files have been changed, and you are about to automatically
upgrade your server to this version:

 2.1BETA (BUILD: 20110624) (2011062400)

 Once you do this you can not go back again.

 Please note that this process can take a long time.

 Are you sure you want to upgrade this server to this version?
type y (means yes) or n (means no)
: y
-->System
Default exception handler: DDL sql execution error Debug: Data truncated for column 'contextid' at row 1
ALTER TABLE mdl_question_usages MODIFY COLUMN contextid BIGINT(10) unsigned NOT NULL after id
* line 399 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
* line 655 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 88 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
* line 75 of /lib/ddl/database_manager.php: call to database_manager->execute_sql()
* line 636 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
* line 672 of /lib/ddl/database_manager.php: call to database_manager->change_field_type()
* line 6198 of /lib/db/upgrade.php: call to database_manager->change_field_notnull()
* line 1417 of /lib/upgradelib.php: call to xmldb_main_upgrade()
* line 141 of /admin/cli/upgrade.php: call to upgrade_core()

!!! DDL sql execution error !!!
!! Data truncated for column 'contextid' at row 1
ALTER TABLE mdl_question_usages MODIFY COLUMN contextid BIGINT(10) unsigned NOT NULL after id !!
!! Stack trace: * line 399 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
* line 655 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 88 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
* line 75 of /lib/ddl/database_manager.php: call to database_manager->execute_sql()
* line 636 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
* line 672 of /lib/ddl/database_manager.php: call to database_manager->change_field_type()
* line 6198 of /lib/db/upgrade.php: call to database_manager->change_field_notnull()
* line 1417 of /lib/upgradelib.php: call to xmldb_main_upgrade()
* line 141 of /admin/cli/upgrade.php: call to upgrade_core()
 !!
In reply to Ross Nicoll

Re: Moodle 2.1 update from 2.0

by Ross Nicoll -

Just realised this is http://tracker.moodle.org/browse/MDL-28028 (and this time I got the ticket number right). Will check back later in the week.

In reply to Ross Nicoll

Re: Moodle 2.1 update from 2.0

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Yes. Hopefully I can get MDL-28028 fixed today or tomorrow.

In reply to Tim Hunt

Re: Moodle 2.1 update from 2.0

by Basil Gohar -
We ran into this just now. Anxiously awaiting an update on this. Thanks for being so proactive about it. smile