Comment 2 for bug 1995514

Revision history for this message
Gorka Eguileor (gorka) wrote :

Looks like the problem may be that my patch in oslo.logging didn't expect consumers of the library to call the setup method multiple times.

Neutron functional tests seem to do it: In BaseLoggingTestCase's setup it calls [1] base.setup_test_logging which in turn calls config.setup_logging() [2] which in turn calls logging.setup [3].

I think this may be fixed by modifying the `if eventlet` condition [4] to also check if the change has not already been made:

  if eventlet and logging.Handler.createLock != pipe_mutex.pipe_createLock:

I'm assuming the problem is that Python is not running the Garbage Collector fast enough to trigger the closing of the pipes [5].

[1]: https://github.com/openstack/neutron/blob/9e2a0ac058305dd16d6dedb883d305cd162f5fe4/neutron/tests/functional/base.py#L82

[2]: https://github.com/openstack/neutron/blob/9e2a0ac058305dd16d6dedb883d305cd162f5fe4/neutron/tests/base.py#L94

[3]: https://github.com/openstack/neutron/blob/9e2a0ac058305dd16d6dedb883d305cd162f5fe4/neutron/common/config.py#L118

[4]: https://github.com/openstack/oslo.log/blob/94b9dc32ec1f52a582adbd97fe2847f7c87d6c17/oslo_log/log.py#L276

[5]: https://github.com/openstack/oslo.log/blob/94b9dc32ec1f52a582adbd97fe2847f7c87d6c17/oslo_log/pipe_mutex.py#L125-L137