3.3.1+ to 3.3.2+ Upgrade Failure

3.3.1+ to 3.3.2+ Upgrade Failure

by Natassia Stelmaszek -
Number of replies: 2

This morning I tried to update my Production system from version 3.3.1+ to 3.3.2+ in the same manner as I upgraded my test (Beta) system last week.  I got stuck in maintenance mode during the upgrade process and wound up restoring the previous version to get the site running again.  The users appear to have normal access but my admin account is stuck trying to update the database.

I am wondering what might have caused my problem and how to escape from my html prison!

Details:

Both systems are running CentOS 7 and PHP 7.0.21.  The procedure on the Beta system went smoothly, updating via git pull and currently at 3.3.1+ (Build 20170714).  When I tried to update the Production server I got the message:


error: Your local changes to the following files would be overwritten by merge:        theme/clean/classes/core_renderer.php

Please, commit your changes or stash them before you can merge.

Aborting

Following that I did a git checkout of the moodle 33 stable branch (which had already been done in June) and it gave me a list of the files that it thought needed to be committed.  All of the files were under the theme/clean or theme/more so I thought that they were modifications that we had performed locally since the last update.  I had those files backed up so I used:

git checkout <file>

to discard the changes in the "working" directory.  Which allowed "git pull" to run to completion.  This was all done from the command line using sudo so permissions should not have been an issue.  When I went back to the web interface I was expecting the system to present me with any new configuration items which I would accept at their default values and then update the database.

Instead of that I arrived at a screen for installing Moodle.  I couldn't find a way to abort the installation from the available options.  I tried closing the window and logging back in but it kept taking me to same installation screen.

I was already outside of my maintenance window so I tried disabling Maintenance Mode from the cli, that didn't work.  Next I took a tarred copy of my backup and extracted it into the moodle directory and that allowed me to disable Maintenance Mode from the cli and made the site available to ordinary users.

While I've been typing this my admin login timed out so I was able to browse to the site normally but when I logged in, it took me to a "Plugins check" page (https://moodle.redactedname.edu/admin/index.php)  where it lists two plugin updates that I already knew about and complains that "theme clean" is unavailable even though it was restored along with the rest of the files in the tar ball.

Is there a back door method that I can use to regain control of my admin account?

Do you have any suggestions about what I should do before retrying the update?


Thanks in advance,

Natassia


Average of ratings: -
In reply to Natassia Stelmaszek

Re: 3.3.1+ to 3.3.2+ Upgrade Failure

by Ken Task -
Picture of Particularly helpful Moodlers

Had similar problem recently ...

From the directory containing the moodle code you desire to upgrade ... it is 3.3.1 ...

(you can check using fgrep '$release' version.php)

Normally one doesn't have to re-issue these but do so anyway just to make sure

git branch –track MOODLE_33_STABLE origin/MOODLE_33_STABLE

git checkout MOODLE_33_STABLE

git reset –hard

Then check the branch:

git branch -a

* should be Moodle 33

Check version file;

fgrep '$release' version.php for version and build date.

IF it checks out ok, then:

php admin/cli/maintenance.php --enable

git pull

php admin/cli/upgrade.php --non-interactive

php admin/cli/maintenance.php --disable

chown apache:apache * -R

Then hit site to see if there are plugins that need attending to.

Obviously, good idea to have an archive of code and a DB dump - before git pulling/updating/upgrading.

'spirit of sharing', Ken


In reply to Ken Task

Re: 3.3.1+ to 3.3.2+ Upgrade Failure

by Natassia Stelmaszek -

I think that the "git reset" made the difference.  I was able to update my production server without any trouble.

Thanks again,

Natassia