[Bug 33720] New: koha-upgrade-schema should restart memcached
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 Bug ID: 33720 Summary: koha-upgrade-schema should restart memcached Change sponsored?: --- Product: Koha Version: master Hardware: All OS: Linux Status: NEW Severity: minor Priority: P5 - low Component: Packaging Assignee: koha-bugs@lists.koha-community.org Reporter: jake.deery@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: mtj@kohaaloha.com Hello community, We have been caught out with a minor annoyance in the koha-upgrade-schema script (Debian package) - upon reloading a database from an SQL dump file (e.g. re-imaging a test server from a live system), the database upgrade appears to complete successfully, but in fact steps are missed. We believe this is because memcached is keeping the software version cached as a value, as a restart of memcached seems to resolve the issue. I attach a proposed solution; restarting memcached just before calling the updatedatabase.pl script. I hope this makes sense, can can be backported for 22.11.xx. Many thanks, Jake -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 --- Comment #1 from Jake Deery <jake.deery@ptfs-europe.com> --- Created attachment 151083 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151083&action=edit Add memcached restart before updatedatabase.pl is called This patch adds a call to /etc/init.d/memcached so that when koha-upgrade-schema is called, the correct DB revision number is fetched, avoiding issues when loading & upgrading a SQL dump file -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 Jake Deery <jake.deery@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jake.deery@ptfs-europe.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- If we need a flush a can call bin/flush_memcached -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Another solution would be to retrieve the value from the DB in updatedatabase.pl 74 my $original_version = C4::Context->preference("Version"); -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 --- Comment #4 from Jake Deery <jake.deery@ptfs-europe.com> --- Hi Jonathan, A fine point, well-raised. Flushing the cache from within updatedatabase.pl covers a wider range of install types, too. I've attached another patch, this time for updatedatabase.pl. To test (assuming the software version is 22.1106000, please amend to suit): 1. Set database to a historic version near to your own – SQL: UPDATE systempreferences SET value='22.1105012' WHERE variable='Version'; 2. Run sudo koha-upgrade-schema test (or updatedatabase.pl, if you use dev installs) – notice how nothing happens 3. Apply patch 4. Rerun sudo koha-upgrade-schema test (or updatedatabase.pl, if you use dev installs) – notice how the upgrade proceeds from correct point (even if it fails due to duplicate tables / columns / keys) 5. Repeat steps 1 & 4 to validate Many thanks, Jake -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 Jake Deery <jake.deery@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #151083|0 |1 is obsolete| | --- Comment #5 from Jake Deery <jake.deery@ptfs-europe.com> --- Created attachment 151881 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151881&action=edit Update the updatedatabase.pl script to flush caches before running -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 Jake Deery <jake.deery@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|koha-upgrade-schema should |updatedatabase.pl should |restart memcached |purge memcached -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #151881|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 152096 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152096&action=edit Bug 33720: Update the updatedatabase.pl script to flush caches before running -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- I've attached a git patch. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- I think we should fix install.pl as well. The UI is not telling us the DB is behind if the syspref has been modified manually in DB. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #152096|0 |1 is obsolete| | --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 152852 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152852&action=edit Bug 33720: Update the updatedatabase.pl script to flush caches before running Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 152853 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152853&action=edit Bug 33720: Also flush in install -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #152852|0 |1 is obsolete| | --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 152857 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152857&action=edit Bug 33720: Update the updatedatabase.pl script to flush caches before running Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #152853|0 |1 is obsolete| | --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 152858 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152858&action=edit Bug 33720: Also flush in install Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.11.00 |23.11.00,23.05.02 released in| | Status|Pushed to master |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Thanks for all the hard work! Pushed to 23.05.x for the next release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.11.00,23.05.02 |23.11.00,23.05.02,22.11.08 released in| | Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33720 --- Comment #15 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to oldstable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org