placement API functional test fixtures do not do appropriate stdout and stderr handling

Bug #1623573 reported by Chris Dent
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Chris Dent

Bug Description

In a multi-process environment the logging that is done in the placement API when it is running under functional tests with gabbi interleaves, resulting in illegible output in test runs. Makes it pretty hard to do anything when a failure happens.

There are fixtures that other nova tests use that ought to be reusable here.

Revision history for this message
Chris Dent (cdent) wrote :
Revision history for this message
Matt Riedemann (mriedem) wrote :

I see the gabbits call out fixtures, and the fixture_module is passed to the test loader, but I'm not sure how we would work this into it:

https://github.com/openstack/nova/blob/04e94df9112a03727f040fd55e2cb2cdc8840d60/nova/test.py#L181-L191

Unless each gabbit would have to call those out, or the APIFixture would load them?

tags: added: testing
description: updated
Changed in nova:
status: New → Triaged
Revision history for this message
Chris Dent (cdent) wrote :

Matt, basically it would be similar to how the existing gabbi fixtures start and stop the database: they borrow code from the fixtures in nova/tests/fixtures.py but drive them more explicitly rather than letting them be fixtures in the Fixtures (the class) kinds of things.

So, yeah, in the APIFixture (since every gabbit loads that one).

Gabbi fixtures are context managers that surround the entire yaml file, so if we add stderr and stdout capturing, it will capture for the entire file before producing any output.

It won't look like what's happening in nova.test but ought to do the same thing.

Changed in nova:
importance: Undecided → Low
Chris Dent (cdent)
Changed in nova:
assignee: nobody → Chris Dent (cdent)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/374256

Changed in nova:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/374256
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=687984bcb4a259dcc8e88e9d9b902b103bb396a1
Submitter: Jenkins
Branch: master

commit 687984bcb4a259dcc8e88e9d9b902b103bb396a1
Author: Chris Dent <email address hidden>
Date: Wed Sep 21 15:41:58 2016 +0000

    [placement] Manage log and other output in gabbi fixure

    Recent changes to the placement API added more verbose logging and
    output across both stdout and stderr. In test runs this resulted in
    a combination of far too much output as well as output that was
    impossible to read because it was interleaved.

    This change uses fixtures from nova.tests.fixtures to capture
    stray output streams and logs.

    It also adds a specific logger for the ERROR level that overrides
    the fixture log handling to send that level to the default stderr.
    This is required in order to effectively see error messages on both
    side of the wsgi-intercept used when running gabbi. Without this,
    the errors are swallowed and test development and debugging,
    especially locally for TDD, is hamstrung.

    Closes-Bug: #1623573
    Change-Id: I300456b0261dfc0ae46c799e5a03cbeab25106c2

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 15.0.0.0b1

This issue was fixed in the openstack/nova 15.0.0.0b1 development milestone.

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.