Dear Osmocom comunity,
after my patches being in gerrit since October 3 without getting any significant review comments, I decided to rebase+merge the code to enforce correct "identifiers" for entnties like rate_ctr or osmo_fsm which get registered to libosmocore and which are subsequently automatically exported via CTRL.
A valid identifier is from now on known as any 7-bit ASCII string excluding characters from the following set: :., {}[]()<>|~\^`'"?=;/+*&%$#!
This has caused some (not entirely unexpected) breakage in osmo-bts.git and osmo-bsc.git and is the cause of a couple of "red" Jenkins builds for those projects. I've quickly followed-up with patches for those two repositories to make sure other people/patches don't suffer from fall-out.
What's important to note from now on and in the future: * don't use any string identifiers that violate osmo_identifier_valid() * check the return value of calls like osmo_fsm_register() as they may fail if your identifiers are incorrect * use ':' as separator in rate_ctr_group or rate_ctr names. Any existing '.' will be transparently converted to ':' for compatibility reasons. * if you find other sub-systems in the libosmo* universe that use string identifiers for certain objects, let's try to introduce calls to osmo_identifier_valid() in all of their registration paths to ensure that we could later on add automatic export of such objects to CTRL or other interfaces without having to change the name at that point. Things that come to my mind are e.g. * SCCP global titles and AS/ASP names in libosmo-sigtran * SMPP ESME names in osmo-{msc,nitb} Patches welcome!
Regards, Harald
There seems to be related build failure in osmo-sgsn which I've fixed in https://gerrit.osmocom.org/#/c/4410/
I'm not sure how to fix failure in osmo-pcu or if it's related at all: tests fail with
ERROR: osmo_log_info == NULL! You must call log_init() before using logging! Assert failed osmo_log_info logging.c:188
which was added several months ago. Any ideas?
Ok, got it:
We run osmo_init_logging() in OsmoPCU tests but by that time rate_ctr_group_alloc() is already called from BTS singleton constructor. Calling osmo_init_logging()from there is not an option as we won't have logging levels set properly - see
https://gerrit.osmocom.org/4411
for details.
Shall I move rate-ctr related code outside of singleton? Is there better solution?