Oslo logging doesn't work during IPA functional tests

Bug #1660432 reported by Mario Villaplana
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Won't Fix
Low
Unassigned

Bug Description

It appears as though oslo logging doesn't work while running ironic-python-agent's functional test suites.

Steps to reproduce:

1. Add a small log message to ironic_python_agent/agent.py's run() method, i.e. LOG.error("Hello world"). This should log as soon as IPA starts up.

2. Run IPA functional tests: tox -efunc

3. Read the output and notice that "Hello world" does not appear anywhere during the test run, or in ostestr log files.

I believe this occurs because a separate process exists to run the agent. When logging in the test runner process (within a test, or during test setup), logging works as expected.

I had a workaround that substitutes the oslo logger with this: https://docs.python.org/2/library/multiprocessing.html#multiprocessing.get_logger

but that requires modification of non-test files. A workaround that does not require modification of actual agent code is required.

Tags: agent
Changed in ironic:
assignee: nobody → Mario Villaplana (mario-villaplana-j)
Vladyslav Drok (vdrok)
Changed in ironic:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Vladyslav Drok (vdrok) wrote :

I think we'll need to do something like logging fixture here https://github.com/openstack/cinder/blob/master/cinder/tests/fixtures.py to make things work

Changed in ironic:
status: Confirmed → Triaged
assignee: Mario Villaplana (mario-villaplana-j) → nobody
Revision history for this message
Julia Kreger (juliaashleykreger) wrote :

Moving to wontfix. I don't beleive this is still the case, and also we are unlikely to do additional work on these functional tests.

Changed in ironic:
status: Triaged → Won't Fix
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.