2.1 -> 2.2 upgrade script won't finish

Bug #1015807 reported by Justin Hopkins
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Undecided
Unassigned

Bug Description

Evergreen 2.2.0, running the script on a 2.1.1 database
Postgres 9.1.3

The script wasn't running properly for various reasons I don't fully understand. I was able to get it happy again and have committed:
 http://git.evergreen-ils.org/?p=working/Evergreen.git;a=commit;h=fd3b67c1d3b2fc8f6d67bee6965cdfc30c8fd2fb

There was an incorrect reference to 2.2beta 1 at the start of the script and in order to update authority.thesaurus I put it in a separate transaction.

I also had an issue with update to container.biblio_record_entry_bucket_type (0652) - our database already had that entry. I'm assuming this was a local issue but adding a check for the existence of that row might be handy.

Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

Hi Justin,

Thanks for spotting the error with the version numbers. Those should actually have said '2.2.0'. My bad.

Upgrade scripts can't really avoid changes that you may have already added as a local fix (0652 and presumably 0717 in your case, the latter having been published with bug #1010492 and not being in any release before 2.2.0). Unfortunately it's always been incumbent upon Evergreen site administrators to avoid clashes with things they've already picked from the master branch in advance of a formal upgrade. Until we develop a smarter mechanism or plan for dealing with all the likely scenarios, we don't want to write special cases for everything. Some upgrades can be improved with 'if exists' clauses or similar, but others do more subtle things, so that detecting repeat applications would be nontrivial.

Pushed the version number change to master and rel_2_2. Thanks again!

Changed in evergreen:
status: New → Fix Committed
Revision history for this message
George Duimovich (george-duimovich) wrote :

Follow-up to this related report here:

https://bugs.launchpad.net/evergreen/+bug/1021847 (re-points back to this bug)

The 2.2.0 RC2 db upgrade had worked for us at some point but re-checked this morning using the official download for 2.2.0 and the db ran into similar problem at: ERROR: cannot ALTER TABLE "thesaurus" because it has pending trigger events.

Also confirmed and tested against the newer script here:
git.evergreen-ils.org/?p=Evergreen.git;a=commit;h=e04600edfd5292249528b7cdbd91dc423d01bc79

geo.

Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

Anyone in a position to test this possible fix?

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/senator/avoid-authority-pending-triggers-error

Thanks!

Changing the status on this away from 'fix committed' (which can hide it from people depending on how they look at Launchpad)

Changed in evergreen:
status: Fix Committed → Confirmed
Revision history for this message
Justin Hopkins (hopkinsju) wrote :

@Lebbeous This worked for me.

Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

Thanks to Justin! This is in master and rel_2_2 now.

Changed in evergreen:
status: Confirmed → Fix Committed
milestone: none → 2.2.1
Revision history for this message
George Duimovich (george-duimovich) wrote :

Also worked for my test.

Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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