Summary: | SIP2 server doesn't start - Undefined subroutine set_logger | ||
---|---|---|---|
Product: | Koha | Reporter: | Joonas Kylmälä <joonas.kylmala> |
Component: | SIP2 | Assignee: | Joonas Kylmälä <joonas.kylmala> |
Status: | CLOSED FIXED | QA Contact: | Tomás Cohen Arazi <tomascohen> |
Severity: | critical | ||
Priority: | P5 - low | CC: | aleisha, colin.campbell, jonathan.druart, kyle, lucas, martin.renvoize, tomascohen |
Version: | master | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
20.11.00, 20.05.03
|
|
Bug Depends on: | 15253 | ||
Bug Blocks: | |||
Attachments: |
Bug 25992: Make SIP2 logger subroutines exportable to prevent crash
Bug 25992: Make SIP2 logger subroutines exportable to prevent crash Bug 25992: Make SIP2 logger subroutines exportable to prevent crash |
Description
Joonas Kylmälä
2020-07-15 11:08:07 UTC
Created attachment 106928 [details] [review] Bug 25992: Make SIP2 logger subroutines exportable to prevent crash If the subroutines are not exportable we get the following crash: > Undefined subroutine &C4::SIP::SIPServer::set_logger To test: In kohadevbox run for example: $ ps -aux # check that no existing sip server is running, kill the process if exists $ perl /kohadevbox/koha/C4/SIP/SIPServer.pm /etc/koha/sites/kohadev/SIPconfig.xml $ koha/misc/sip_cli_emulator.pl -su koha -sp koha -l CPL -a 127.0.0.1 -p 6001 --item 3999900000001 -m item_information After applying this patch the Undefined subroutine error should be gone. Note: when using the sip_cli_emulator.pl the credentials can be anything. Created attachment 106929 [details] [review] Bug 25992: Make SIP2 logger subroutines exportable to prevent crash If the subroutines are not exportable we get the following crash: > Undefined subroutine &C4::SIP::SIPServer::set_logger To test: In kohadevbox run for example: $ ps -aux # check that no existing sip server is running, kill the process if exists $ perl /kohadevbox/koha/C4/SIP/SIPServer.pm /etc/koha/sites/kohadev/SIPconfig.xml $ koha/misc/sip_cli_emulator.pl -su koha -sp koha -l CPL -a 127.0.0.1 -p 6001 --item 3999900000001 -m item_information After applying this patch the Undefined subroutine error should be gone. Note: when using the sip_cli_emulator.pl the credentials can be anything. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 106933 [details] [review] Bug 25992: Make SIP2 logger subroutines exportable to prevent crash If the subroutines are not exportable we get the following crash: > Undefined subroutine &C4::SIP::SIPServer::set_logger To test: In kohadevbox run for example: $ ps -aux # check that no existing sip server is running, kill the process if exists $ perl /kohadevbox/koha/C4/SIP/SIPServer.pm /etc/koha/sites/kohadev/SIPconfig.xml $ koha/misc/sip_cli_emulator.pl -su koha -sp koha -l CPL -a 127.0.0.1 -p 6001 --item 3999900000001 -m item_information After applying this patch the Undefined subroutine error should be gone. Note: when using the sip_cli_emulator.pl the credentials can be anything. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> We are missing a test here, it's not normal to get this situation on stable branches. It won't block the push but it's worth investigating what could be done to make sure we won't face it anymore. I've been looking at the lack of tests issue. The only way I found to test this is by using the emulator. I think we need to revisit SIP altogether to allow proper testing, but marked this one PQA for being a trivial fix. Pushed to master for 20.11, thanks everyone. backported to 20.05.x for 20.05.03 missing dependencies, not backported to 19.11.x |