[Bug 19462] New: Add a koha-elasticsearch command
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19462 Bug ID: 19462 Summary: Add a koha-elasticsearch command Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz There should be a wrapper command for instances, with (at least) the ability to trigger index rebuilds on Elasticsearch. -- 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=19462 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_17_11_candidate Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | QA Contact|testopia@bugs.koha-communit |nick@bywatersolutions.com |y.org | -- 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=19462 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 68091 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68091&action=edit Bug 19462: Add a koha-elasticsearch command This patch adds a new command to be used for Elasticsearch-related tasks. The current implementation only offers the --rebuild action switch, that allows reindexing Elasticsearch on a per-instance basis as we are used to with the rest of the koha-* commands. Other options could be added in a future: --status (ES server status report, etc). To test: - Apply the whole patchset - Have a suitable Koha+Elasticsearch setup [1] - Run: $ reset_all - Run: $ man koha-elasticsearch => SUCCESS: A pretty man page is displayed covering all options - Run: $ sudo koha-elasticsearch blah => SUCCESS: The script fails because blah is not a valid instance name - Run: $ sudo koha-elasticsearch -v kohadev => SUCCESS: Reindex happens! - Try the -a, -b and -c option switches - Sign off happily :-D Sponsored-by: ByWater Solutions [1] This is straightforward if you are using KohaDevBox and created the box using: $ KOHA_ELASTICSEARCH=1 vagrant up Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19462 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 68092 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68092&action=edit Bug 19462: Add koha-elasticsearch documentation Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19462 Tomás Cohen Arazi <tomascohen@gmail.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=19462 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=19465 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19462 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68091|0 |1 is obsolete| | --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 68118 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68118&action=edit Bug 19462: Add a koha-elasticsearch command This patch adds a new command to be used for Elasticsearch-related tasks. The current implementation only offers the --rebuild action switch, that allows reindexing Elasticsearch on a per-instance basis as we are used to with the rest of the koha-* commands. Other options could be added in a future: --status (ES server status report, etc). To test: - Apply the whole patchset - Have a suitable Koha+Elasticsearch setup [1] - Run: $ reset_all - Run: $ man koha-elasticsearch => SUCCESS: A pretty man page is displayed covering all options - Run: $ sudo koha-elasticsearch blah => SUCCESS: The script fails because blah is not a valid instance name - Run: $ sudo koha-elasticsearch -v kohadev => SUCCESS: Reindex happens! - Try the -a, -b and -c option switches - Sign off happily :-D Sponsored-by: ByWater Solutions [1] This is straightforward if you are using KohaDevBox and created the box using: $ KOHA_ELASTICSEARCH=1 vagrant up Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19462 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68092|0 |1 is obsolete| | --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 68119 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68119&action=edit Bug 19462: Add koha-elasticsearch documentation Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19462 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com Status|Needs Signoff |Signed Off --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- After getting ES to work, and adjusting my expectations of searches, this runs minimally well. It could be polished on edge error cases, but nothing that merits a Failed QA in my opinion. For example, try a "-c=2" instead of a "-c 2". Ugliness ensues. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19462 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to M. Tompsett from comment #5)
After getting ES to work, and adjusting my expectations of searches, this runs minimally well. It could be polished on edge error cases, but nothing that merits a Failed QA in my opinion.
For example, try a "-c=2" instead of a "-c 2". Ugliness ensues.
Are we supposed to support -c=2? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19462 Nick Clemens <nick@bywatersolutions.com> 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=19462 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68118|0 |1 is obsolete| | --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 68617 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68617&action=edit Bug 19462: Add a koha-elasticsearch command This patch adds a new command to be used for Elasticsearch-related tasks. The current implementation only offers the --rebuild action switch, that allows reindexing Elasticsearch on a per-instance basis as we are used to with the rest of the koha-* commands. Other options could be added in a future: --status (ES server status report, etc). To test: - Apply the whole patchset - Have a suitable Koha+Elasticsearch setup [1] - Run: $ reset_all - Run: $ man koha-elasticsearch => SUCCESS: A pretty man page is displayed covering all options - Run: $ sudo koha-elasticsearch blah => SUCCESS: The script fails because blah is not a valid instance name - Run: $ sudo koha-elasticsearch -v kohadev => SUCCESS: Reindex happens! - Try the -a, -b and -c option switches - Sign off happily :-D Sponsored-by: ByWater Solutions [1] This is straightforward if you are using KohaDevBox and created the box using: $ KOHA_ELASTICSEARCH=1 vagrant up Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <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=19462 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68119|0 |1 is obsolete| | --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 68618 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68618&action=edit Bug 19462: Add koha-elasticsearch documentation Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <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=19462 --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- More options can be added in the future, but this will ease testing and is a great start -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19462 --- Comment #10 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Tomás Cohen Arazi from comment #6)
(In reply to M. Tompsett from comment #5)
For example, try a "-c=2" instead of a "-c 2". Ugliness ensues.
Are we supposed to support -c=2?
Not expressly. But sometimes, some scripts are that format, and sometimes they are not. I'm not sure which is the officially preferred way for scripts in general, but I thought I would mention it as a valid weakness, since for some strange reason I typed that instead of what was expected and documented. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19462 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to M. Tompsett from comment #10)
(In reply to Tomás Cohen Arazi from comment #6)
(In reply to M. Tompsett from comment #5)
For example, try a "-c=2" instead of a "-c 2". Ugliness ensues.
Are we supposed to support -c=2?
Not expressly. But sometimes, some scripts are that format, and sometimes they are not. I'm not sure which is the officially preferred way for scripts in general, but I thought I would mention it as a valid weakness, since for some strange reason I typed that instead of what was expected and documented.
I don't think we should take care of non-documented ways of passing parameters. Either the manpage or the --help switch propose that syntax. I don't even think we should support multiple ways of passing the parameters, as it tends to this: confussion. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19462 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 17.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19462 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_17_11_candidate | CC| |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19462 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |A new command-line script release notes| |is added for handling | |Elasticsearch | |indexing-related tasks for | |each Koha instance. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org