Starting SIPServer via oils_ctl.sh and Recent Perl

Bug #1899974 reported by Jason Stephenson
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Undecided
Unassigned
3.6
Fix Released
Undecided
Unassigned

Bug Description

Evergreen Version: All
OpenSRF Version: All
PostgreSQL Version: N/A
O/S Version: Ubuntu 18.04+, Debian Buster (10)+

The current directory was removed from @INC in Perl release 5.26.0: https://perldoc.perl.org/5.26.0/perldelta#Removal-of-the-current-directory-(%22.%22)-from-@INC

As a consequence, oils_ctl.sh is no longer able to start SIPServer without specifying PERL5LIB on the command line or in the file. Additionally, there is no feedback to the user that SIPServer failed to start. The usual message about starting SIPServer appears, the PID file is created, but no SIPServer processes are running if one checks. (The PID file must be cleaned up in order to successfully start SIPServer.)

Assuming the default location of /opt/SIPServer per the instructions, the following works on the command line:

PERL5LIB=/opt/SIPServer oils_ctl.sh -a start_sip

To avoid having to remember the above, a small addition to oils_ctl.sh also works. I suggest this method of fixing the issue. Branch to follow!

Revision history for this message
Jason Stephenson (jstephenson) wrote :

Here's a branch with a patch that we're using in production at CW MARS on our SIP servers that have been upgraded to Ubuntu 18.04:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dyrcona/lp1899974-oils_ctl-sh-perl5lib

From the commit message:

    To verify the bug:

    1. Install OpenSRF, Evergreen, and SIPServer on an affected O/S.
    2. Start OpenSRF service.
    3. Start SIPServer via oils_ctl.sh:
       oils_ctl.sh -a start_sip
    4. Notice the "Starting OILS SIP Server" message is printed with no
       indication of failure.
    5. Verify that the PID file exists: /openils/var/run/oils_sip.pid
    6. Verify that no SIPServer processes are actually running:
       pgrep -af SIPServer
       The above should produce no output.

    To test this patch:

    1. Apply this patch and install oils_ctl.sh to /openils/bin/.
    2. Assuming you have run the previous steps, delete the PID file:
       rm /openils/var/run/oils_sip.pid
    3. Start SIPServer via oils_ctl.sh:
       oils_ctl.sh -a start_sip
    4. Notice the "Starting OILS SIP Server" message is printed.
    5. Verify that the PID file exists: /openils/var/run/oils_sip.pid
    6. `pgrep -af SIPServer` should produce output.

tags: added: supportscripts
tags: added: pullrequest
Changed in evergreen:
assignee: Jason Stephenson (jstephenson) → nobody
Revision history for this message
Galen Charlton (gmc) wrote :

Upon eyeballing the patch, I suggest prepending SIP_DIR to PERL5LIB rather than replacing it.

Revision history for this message
Jason Stephenson (jstephenson) wrote :

Galen, I'll go you one better than that. I've pushed an additional commit to the branch that checks if PERL5LIB is unset, and sets and exports it if so.

If PERL5LIB is set, then SIP_DIR is appended to PERL5LIB if it is not already in PERL5LIB.

Feel free to squash these when merging. I just didn't feel like force-pushing.

Changed in evergreen:
milestone: none → 3.6.1
Changed in evergreen:
milestone: 3.6.1 → 3.6.2
Revision history for this message
Jason Stephenson (jstephenson) wrote :

FYI: I have rebased the branch on master and squashed the commits into one.

no longer affects: sipserver
Changed in evergreen:
status: New → Confirmed
Changed in evergreen:
milestone: 3.6.2 → 3.6.3
Changed in evergreen:
milestone: 3.6.3 → 3.6.4
Changed in evergreen:
milestone: 3.6.4 → 3.7.2
Jason Boyer (jboyer)
Changed in evergreen:
assignee: nobody → Jason Boyer (jboyer)
Revision history for this message
Jason Boyer (jboyer) wrote :

I've put this through its paces and it looks good to me. Pushed to master through rel_3_5. Thanks Jason!

Changed in evergreen:
status: Confirmed → Fix Committed
assignee: Jason Boyer (jboyer) → nobody
tags: added: signedoff
Andrea Neiman (aneiman)
no longer affects: evergreen/3.5
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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