OSTF heat tests fail if there are images not in active state

Bug #1326585 reported by Ryan Moe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
Medium
Sergey Murashov
4.1.x
Fix Committed
Medium
Sergey Murashov
5.0.x
Fix Released
Medium
Sergey Murashov

Bug Description

Steps to reproduce:

1. Create an empty image in glance ("glance image-create" with no parameters)
2. Run any Heat test in OSTF
3. Observe this traceback

Traceback (most recent call last):
  File "/opt/fuel_plugins/ostf/lib/python2.6/site-packages/unittest2/case.py", line 340, in run
    testMethod()
  File "/opt/fuel_plugins/ostf/lib/python2.6/site-packages/fuel_health/tests/platform_tests/test_heat.py", line 382, in test_rollback
    self.check_image_exists()
  File "/opt/fuel_plugins/ostf/lib/python2.6/site-packages/fuel_health/nmanager.py", line 319, in check_image_exists
    self.get_image_from_name()
  File "/opt/fuel_plugins/ostf/lib/python2.6/site-packages/fuel_health/nmanager.py", line 268, in get_image_from_name
    if im.name.strip().lower() == image_name.strip().lower():
AttributeError: 'NoneType' object has no attribute 'strip'

Here is the list of images gathered: [<Image: F17-x86_64-cfntools>, <Image: None>, <Image: TestVM>]
The <Image: None> is the blank image stuck in the SAVING state.

Revision history for this message
Timur Nurlygayanov (tnurlygayanov) wrote :

So, of course, user should download image and only after that run OSTF tests to verify the cloud.
We can add check to verify that required image has 'Active' state for all OSTF tests with images.

tags: added: heat
Changed in fuel:
importance: Undecided → Medium
milestone: none → 5.1
milestone: 5.1 → none
status: New → Invalid
Changed in fuel:
status: Invalid → Incomplete
assignee: nobody → Ryan Moe (rmoe)
Changed in fuel:
assignee: Ryan Moe (rmoe) → Sergey Murashov (smurashov)
Revision history for this message
Ryan Moe (rmoe) wrote :

This doesn't just affect the tests for Heat. The issue is that OSTF iterates over ALL images in Glance and tries to access variables that aren't guaranteed to exist (e.g. 'name', glance images do not have to have a name but OSTF assumes they do). Some tests will fail with no indication of what the problem is.

Changed in fuel:
status: Incomplete → In Progress
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/98970

Changed in fuel:
milestone: none → 5.0.1
tags: added: backports-4.1.1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-ostf (stable/4.1)

Fix proposed to branch: stable/4.1
Review: https://review.openstack.org/98977

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

Fix proposed to branch: stable/5.0
Review: https://review.openstack.org/100260

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

Reviewed: https://review.openstack.org/98977
Committed: https://git.openstack.org/cgit/stackforge/fuel-ostf/commit/?id=3fab8c4d901724c4e2c1e4774f191622813da913
Submitter: Jenkins
Branch: stable/4.1

commit 3fab8c4d901724c4e2c1e4774f191622813da913
Author: Sergey Murashov <email address hidden>
Date: Tue Jun 10 13:07:54 2014 +0400

    Add check if image.status is active

    Change-Id: I2a3ff256890f5c0b8945d11e3b7792b2335162eb
    Closes-bug: #1326585

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

Reviewed: https://review.openstack.org/100260
Committed: https://git.openstack.org/cgit/stackforge/fuel-ostf/commit/?id=444e0196412526dc41826fd0805469733206be28
Submitter: Jenkins
Branch: stable/5.0

commit 444e0196412526dc41826fd0805469733206be28
Author: Sergey Murashov <email address hidden>
Date: Mon Jun 16 18:20:25 2014 +0400

    Add check if image.status is active

    Change-Id: If963d06a0cd33adb24c465812e84253087546b43
    Closes-bug: #1326585

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

Reviewed: https://review.openstack.org/98970
Committed: https://git.openstack.org/cgit/stackforge/fuel-ostf/commit/?id=b1c41beb976256859e43b19de608731d00747d8c
Submitter: Jenkins
Branch: master

commit b1c41beb976256859e43b19de608731d00747d8c
Author: Sergey Murashov <email address hidden>
Date: Tue Jun 10 12:10:04 2014 +0400

    Add check if image.status is active

    Change-Id: Iaf9a814a8412f64663ea21d5e87c1f501355b07c
    Closes-bug: #1326585

Changed in fuel:
milestone: 5.0.1 → 5.1
Changed in fuel:
status: Fix Committed → Fix Released
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.