exabgp worker does not emit any debugging log meesage

Bug #1794270 reported by Yang Youseok
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
BaGPipe
New
Undecided
Unassigned

Bug Description

Currently in exabgp_peer_worker.py, 'decorated_restart' decorator steal exabgp logger initialization. But the problem is there is no way to set exabgp log level if it does not restart with 'restart' flag.

So whatever user add config level, exabgp debugging log does not emit at all and it makes hard to find solution with even tiny misconfiguration like invalid local_address.

Revision history for this message
Thomas Morin (tmmorin-orange) wrote :

The log level is supposed to be forced here:
https://github.com/openstack/networking-bagpipe/blob/master/networking_bagpipe/bagpipe_bgp/engine/exabgp_peer_worker.py#L102

This should work independently of the restart step in exabgp unmodified Logger.

I'm not sure what causes the problem you are seeing. I'd need to investigate more.
I suspect that the way we monkey patch exabgp to drive logs to oslo_log stopped working with some change in exabgp.

Could you indicate which version of networking-bagpipe you are using, and with which version of exabgp ?

Revision history for this message
Yang Youseok (ileixe) wrote :

4.0.5 for exabagp, stable/queens for networking-bagpipe.

I dig the exabgp code base a little bit, and I found the way in the code you mentions do not change the logger log level in exabgp, but do change the kind of metadata when exabgp's print function use.

So, if syslog logger level is not changed (in restart step that I said), nothing happens with syslog._debug() function.

I think the way of exabgp logger is kind of weird though, maybe we networking-bagpipe should follow
it.

Revision history for this message
Thomas Morin (tmmorin-orange) wrote :

> I think the way of exabgp logger is kind of weird though, maybe we networking-bagpipe should follow it.

Feel free to make practical proposals.
My current stand was: in networking-bagpipe, we want everything logged through oslo_log for consistency, so we need to bypass the specific exabgp logging.

I'll also try to dig more why the current code is not actually controlling the exabgp log level.

Revision history for this message
Thomas Morin (tmmorin-orange) wrote :

I've tried again in the dev env I have available right now with me, which is not queens, but pre-rocky with exabgp 4.0.6, and the feature works as designed in this context.

Just to make sure: are you aware that '-d' is not sufficient to have all the logging of all components, because some components (and exabgp is part of them) have their logging level controlled differently:

https://github.com/openstack/networking-bagpipe/blob/stable/queens/networking_bagpipe/bagpipe_bgp/bgp_daemon.py#L51-L60

To override these settings and enable debug for exabgp, you'll have to use the --log-config-append option. This behavior is not specific to bagpipe-bgp, but common to many openstack components.

If you do this and still don't have exabgp debug, then this means we'll need to reproduce and dig on a queens environment.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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