[OSTF] AttributeError during neutron test execution

Bug #1604315 reported by Inessa Vasilevskaya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Dmitry Belyaninov
Mitaka
In Progress
Medium
Fuel Sustaining
Newton
Fix Committed
Medium
Vladimir Khlyunev

Bug Description

Reproduced on mos 10, ostf connectivity.

If by any reason (ex. controller node not ready after reboot and ostf tests are accidently run) an exception is raised in tearDown on not healthy environment, AttributeError will appear in the logs:

  File "/usr/lib/python2.7/site-packages/fuel_health/neutronmanager.py", line 188, in tearDownClass
    cls._clear_networks()
  File "/usr/lib/python2.7/site-packages/fuel_health/neutronmanager.py", line 137, in _clear_networks
    cls.error_msg.append(exc)
AttributeError: type object 'TestNeutron' has no attribute 'error_msg'

More logs here http://paste.openstack.org/show/537369/

I guess this happens because error_msg variable gets initialized only in case of successful client initialization (https://github.com/openstack/fuel-ostf/blob/master/fuel_health/nmanager.py#L600), but no such logic is present in teardown (https://github.com/openstack/fuel-ostf/blob/master/fuel_health/neutronmanager.py#L185) which overrides the parent one with this logic present (https://github.com/openstack/fuel-ostf/blob/master/fuel_health/nmanager.py#L962).

Tags: area-qa
tags: added: area-qa
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-ostf (master)

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

Changed in fuel:
assignee: Fuel QA Team (fuel-qa) → Dmitry Belyaninov (dbelyaninov)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-ostf (master)

Reviewed: https://review.openstack.org/391061
Committed: https://git.openstack.org/cgit/openstack/fuel-ostf/commit/?id=3146c32738b85e86f41e22a3dc17d4acb87b80a7
Submitter: Jenkins
Branch: master

commit 3146c32738b85e86f41e22a3dc17d4acb87b80a7
Author: Dmitry Belyaninov <email address hidden>
Date: Thu Oct 27 08:40:03 2016 +0000

    Add "tearDownClass" call from parent class

    The "NeutronBaseTest" class should call
    "tearDownClass" method from base class
    to initialize "error_msg". The reason is
    "AttributeError" for derived classes
    if "error_msg" was not initialized.

    Change-Id: Ifb78e7902b37f70f6adea6a214f8e440b0ec767f
    Closes-Bug: 1604315

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-ostf (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/403507

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on fuel-ostf (stable/mitaka)

Change abandoned by Fuel DevOps Robot (<email address hidden>) on branch: stable/mitaka
Review: https://review.openstack.org/403507
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-ostf (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/429538

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-ostf (stable/newton)

Reviewed: https://review.openstack.org/429538
Committed: https://git.openstack.org/cgit/openstack/fuel-ostf/commit/?id=56c2516e52d62e535e306c3071c06d143bf9313a
Submitter: Jenkins
Branch: stable/newton

commit 56c2516e52d62e535e306c3071c06d143bf9313a
Author: Dmitry Belyaninov <email address hidden>
Date: Thu Oct 27 08:40:03 2016 +0000

    Add "tearDownClass" call from parent class

    The "NeutronBaseTest" class should call
    "tearDownClass" method from base class
    to initialize "error_msg". The reason is
    "AttributeError" for derived classes
    if "error_msg" was not initialized.

    Change-Id: Ifb78e7902b37f70f6adea6a214f8e440b0ec767f
    Closes-Bug: 1604315
    (cherry picked from commit 3146c32738b85e86f41e22a3dc17d4acb87b80a7)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/fuel-ostf 11.0.0.0rc1

This issue was fixed in the openstack/fuel-ostf 11.0.0.0rc1 release candidate.

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.