https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30897

David Cook <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Failed QA

--- Comment #5 from David Cook <[email protected]> ---
Thanks for looking into this, Martin. I had forgotten that I'd raised this
issue! 

I'll have to mark it as Failed QA for a few reasons.

1a. If you run install_plugins.pl from the CLI, your bash session will be
killed, since that's the parent process. I think that's an unintended
consequence. (However, we can probably work around this by checking if we're
running in a Plack environment first.)

root@kohadevbox:koha$ koha-shell kohadev
$ /kohadevbox/koha/misc/devel/install_plugins.pl
No plugins found at /var/lib/koha/kohadev/plugins
Hangup
root@kohadevbox:koha$

1b. Like 1a, this will cause problems when running unit tests:

kohadev-koha@kohadevbox:koha(bug30897)$ perl
t/db_dependent/Koha/Plugins/Circulation_hooks.t
1..4
ok 1 - use Koha::Plugins;
ok 2 - use Koha::Plugins::Handler;
ok 3 - use Koha::Plugin::Test;
# Subtest: after_circ_action() hook tests
    1..3
Hangup
root@kohadevbox:koha$

2. I think we should wrap this with some configuration. Restarting the Starman
on plugin installation is a significant change, so I think we'll want to be
able to quickly and easily change between behaviours - at least in the
short-term. I think we'll also probably want to default to off at least
initially just to be on the safe side. 

3. This restart runs even if there are no changes to make to the plugins, which
would lead to unnecessary restarts. I think we'd want to be more careful in
initiating the restarts. 

--

Additional questions/comments:

1. Could you speak to why you need to look for the parent pid recursively? I
don't see the reason for it. 

As an aside, do we want to use POSIX::getpid instead of $$ for getting the pid?
I suppose POSIX::getpid is easier to read. 

2. Relating to my first failure point, do you think perhaps we should
interrogate the process we're looking to restart just to be extra careful? At a
minimum, I think we'd want to double-check that it is really Starman.

I wanted to say we shouldn't try to "kill" pid 1, but I suppose if someone has
managed to get Starman running in Docker as the only process, then it could
have a pid of 1, and that would be OK...

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to