Bug 34041 - z3950 responder additional options not coming through properly
Summary: z3950 responder additional options not coming through properly
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Z39.50 / SRU / OpenSearch Servers (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Liz Rea
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-16 17:50 UTC by Liz Rea
Modified: 2024-05-30 19:08 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.06,23.05.12
Circulation function:


Attachments
Bug 34041 - z3950 responder additional options not coming through properly (1.25 KB, patch)
2023-06-16 17:58 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 34041 - z3950 responder additional options not coming through properly (1.37 KB, patch)
2024-03-29 20:04 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 34041 - z3950 responder additional options not coming through properly (1.42 KB, patch)
2024-03-29 21:19 UTC, David Nind
Details | Diff | Splinter Review
Bug 34041: z3950 responder additional options not coming through properly (1.47 KB, patch)
2024-05-10 12:36 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 34041: (follow-up) escape double dashes to prevent issues (1.58 KB, patch)
2024-05-10 12:36 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Liz Rea 2023-06-16 17:50:48 UTC
The z3950 responder default configuration has responder options, but the start script is looking for them in the <config> node, which isn't in the config, so it never finds them if required. Probably we need to fix that, one way or another. :)
Comment 1 Liz Rea 2023-06-16 17:58:41 UTC
Created attachment 152448 [details] [review]
Bug 34041 - z3950 responder additional options not coming through properly

This patch adds the <config> node that the z3950 responder starter script is looking for in the z3950/config.xml to the example code.

To test:
- verify that the <config> </config> is around the commented z3950_additional_options suggestion in the etc/z3950/config.xml file
- bonus points, uncomment it and make sure you can start/stop/restart koha-z3950-responder with the example config.
Comment 2 David Nind 2023-12-31 22:56:54 UTC
Added assignee.
Comment 3 David Nind 2023-12-31 23:17:27 UTC
Testing notes (using KTD):

1. If I manually add the change to /etc/koha/sites/kohadev/z3950/config.xml and restart, I get some errors. I think the last config needs to be </config>? So this should be:

<config>
<z3950_responder_options>\-\-add-item-status k -t 5</z3950_responder_options>
</config>

2. However, if I do that, then I can't get the z3950 responder to start using restart_all - get this:
...
Error: Z39.50/SRU not running for kohadev: failed!
...

I don't know enough about the Z3950 responder to test if it is running properly.
Comment 4 Nick Clemens (kidclamp) 2024-03-29 20:04:06 UTC
Created attachment 164150 [details] [review]
Bug 34041 - z3950 responder additional options not coming through properly

This patch adds the <config> node that the z3950 responder starter script is looking for in the z3950/config.xml to the example code.

To test:
 - verify that the <config> </config> is around the commented z3950_additional_options suggestion in the etc/z3950/config.xml file
 - copy the config stanza to the live file: /etc/koha/sites/kohadev/z3950/config.xml
 - restart_all
 - ps aux | grep z3950
 - confirm the script has restarted
 - confirm the options: --add-item-status k -t 5 have been passed through
Comment 5 David Nind 2024-03-29 21:19:50 UTC
Created attachment 164152 [details] [review]
Bug 34041 - z3950 responder additional options not coming through properly

This patch adds the <config> node that the z3950 responder starter script is looking for in the z3950/config.xml to the example code.

To test:
 - verify that the <config> </config> is around the commented z3950_additional_options suggestion in the etc/z3950/config.xml file
 - copy the config stanza to the live file: /etc/koha/sites/kohadev/z3950/config.xml
 - restart_all
 - ps aux | grep z3950
 - confirm the script has restarted
 - confirm the options: --add-item-status k -t 5 have been passed through

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 Katrin Fischer 2024-04-01 12:19:51 UTC
I wonder if that could explain part of the problems dicussed on mailing list lately?
Comment 7 Blou 2024-04-02 13:03:10 UTC
Hammat, could you look at this
Comment 8 Tomás Cohen Arazi (tcohen) 2024-05-10 12:36:03 UTC
Created attachment 166540 [details] [review]
Bug 34041: z3950 responder additional options not coming through properly

This patch adds the <config> node that the z3950 responder starter script is looking for in the z3950/config.xml to the example code.

To test:
 - verify that the <config> </config> is around the commented z3950_additional_options suggestion in the etc/z3950/config.xml file
 - copy the config stanza to the live file: /etc/koha/sites/kohadev/z3950/config.xml
 - restart_all
 - ps aux | grep z3950
 - confirm the script has restarted
 - confirm the options: --add-item-status k -t 5 have been passed through

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 9 Tomás Cohen Arazi (tcohen) 2024-05-10 12:36:06 UTC
Created attachment 166542 [details] [review]
Bug 34041: (follow-up) escape double dashes to prevent issues

Having double dashes inside a commmented block is not valid XML. This
patch restores it, with an added message explaining it

To test:
1. Run:
   $ xmllint etc/z3950/config.xml
=> FAIL: You get:
etc/z3950/config.xml:5: parser error : Double hyphen within comment: <!--
  <config>
      <z3950_responder_options>
      <z3950_responder_options>--add-item-status k -t 5</z3950_responder_options
2. Apply this patch
3. Repeat 1
=> SUCCESS: All good!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 10 Katrin Fischer 2024-05-10 14:08:01 UTC
Should this be re-classified as a bug (not an enh)?
Comment 11 Katrin Fischer 2024-05-10 15:46:58 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 12 Fridolin Somers 2024-05-29 09:20:43 UTC
Pushed to 23.11.x for 23.11.06
Comment 13 Lucas Gass (lukeg) 2024-05-30 19:08:43 UTC
Backported to 23.05.x for upcoming 23.05.12