determine_booking_status in OpenILS::Application::Circ::Circulate breaks when changing router names

Bug #1904220 reported by Jason Boyer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
3.4
Fix Released
Medium
Unassigned
3.5
Fix Released
Medium
Unassigned

Bug Description

The function determine_booking_status wants to talk to a router to determine if the booking service is registered, but the way it creates the AppSession object will fail if you change the router name. The function looks up a specific router name and passes that to AppSession when AppSession only wants to know what "app" you want to talk to; it will determine the router name itself when building the object.

What AppSession does is construct the destination for your messages from 3 things: the router name, the domain, and the app/service that you request. So, a "default" install (all router names = router) will work fine and use this address: <email address hidden>/router but if you change the defaults to something like pubrouter / privrouter it will instead use this: <email address hidden>/privrouter and you will get "<email address hidden>/privrouter IS NOT CONNECTED TO THE NETWORK!" in your logs any time Circulate.pm tries to check the booking status. Changing the AppSession invocation to just my $ses = create OpenSRF::AppSession("router"); fixes the problem as it instead tries to contact <email address hidden>/router and circulations can succeed.

Branch on the way.

Jason Boyer (jboyer)
Changed in evergreen:
milestone: none → 3.6.1
Revision history for this message
Jason Boyer (jboyer) wrote :

As promised, branch lives here: https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/jboyer/lp1904220_booking_appsession / working/user/jboyer/lp1904220_booking_appsession

Testing notes:
Setup an un-patched system using non-default router names (such as pubrouter and privrouter)
Try to circulate any item
Find IS NOT CONNECTED errors in your error logs

Apply patch

Repeat test above, succeed in circulating item.

tags: added: pullrequest
Revision history for this message
Mike Rylander (mrylander) wrote :

This fix has been working in production for several years. I've picked it to master, 3.6, 3.5, and 3.4. Thanks, Jason!

Changed in evergreen:
assignee: nobody → Mike Rylander (mrylander)
Changed in evergreen:
status: New → Fix Committed
assignee: Mike Rylander (mrylander) → nobody
tags: removed: pullrequest
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.