[Bug 42468] New: Add systemd support for OCLC Connexion daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42468 Bug ID: 42468 Summary: Add systemd support for OCLC Connexion daemon Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org For some reason, connexion was never bundled into koha-common. We should add that to systemd which is added by bug 40901. -- 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=42468 --- Comment #1 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 198356 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198356&action=edit Bug 42468: Add systemd support for OCLC Connexion daemon Koha ships an OCLC Connexion import daemon that listens for connections from OCLC Connexion client or WorldShare Record Manager and creates records in Koha. For some reason, this daemon was never bundled into koha-common with a helper script and an init unit. As a result, sites using Connexion have had to roll their own service files and manage the daemon manually. Bug 40901 introduced koha-systemd with native systemd templates for the existing services (plack, sip, zebra, indexer, etc.) and the systemd abstraction in koha-functions.sh. This patch adds Connexion to that framework so it can be enabled, disabled, started, stopped, restarted, and queried just like SIP. Tthe SysV init script (koha-sysv.init) starts/stops/reloads/checks status of the daemon for instances with it enabled, koha-systemd-ctl lists connexion as a known service, koha-create-dirs@.service runs Before= the new unit, and bash completion is wired up. Test Plan: 1) Apply this patch 2) Restart all the things! 3) Pick an instance you can test against ( e.g. kohadev ) 4) Create /etc/koha/sites/kohadev/connexion.conf with the minimum required settings (see /usr/share/koha/bin/connexion_import_daemon.pl --help): port: 5500 koha: http://localhost:8080 user: koha password: koha 5) Run: koha-connexion --enable kohadev 6) Note the helpful hint about creating connexion.conf if missing 7) Run: koha-connexion --start kohadev 8) Run: koha-connexion --status kohadev Note that the daemon is running! 9) Run: systemctl status koha-connexion@kohadev.service Note that systemd reports the daemon as active! 10) From another terminal, telnet to port 5500 and send a Connexion request, or use a real OCLC Connexion client to send a record 11) Note the record arrives in Koha (in the staging area or directly in the catalog, depending on import_mode)! 12) Run: koha-connexion --restart kohadev Note that the daemon restarts cleanly 13) Run: koha-list --connexion Note that kohadev is listed! 14) Run: koha-list --noconnexion Note that kohadev is NOT listed 15) Run: koha-connexion --stop kohadev 16) Run: koha-connexion --disable kohadev Note that the daemon is stopped and disabled 17) Run: koha-list --connexion Note that kohadev is no longer listed 18) Re-enable, then disable the entire instance: koha-connexion --enable kohadev koha-connexion --start kohadev koha-disable kohadev Note that the Connexion daemon is also stopped and disabled! 19) Re-enable the instance and the daemon, then run koha-remove on a throw-away instance and confirm the daemon is cleanly torn down Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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=42468 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #2 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Kyle, is this ready for testing? It doesn't currently apply cleanly to main: Error: Apply failed: Git command (git am -3 /tmp/qnQR77usMX/0001-198356.patch) failed: error: sha1 information is lacking or useless (debian/koha-core.bash-completion). error: could not build fake ancestor -- 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=42468 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |blawlor@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42468 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |40901 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40901 [Bug 40901] koha-common.service bundles all sub-daemons under one systemd service instead of per-instance services -- 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=42468 --- Comment #3 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- (In reply to Lucas Gass (lukeg) from comment #2)
Kyle, is this ready for testing? It doesn't currently apply cleanly to main:
Error: Apply failed: Git command (git am -3 /tmp/qnQR77usMX/0001-198356.patch) failed: error: sha1 information is lacking or useless (debian/koha-core.bash-completion). error: could not build fake ancestor
My bad, I forgot to set the dependency on bug 40901! -- 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=42468 Michelle Spinney <mspinney@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mspinney@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42468 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=42468 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198356|0 |1 is obsolete| | -- 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=42468 --- Comment #4 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 199112 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199112&action=edit Bug 42468: Add systemd support for OCLC Connexion daemon Koha ships an OCLC Connexion import daemon that listens for connections from OCLC Connexion client or WorldShare Record Manager and creates records in Koha. The daemon was never bundled into the koha packaging with a helper script and an init unit, so sites using Connexion have had to roll their own service files and manage the daemon manually. This patch adds Connexion to the same backend-dispatching framework bug 40901 introduced for SIP/Plack/Zebra/etc. so it can be enabled, disabled, started, stopped, restarted, and queried with one via koha-connexion for both sysv and systemd. I've used SIP as the pattern because it is also an optional component that doesn't get started by default. Test Plan: 1) Apply this patch and rebuild the koha packages 2) Pick an instance you can test against ( e.g. kohadev ) 3) Create /etc/koha/sites/kohadev/connexion.conf such as: port: 5500 koha: http://localhost:8080 user: koha password: koha 4) Run: koha-connexion --enable kohadev 5) Run: koha-connexion --start kohadev 6) Run: koha-connexion --status kohadev 7) Note that the daemon is running 8) Run systemctl status koha-connexion@kohadev.service 9) Note that systemd reports the daemon as active! 8) Telnet to port 5500 For bonus points, send an valid connex message 10) Run koha-connexion --restart kohadev 11) Note that the daemon restarts cleanly 12) Run koha-list --connexion 13) Note kohadev is listed 14) Runkoha-list --noconnexion 15) Note that kohadev is not listed 12) Run koha-connexion --disable kohadev 13) Note that the daemon is stopped and disabled 14) Re-enable, then disable the entire instance: koha-connexion --enable kohadev koha-connexion --start kohadev koha-disable kohadev 15) Note that the Connexion daemon is also stopped and disabled Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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=42468 --- Comment #5 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- In case anyone is interested, I wrote an tests for systemd ( including Bug 42468 ) https://github.com/bywatersolutions/bywater-koha-devel/actions/runs/25804830... -- 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=42468 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | --- Comment #6 from David Nind <david@davidnind.com> --- Added assignee 8-). -- 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