Bug #5058
closed
SGSN doesn't create any NS level logging, even with "logging level ns debug"
Added by laforge about 3 years ago.
Updated about 3 years ago.
Description
When osmo-sgsn was ported to ns2, in commit FIXME, the call to gprs_ns_set_log_ss(DNS)
was removed, which means that libosmogb doesn't have any value set for the "DNS" integer, which in turn means we never see any logging, even if "logging level ns debug" is used in the log config.
I suspect similar bugs might exist for osmo-pcu and osmo-gbproxy, but I haven't yet investigated.
The best option would have been to remove the "DNS" integer and move over to a "DLNS" constant (like almost all other libraries are doing by now), but unfortunately that will break configuration files and hence cannot be done anymore now that everything is released.
We have to either declare gprs_ns_set_log_ss()
in a public ns2 header or create a new gprs_ns2_set_log_ss()
with identical implementation.
laforge wrote:
The best option would have been to remove the "DNS" integer and move over to a "DLNS" constant (like almost all other libraries are doing by now), but unfortunately that will break configuration files and hence cannot be done anymore now that everything is released.
But that's exactly what happened and how it works in osmo-gbproxy:
OsmoGbProxy# logging level lns debug
OsmoGbProxy# show logging vty
[...]
LNS DEBUG Enabled GPRS NS layer
[...]
Thu Mar 4 08:58:50 2021 DLNS fsm.c:461 GPRS-NS2-SNS-BSS(NSE00101-SNS)[0x612000001420]{UNCONFIGURED}: Allocated
Thu Mar 4 08:58:50 2021 DLNS gprs_ns2_sns.c:1743 GPRS-NS2-SNS-BSS(NSE00101-SNS)[0x612000001420]{UNCONFIGURED}: Received Event REQ_SELECT_ENDPOINT
It looks like we simply forgot to remove (the unused log category) DNS from osmo-sgsn (and maybe osmo-pcu). ns2 already logs through lns.
- Status changed from New to In Progress
actually, it's the other way around: NS2 uses DLNS ("logging level lns") internally, but osmo-sgsn still contains DNS (and "logging level ns"), which should have been removed.
On Thu, Mar 04, 2021 at 08:06:06AM +0000, daniel [REDMINE] wrote:
It looks like we simply forgot to remove (the unused log category) DNS from osmo-sgsn (and maybe osmo-pcu). ns2 already logs through lns.
https://gerrit.osmocom.org/c/osmo-sgsn/+/23248
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Also available in: Atom
PDF