Regression in Rackspace Cloud Servers tests

Bug #1265034 reported by Jason Dunsmore
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Jason Dunsmore

Bug Description

Commit 63b7f14403 introduced a regression in the Rackspace Cloud Server tests. The tests now fail with:

[...]
FAIL: rackspace.heat.tests.test_rackspace_cloud_server.RackspaceCloudServerTest.test_rackconnect_unknown
----------------------------------------------------------------------
pythonlogging:'': {{{
Changing Rackspace::Cloud::Server from <class 'rackspace.heat.engine.plugins.cloud_server.CloudServer'> to <class 'rackspace.heat.engine.plugins.cloud_server.CloudServer'>
Task create from CloudServer "test_rackconnect_unknown_name" starting
creating CloudServer "test_rackconnect_unknown_name"
Task create from CloudServer "test_rackconnect_unknown_name" running
DB error 'NoneType' object has no attribute 'update_and_save'
Calling nova().servers.create()
CREATE : CloudServer "test_rackconnect_unknown_name"
Traceback (most recent call last):
  File "/home/jason/github/heat/heat/engine/resource.py", line 411, in _do_action
    handle_data = handle()
  File "rackspace/heat/engine/plugins/cloud_server.py", line 341, in handle_create
    return server, scheduler.TaskRunner(self._attach_volumes_task())
  File "rackspace/heat/engine/plugins/cloud_server.py", line 345, in _attach_volumes_task
    for volume_id, device in self.volumes())
  File "/home/jason/github/heat/heat/engine/resources/instance.py", line 496, in volumes
    vol[self.VOLUME_DEVICE]) for vol in volumes)
TypeError: 'NoneType' object is not iterable
DB error 'NoneType' object has no attribute 'update_and_save'
}}}

Traceback (most recent call last):
  File "rackspace/heat/tests/test_rackspace_cloud_server.py", line 512, in test_rackconnect_unknown
    str(exc))
  File "/home/jason/github/heat/.venv/local/lib/python2.7/site-packages/testtools/testcase.py", line 322, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/home/jason/github/heat/.venv/local/lib/python2.7/site-packages/testtools/testcase.py", line 417, in assertThat
    raise MismatchError(matchee, matcher, mismatch, verbose)
MismatchError: !=:
reference = 'Error: Unknown RackConnect automation status: FOO'
actual = "TypeError: 'NoneType' object is not iterable"

Ran 31 tests in 5.345s
FAILED (failures=26)

Instance.volumes() now relies on its VOLUME property's default. Since CloudServer inherits volumes() from Instance but defines its own VOLUMES property, its VOLUMES property should also have a default.

Changed in heat:
assignee: nobody → Jason Dunsmore (jasondunsmore)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
status: New → In Progress
Revision history for this message
Angus Salkeld (asalkeld) wrote :
Changed in heat:
milestone: none → icehouse-2
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/64451
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=6602396f5c76389656d0ab1012b3870fa5d2e6a8
Submitter: Jenkins
Branch: master

commit 6602396f5c76389656d0ab1012b3870fa5d2e6a8
Author: Jason Dunsmore <email address hidden>
Date: Mon Dec 30 11:08:06 2013 -0600

    Fix regression in Rackspace Cloud Servers tests

    Commit 63b7f14403 introduced a regression in the Rackspace Cloud Server
    tests. Instance.volumes() now relies on its VOLUME property's default.
    Since CloudServer inherits volumes() from Instance but defines its own
    VOLUMES property, its VOLUMES property should also have a default.

    Closes-Bug: #1265034
    Change-Id: Ib17337c5d06aedf65da5497ad48858d649ba4e96

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: icehouse-2 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.