[Bug 18564] New: kola-common.cnf parsing is too restrictive
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18564 Bug ID: 18564 Summary: kola-common.cnf parsing is too restrictive Change sponsored?: --- Product: Koha Version: 16.11 Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Installation and upgrade (command-line installer) Assignee: gmcharlt@gmail.com Reporter: eric.vantillard@evaxion.fr QA Contact: testopia@bugs.koha-community.org my koha-common.cnf is using this form: [client] host=db user=root password="move_rootpwd_to_dotenv" this file is working has expected with mysql tools. but koha-create parsing will not find the db host resulting in koha-conf.xml containing no values in hostname element. as a result trying to connect to the web serveur will raise an error : Software error: DBIx::Class::Storage::DBI::catch {...} (): DBI Connection failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1490. at /usr/share/koha/lib/Koha/Database.pm line 90 Compilation failed in require at /usr/share/koha/intranet/cgi-bin/mainpage.pl line 31. BEGIN failed--compilation aborted at /usr/share/koha/intranet/cgi-bin/mainpage.pl line 31. For help, please send mail to the webmaster ([no address given]), giving this error message and the time and date of the error. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18564 --- Comment #1 from Eric Vantillard <eric.vantillard@evaxion.fr> --- adding spaces around the equal sign will resolve the issue the problem is in kohl-create function getmysqlhost() https://github.com/Koha-Community/Koha/blob/master/debian/scripts/koha-creat... the awk search require spaces -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18564 --- Comment #2 from Eric Vantillard <eric.vantillard@evaxion.fr> --- maybe something like that awk ' BEGIN { FS="=" } $1 ~/\[/ { inclient=0 } $1 ~/\[client\]/ { inclient=1 next } inclient==1 && $1 ~/host/ { print $2 } ' /etc/mysql/koha-common.cnf -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18564 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Summary|kola-common.cnf parsing is |koha-common.cnf parsing is |too restrictive |too restrictive -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18564 --- Comment #3 from Eric Vantillard <eric.vantillard@evaxion.fr> --- Created attachment 63501 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63501&action=edit patch changing the awk script -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18564 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Is this patch ready to sign off? I have an amendment to make. :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18564 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18564 --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 64557 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64557&action=edit Bug 18564: MariaDB doesn't have a debian.cnf file The koha-common.cnf file is a link to debian.cnf, which MariaDB does not install. This just forces a 'localhost' return value. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18564 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=9409 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18564 M. Tompsett <mtompset@hotmail.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=18564 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to M. Tompsett from comment #5)
Created attachment 64557 [details] [review] Bug 18564: MariaDB doesn't have a debian.cnf file
The koha-common.cnf file is a link to debian.cnf, which MariaDB does not install. This just forces a 'localhost' return value.
Please move it to its own bug report. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18564 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18564 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63501|0 |1 is obsolete| | Attachment #64557|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 67371 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67371&action=edit Bug 18564: Improve koha-common.cnf parsing to pick the mysql host my koha-common.cnf is using this form: [client] host=db user=root password="move_rootpwd_to_dotenv" this file is working has expected with mysql tools. but koha-create parsing will not find the db host resulting in koha-conf.xml containing no values in hostname element. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18564 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|16.11 |master Severity|minor |normal Assignee|gmcharlt@gmail.com |eric.vantillard@evaxion.fr -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18564 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=18564 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #67371|0 |1 is obsolete| | --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 68315 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68315&action=edit Bug 18564: Improve koha-common.cnf parsing to pick the mysql host my koha-common.cnf is using this form: [client] host=db user=root password="move_rootpwd_to_dotenv" this file is working has expected with mysql tools. but koha-create parsing will not find the db host resulting in koha-conf.xml containing no values in hostname element. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=18564 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | Patch complexity|--- |Small patch --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Thanks, Eric'. Looks good to me, improving my awk skills on the way.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18564 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Patch pushed to master for 17.11. Thanks and congrats Éric it is your first patch in! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org