Bug 29378 - After the automatic update to 21.05.05, the OPAC switches to maintenance mode and the web installer is displayed
Summary: After the automatic update to 21.05.05, the OPAC switches to maintenance mode...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (web-based installer) (show other bugs)
Version: 21.05
Hardware: All All
: P5 - low blocker
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-30 14:08 UTC by Pavel Bédi
Modified: 2022-06-06 20:25 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
DBRev 21.05.05.002 (1.03 KB, patch)
2021-10-31 00:57 UTC, Mason James
Details | Diff | Splinter Review
DBRev 21.05.05.003 (1.56 KB, patch)
2021-10-31 03:07 UTC, Mason James
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Bédi 2021-10-30 14:08:48 UTC
I wanted to log in to the Staff interface after the automatic update on 21.05.05 but I saw Welcome to the Koha 21.05 web installer. So I logged in with the data I found in the koha-conf.xml configuration file. After a few steps, I updated the database from version 21.05.04.003 to 21.05.05.000. It wrote that the operation was successful and I was able to continue to the login page. Unfortunately, I got back to the Check Perl dependencies installation wizard.
URL structure is: http://staff-library.sample.com/cgi-bin/koha/installer/install.pl?step=1&op=updatestructure
Comment 1 Katrin Fischer 2021-10-30 14:14:31 UTC
Hi Pavel,
there is actually a small mistake in the version that is causing this that will be fixed as soon as possible. Do you have access to your database with SQL?
Comment 2 Pavel Bédi 2021-10-30 14:21:56 UTC
(In reply to Katrin Fischer from comment #1)
> Hi Pavel,
> there is actually a small mistake in the version that is causing this that
> will be fixed as soon as possible. Do you have access to your database with
> SQL?

Yes, I have.
Comment 3 Katrin Fischer 2021-10-30 14:37:51 UTC
Ok, the problem is that the version in Koha.pm doesn't match the one in the database because of a forgotten database update. When they both match again, you will get out of the installer loop.

Koha.pm has:
$VERSION = "21.05.05.000";

So this should do the trick:
UPDATE systempreferences SET value = "21.0505000" where variable = "Version";

You might need to restart Plack/Memcached for Koha to take notice.
Comment 4 Katrin Fischer 2021-10-30 14:53:09 UTC
Did it work alright? Leaving this open as we still need to fix it in Koha.
Comment 5 Pavel Bédi 2021-10-30 14:53:52 UTC
(In reply to Katrin Fischer from comment #4)
> Did it work alright? Leaving this open as we still need to fix it in Koha.

Yes, thank you very much!
Comment 6 Mason James 2021-10-31 00:55:50 UTC
(In reply to Katrin Fischer from comment #4)
> Did it work alright? Leaving this open as we still need to fix it in Koha.

i've pushed a new 21.05.05-2 package, with the database update added
Comment 7 Mason James 2021-10-31 00:57:30 UTC
Created attachment 127123 [details] [review]
DBRev 21.05.05.002
Comment 8 Mason James 2021-10-31 00:59:48 UTC
hi Kyle,
i've attached a patch, to be added to the 21.05 branch
Comment 9 Victor Grousset/tuxayo 2021-10-31 02:11:56 UTC
$DBversion = '21.05.05.002';
Minor mistake in the patch. The 4th part should be zeroed when incrementing the 3rd part for a release.

Example from a past release:
https://git.koha-community.org/Koha-community/Koha/commit/b17cf65633107306bd5d423998a50b65aaecce65

This means the version in DB > version in code:
https://git.koha-community.org/Koha-community/Koha/commit/ba30e76d1a08ef84e66583cd4638f6150ffdeee2

I don't think that should cause issues (though I don't know eventual quirks of version management).
Comment 10 Victor Grousset/tuxayo 2021-10-31 02:25:50 UTC
(but it's important for Kyle and Nick to account for that and not fix it by starting from 21.05.05.000 because it's been distributed and ran already)
Comment 11 Mason James 2021-10-31 03:07:00 UTC
Created attachment 127125 [details] [review]
DBRev 21.05.05.003
Comment 12 Mason James 2021-10-31 03:08:12 UTC
(In reply to Victor Grousset/tuxayo from comment #10)
> (but it's important for Kyle and Nick to account for that and not fix it by
> starting from 21.05.05.000 because it's been distributed and ran already)

i've released a package as 21.05.05.003, so here's the patch for that
Comment 13 Mason James 2021-10-31 03:13:51 UTC
(In reply to Mason James from comment #12)
> (In reply to Victor Grousset/tuxayo from comment #10)
> > (but it's important for Kyle and Nick to account for that and not fix it by
> > starting from 21.05.05.000 because it's been distributed and ran already)
> 
> i've released a package as 21.05.05.003, so here's the patch for that

root@deb10:/home/mason# apt-cache policy koha-common
koha-common:
  Installed: 21.05.05-3
  Candidate: 21.05.05-3
  Version table:
 *** 21.05.05-3 500
        500 http://debian.koha-community.org/koha stable/main amd64 Packages
        100 /var/lib/dpkg/status
Comment 14 Katrin Fischer 2021-10-31 10:11:10 UTC
Victor is right, that it should have been 21.05.05.000, because the 003 suggests 3 database updates in the cycle up to 21.05.05. It usually goes like this:

21.05.04.000 (release of 21.05.04)
21.05.04.001 (first database update for 21.05.05)
21.05.04.002 (second database update for 21.05.05
...
21.05.05.000 (release of 21.05.05 - which was missing here)
21.05.05.001 (first database update for 21.05.06)
...

I guess we could either set back to 21.05.05.000 at the beginning of the cycle now or Kyle will have to start 21.05.05.004 now.

Just trying to explain the misunderstanding and why we need to deal with it now. As the packages are out there, it's too risky not to deal with the unexpected jump.
Comment 15 Katrin Fischer 2021-10-31 10:13:09 UTC
(In reply to Katrin Fischer from comment #14)
> Victor is right, that it should have been 21.05.05.000, because the 003
> suggests 3 database updates in the cycle up to 21.05.05. 

Argh. This should be: in the cylce up to 21.05.06!
Comment 16 Victor Grousset/tuxayo 2021-10-31 15:08:43 UTC
> I guess we could either set back to 21.05.05.000 at the beginning of the cycle now or Kyle will have to start 21.05.05.004 now.

The DB upgrade to 21.05.05.002 has already been released so we can't move it backwards right?
So Kyle should just have to continue from 21.05.05.004
Comment 17 Katrin Fischer 2021-10-31 15:10:40 UTC
(In reply to Victor Grousset/tuxayo from comment #16)
> > I guess we could either set back to 21.05.05.000 at the beginning of the cycle now or Kyle will have to start 21.05.05.004 now.
> 
> The DB upgrade to 21.05.05.002 has already been released so we can't move it
> backwards right?
> So Kyle should just have to continue from 21.05.05.004

You are probably right about continuing with 21.05.05.004. Maybe there won't even be a database update this cycle so we can jump to 21.05.06.000 next.
Comment 18 Mason James 2021-11-12 09:17:37 UTC
(In reply to Katrin Fischer from comment #17)
> (In reply to Victor Grousset/tuxayo from comment #16)
> > > I guess we could either set back to 21.05.05.000 at the beginning of the cycle now or Kyle will have to start 21.05.05.004 now.
> > 
> > The DB upgrade to 21.05.05.002 has already been released so we can't move it
> > backwards right?
> > So Kyle should just have to continue from 21.05.05.004
> 
> You are probably right about continuing with 21.05.05.004. Maybe there won't
> even be a database update this cycle so we can jump to 21.05.06.000 next.

yes, i think Katrin is correct :)
Comment 19 Fridolin Somers 2021-11-12 22:55:17 UTC
I see this is actually in 21.05.x :
https://git.koha-community.org/Koha-community/Koha/commit/1b39d0717a4b81cda28c72e07bb47e534d9d205b

And there is a DBRev 21.05.05.004 for Bug 29386

So problem solved ?
Comment 20 Mason James 2021-11-15 05:44:15 UTC
(In reply to Fridolin Somers from comment #19)
> I see this is actually in 21.05.x :
> https://git.koha-community.org/Koha-community/Koha/commit/
> 1b39d0717a4b81cda28c72e07bb47e534d9d205b
> 
> And there is a DBRev 21.05.05.004 for Bug 29386
> 
> So problem solved ?

i think yes, we can close the bug