[Ongoing] Ensure system requirements are checked before installation/upgrade starts

Bug #806764 reported by François Marier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Unassigned

Bug Description

If the install/upgrade is going to fail, it should ideally fail before it starts writing to the DB (especially on MySQL).

We should therefore make sure that any system requirements checks are done prior to the install / upgrade.

http://mahara.org/interaction/forum/topic.php?id=3777

Changed in mahara:
status: New → Confirmed
status: Confirmed → Triaged
importance: Undecided → High
milestone: none → 1.5.0
Revision history for this message
Melissa Draper (melissa) wrote :

I have pushed https://reviews.mahara.org/954 for the specific case spelled out in the forum post, but I'm sure that this isn't a full fix for this bug; it's the kind of issue that should be kept open indefinitely.

Changed in mahara:
status: Triaged → In Progress
assignee: nobody → Melissa Draper (melissa)
Changed in mahara:
milestone: 1.5.0 → none
Changed in mahara:
status: In Progress → Triaged
assignee: Melissa Draper (melissa) → nobody
Melissa Draper (melissa)
Changed in mahara:
milestone: none → 1.6.0
summary: - Ensure system requirements are checked before installation/upgrade
- starts
+ [Ongoing] Ensure system requirements are checked before
+ installation/upgrade starts
Changed in mahara:
status: Triaged → Confirmed
Revision history for this message
Son Nguyen (ngson2000) wrote :

Selenium tests for Mahara installation

No. 01
Version: 1.6_STABLE
Platform: Ubuntu 11.10
Web: Apache 2.2.20, PHP 5.3.6
Database: PostgresSQL 9.1.3
Result: PASSED

No. 02
Version: 1.6_STABLE
Platform: Ubuntu 11.10
Web: Apache 2.2.20, PHP 5.3.6
Database: MySQL 5.1.63
Result: PASSED

to be continued...

Revision history for this message
Son Nguyen (ngson2000) wrote :

No. 03
Version: 1.5.2
Platform: Ubuntu 11.10
Web: Apache 2.2.20, PHP 5.3.6
Database: PostgresSQL 9.1.3
Result: PASSED

No. 04
Version: 1.5.2
Platform: Ubuntu 11.10
Web: Apache 2.2.20, PHP 5.3.6
Database: MySQL 5.1.63
Result: PASSED

Revision history for this message
Son Nguyen (ngson2000) wrote :

No. 05
Version: 1.4.3
Platform: Ubuntu 11.10
Web: Apache 2.2.20, PHP 5.3.6
Database: PostgresSQL 9.1.3
Result: PASSED

No. 06
Version: 1.4.3
Platform: Ubuntu 11.10
Web: Apache 2.2.20, PHP 5.3.6
Database: MySQL 5.1.63
Result: PASSED

Revision history for this message
Son Nguyen (ngson2000) wrote :

