[Bug 22796] New: koha-common and mariadb start in the wrong order
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22796 Bug ID: 22796 Summary: koha-common and mariadb start in the wrong order Change sponsored?: --- Product: Koha Version: 18.11 Hardware: All OS: Linux Status: NEW Severity: normal Priority: P5 - low Component: Packaging Assignee: koha-bugs@lists.koha-community.org Reporter: shifting-koha@shifting.ca QA Contact: testopia@bugs.koha-community.org CC: mirko@abunchofthings.net Target Milestone: --- when running my last apt-upgrade, koha-common and mariadb both updated. Unfortunately, koha tried to configure before mariadb did, meaning that the database server was still stopped when koha tried to run it's configuration: Setting up linux-image-amd64 (4.9+80+deb9u7) ... Setting up koha-common (18.11.04-1) ... Upgrading database schema for library DBI connect('database=koha_theatrealberta;host=localhost;port=3306','koha_theatrealberta',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory") at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1517. DBIx::Class::Storage::DBI::catch {...} (): DBI Connection failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory") at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1520. at /usr/share/koha/lib/Koha/Database.pm line 107 dpkg: error processing package koha-common (--configure): subprocess installed post-installation script returned error exit status 255 Setting up mariadb-server-10.1 (10.1.38-0+deb9u1) ... of course, this was easy to fix by running "dpkg-configure -a" again. But it would be nice if these packages configured themselves in the right order. -- 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=22796 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22796 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joonas.kylmala@helsinki.fi Status|NEW |In Discussion --- Comment #1 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- I couldn't come up with any way to fix this issue in Koha Debian packages. The database could as well be in a remote server so it looks like it is up to the person upgrading koha-common package to make sure database is accepting connections during the upgrade. What we could probably do is recommend users to upgrade first koha-common and then the database separately, although one might want to coordinate the upgrade so that when the database is down some nice maintenance page is shown or use a database cluster to keep koha running all the time. Some might suggest adding a retry time (for example 10 seconds) but who knows how long a give DB server upgrade might take. I suggest closing this issue and editing the instructions in wiki. Ben, does this sound good? -- 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=22796 --- Comment #2 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Well, maybe creating a new debian package for one server installations we could add mysql-server as dependency and then this would work but I have not seen this done anywhere with other debian packages so not sure it's worth the extra packaging work and would even work. -- 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=22796 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #3 from David Cook <dcook@prosentient.com.au> --- This is a really interesting point. I've been thinking a lot about database upgrades lately. Kong Gateway can be installed by a Debian package, but it requires a person running "kong migrations up" to trigger an actual database upgrade. Keycloak will apply database migrations/upgrades automatically when you start the application. I'd suggest moving a lot of the code from koha-common.postinst into the koha-common service (ie /etc/init.d/koha-common). Then koha-common.postinst could just restart the koha-common service. An optional dependency on Mariadb could be added, so koha-common would wait to restart until after Mariadb is available. If the Mariadb service isn't available on that server, it'll just ignore the dependency. -- 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=22796 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> ---
I suggest closing this issue and editing the instructions in wiki. Ben, does this sound good?
Could someone help with the instructions on the wiki? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org