Project

General

Profile

Bug #5058

SGSN doesn't create any NS level logging, even with "logging level ns debug"

Added by laforge 2 months ago. Updated 2 months ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
-
Target version:
-
Start date:
03/04/2021
Due date:
% Done:

100%

Spec Reference:

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.

Associated revisions

Revision a39b2592 (diff)
Added by laforge 2 months ago

gprs_ns2: Remove any references to DNS; we use DLNS in NS2.

Related: OS#5058
Change-Id: I1f047e022a029d5f982deae0b30fec9e5a00d1ac

Revision adcf97d0 (diff)
Added by laforge 2 months ago

Remove bogus DNS log category

When we switched to the libosmogb NS2 implementation, we should have
removed the DNS category, as NS2 uses DLNS internally and hence DNS
is unused.

Change-Id: Ia4723ab344ad6a1927029a2d5d0dda020266b39d
Closes: OS#5058

History

#1 Updated by daniel 2 months ago

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.

#2 Updated by laforge 2 months ago

  • 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.

#3 Updated by laforge 2 months ago

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

#4 Updated by laforge 2 months ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)