Here is the list of the top 5 Linux Distributions on web servers (source: http://w3techs.com/technologies/details/os-linux/all/all)

1. Debian 31.4%
2. CentOS 28.2%
3. Ubuntu 20.6%
4. Red Hat 11.2%
5. Fedora 3.9%

Changed in mahara:
assignee: nobody → Son Nguyen (ngson2000)
Revision history for this message
Son Nguyen (ngson2000) wrote :

No. 07
Version: 1.6_STABLE
Platform: Ubuntu 11.10
Web: Apache 2.2.20, PHP 5.3.6
Database: PostgresSQL 8.3
Result: PASSED

Revision history for this message
Son Nguyen (ngson2000) wrote :

No. 08: Mahara 1.6 installation test
Version: 1.6_STABLE
Platform: Ubuntu 12.04
Web:
  - Apache 2.2.22
  - PHP 5.3.10, and PHP 5.4.6
Database:
  - PostgresSQL 8.4 and 9.1
  - MySQL 5.5
Result: PASSED

Revision history for this message
Son Nguyen (ngson2000) wrote :

No. 09: Mahara 1.6 installation tests
Version: 1.6_STABLE
Platform: Ubuntu 11.10
Web:
  - Apache 2.2
  - PHP 5.3.6, and PHP 5.4.6
Database:
  - PostgresSQL 8.4 and 9.1
  - MySQL 5.1 and 5.5
Result: PASSED

Revision history for this message
Son Nguyen (ngson2000) wrote :

No. 10: Mahara upgrade tests
Version: from 1.5_STABLE to 1.6_STABLE
Mahara DB: fresh
Platform: Ubuntu 11.10
Web server:
  - Apache 2.2
  - PHP 5.3.6
Database server:
  - PostgresSQL 9.1
  - MySQL 5.1
Result: PASSED

Revision history for this message
Son Nguyen (ngson2000) wrote :

-----------FAILED---------------
No. 10: Mahara 1.5 installation tests
Version: 1.5_STABLE
Platform: Ubuntu 12.04
Web:
  - Apache 2.2
  - PHP 5.4.6
Database:
  - PostgresSQL 9.1
Result: FAILED
-----------FAILED---------------

Revision history for this message
Son Nguyen (ngson2000) wrote :
Download full text (10.9 KiB)

Error log:

[INF] 0f (admin/upgrade.php:54) Starting Mahara installation...
[INF] a7 (lib/upgrade.php:1094) Enabled 2 HTML filters.
[INF] a7 (admin/upgrade.json.php:97) - core 1.5.3testing (2012041007)
[INF] 32 (admin/upgrade.json.php:65) - firstcoredata
[INF] ee (admin/upgrade.json.php:65) - localpreinst
[WAR] 4c (lib/mahara.php:938) Creating default object from empty value
Call stack (most recent first):

    log_message("Creating default object from empty value", 8, true, true, "/home/user/code/mahara/htdocs/lib/mahara.php", 938) at /home/user/code/mahara/htdocs/lib/errors.php:446
    error(2, "Creating default object from empty value", "/home/user/code/mahara/htdocs/lib/mahara.php", 938, array(size 8)) at /home/user/code/mahara/htdocs/lib/mahara.php:938
    set_config_plugin("artefact", "comment", "commenteditabletime", 10) at /home/user/code/mahara/htdocs/artefact/comment/lib.php:87
    PluginArtefactComment::postinst(0) at Unknown:0
    call_user_func_array(array(size 2), array(size 1)) at /home/user/code/mahara/htdocs/lib/mahara.php:1339
    call_static_method("PluginArtefactComment", "postinst", 0) at /home/user/code/mahara/htdocs/lib/upgrade.php:519
    upgrade_plugin(object(stdClass)) at /home/user/code/mahara/htdocs/admin/upgrade.json.php:94

[INF] 4c (admin/upgrade.json.php:97) - artefact.comment 0.0.2 (2011011201)
[INF] 3f (admin/upgrade.json.php:97) - artefact.resume 1.0.1 (2010020300)
[INF] 25 (admin/upgrade.json.php:97) - artefact.plans 0.0.1 (2010072302)
[INF] c9 (admin/upgrade.json.php:97) - artefact.blog 1.1.0 (2011091400)
[WAR] 24 (lib/mahara.php:938) Creating default object from empty value
Call stack (most recent first):

    log_message("Creating default object from empty value", 8, true, true, "/home/user/code/mahara/htdocs/lib/mahara.php", 938) at /home/user/code/mahara/htdocs/lib/errors.php:446
    error(2, "Creating default object from empty value", "/home/user/code/mahara/htdocs/lib/mahara.php", 938, array(size 8)) at /home/user/code/mahara/htdocs/lib/mahara.php:938
    set_config_plugin("artefact", "file", "defaultquota", 52428800) at /home/user/code/mahara/htdocs/artefact/file/lib.php:95
    PluginArtefactFile::postinst(0) at Unknown:0
    call_user_func_array(array(size 2), array(size 1)) at /home/user/code/mahara/htdocs/lib/mahara.php:1339
    call_static_method("PluginArtefactFile", "postinst", 0) at /home/user/code/mahara/htdocs/lib/upgrade.php:519
    upgrade_plugin(object(stdClass)) at /home/user/code/mahara/htdocs/admin/upgrade.json.php:94

[INF] 24 (artefact/file/lib.php:220) Updated filetype list: 73 added.
[INF] 24 (admin/upgrade.json.php:97) - artefact.file 1.2.0 (2011082200)
[INF] bc (admin/upgrade.json.php:97) - artefact.internal 1.1.0 (2011071200)
[INF] 6b (admin/upgrade.json.php:97) - auth.saml 1.1.0 (2009072000)
[INF] 84 (admin/upgrade.json.php:97) - auth.imap 1.0.0 (2008040200)
[INF] 9c (admin/upgrade.json.php:97) - auth.browserid 1.0.0 (2012011000)
[INF] 86 (admin/upgrade.json.php:97) - auth.none 1.0.0 (20...

Changed in mahara:
status: Confirmed → In Progress
Revision history for this message
Son Nguyen (ngson2000) wrote :

I did several upgrade tests for Myportfolio DB

No. 11: Mahara upgrade tests
Version: from 1.5 to 1.6_STABLE
Mahara DB: Myportfolio DB
Platform: Ubuntu 12.04
Web server:
  - Apache 2.2
  - PHP 5.3.10 and PHP 5.4.6
Database server:
  - PostgresSQL 8.4 and 9.1
Result: PASSED

Changed in mahara:
milestone: 1.6.0 → 1.7.0
assignee: Son Nguyen (ngson2000) → nobody
Revision history for this message
Hugh Davenport (hugh-davenport) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 status fixreleased
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iJwEAQECAAYFAlCbHO8ACgkQuMoJ2LQ3zxH8TAP/YN4BiCJZsn5a899/0UzV31Qg
lM8LXAwZWa6zFv6t0BQUHCqe6eFK9wPp51qgCWWXjUZ3vvvVcsyeWp6626aBFKSU
pCQXI9E7huPw802nJQ9WcZXRBUmgw87ww72Tx4mybnu7SPSrkZgXdnPGSMwDs89N
oWvTpl7Xuac48e6p0lU=
=ouU+
-----END PGP SIGNATURE-----

Changed in mahara:
status: In Progress → Fix Released
Revision history for this message
Aaron Wells (u-aaronw) wrote :

Changing status to "Incomplete", because this is meant to be an "ongoing maintenance" ticket to review this stuff before each major release.

Changed in mahara:
status: Fix Released → Incomplete
milestone: 1.7.0 → 1.8.0
Revision history for this message
Dominique-Alain JAN (dajan) wrote :

Does this bug also encompass the information I gave you about the diff in the database structure that multiple and successive upgrades can create?

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Hi dajan,

I opened a separate bug for that: https://bugs.launchpad.net/mahara/+bug/1174623

I would like to get that fixed, so that we can encourage people to upgrade more freely.

Cheers,
Aaron

Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.8rc1 → 1.8.0
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.8.0 → 1.9.0
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.9.0 → 1.10.0
Revision history for this message
Aaron Wells (u-aaronw) wrote :

Closing this bug because it hasn't been particularly useful. Perhaps we should just put together a "pre-release checklist" of things to check or keep in mind before each release, instead of accumulating a series of ongoing bugs?

Changed in mahara:
milestone: 1.10.0 → 1.11.0
status: Incomplete → Fix Committed
milestone: 1.11.0 → none
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.