Bug 36386 - Prevent Net::Server warn about User Not Defined from SIPServer
Summary: Prevent Net::Server warn about User Not Defined from SIPServer
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Marcel de Rooy
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-21 14:16 UTC by Marcel de Rooy
Modified: 2024-07-25 11:11 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.06,23.05.12
Circulation function:


Attachments
Bug 36386: Pass user and group to Net::Server (861 bytes, patch)
2024-03-21 14:19 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 36386: Pass user and group to Net::Server (1.13 KB, patch)
2024-03-26 11:06 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 36386: Pass user and group to Net::Server (1.20 KB, patch)
2024-04-17 16:00 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2024-03-21 14:16:45 UTC
Your syslog contains warnings like:
Mar 21 13:46:11 upgrade koha_sip[9377]: Group Not Defined.  Defaulting to EGID '1000'
Mar 21 13:46:11 upgrade koha_sip[9377]: User Not Defined.  Defaulting to EUID '1000'

This comes from Net::Server. SIPServer does not pass user and group. We only define user when we start koha-sip with daemon. Net::Server falls back to current user context which is already good. So it is an innocent warn.
Comment 1 Marcel de Rooy 2024-03-21 14:19:36 UTC
Created attachment 163616 [details] [review]
Bug 36386: Pass user and group to Net::Server

This prevents the User/Group Not Defined warns in syslog.

Test plan:
Restart sip and check your syslog.
Comment 2 David Nind 2024-03-22 18:03:31 UTC
Not sure how to replicate using koha-testing-docker (KTD).

There is no /var/log/syslog

There is also nothing in the journal log (sudo journalctl or sudo journalctl -u syslog).

In addition, those warnings don't appear in /var/log/koha/kohadev/sip.log (after restarting sip with sudo koha-sip --restart kohadev or a restart_all).

The default KTD is using Debian 11 (bullseye) (cat /etc/os-release).
Comment 3 Marcel de Rooy 2024-03-25 08:17:07 UTC
Tomas, do you know if this warning ends up somewhere else in KTD instead of syslog?
Comment 4 Kyle M Hall (khall) 2024-03-26 11:06:28 UTC
Created attachment 163902 [details] [review]
Bug 36386: Pass user and group to Net::Server

This prevents the User/Group Not Defined warns in syslog.

Test plan:
Restart sip and check your syslog.

KTD Test Plan:
1) Stop your SIP server
2) Run "perl C4/SIP/SIPServer.pm /etc/koha/sites/kohadev/koha-conf.xml"
   We need valid XML without any valid SIP settings to the output goes
   to the command line
3) Note the warnings
4) Apply this patch
5) Repeat step 2
6) No warnings!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Martin Renvoize (ashimema) 2024-04-17 16:00:53 UTC
Created attachment 165028 [details] [review]
Bug 36386: Pass user and group to Net::Server

This prevents the User/Group Not Defined warns in syslog.

Test plan:
Restart sip and check your syslog.

KTD Test Plan:
1) Stop your SIP server
2) Run "perl C4/SIP/SIPServer.pm /etc/koha/sites/kohadev/koha-conf.xml"
   We need valid XML without any valid SIP settings to the output goes
   to the command line
3) Note the warnings
4) Apply this patch
5) Repeat step 2
6) No warnings!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize (ashimema) 2024-04-17 16:01:11 UTC
Nice bit of cleanup..

Passing QA
Comment 7 Katrin Fischer 2024-04-18 14:52:04 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 8 Fridolin Somers 2024-05-23 13:36:45 UTC
Pushed to 23.11.x for 23.11.06
Comment 9 Lucas Gass (lukeg) 2024-05-28 19:42:37 UTC
Backported to 23.05.x for upcoming 23.05.12