Numerous problems with test_floating_ips_actions

Bug #929765 reported by David Kranz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Critical
David Kranz

Bug Description

1. floating_ips_client.py: The call to RestClient in __init__ is missing the 'nova' argument after auth_url
2. test_floating_ips_actions.py: Line 97 is missing self.floating_ip_id
3. test_floating_ips_actions.py: Line 27: The index 'private' is really the name of the private network and should come from the config
4. Even after fixing (1), there are still numerous errors (essex/devstack)

ubuntu@essex-devstack:~$ nosetests tempest/tests/test_floating_ips_actions.py
/usr/lib/pymodules/python2.7/nose/plugins/manager.py:383: RuntimeWarning: Unable to load plugin selenium = noseselenium.plugins:SeleniumPlugin: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
  RuntimeWarning)
/usr/lib/pymodules/python2.7/nose/plugins/manager.py:383: RuntimeWarning: Unable to load plugin djangoliveserver = noseselenium.plugins:DjangoLiveServerPlugin: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
  RuntimeWarning)
/usr/lib/pymodules/python2.7/nose/plugins/manager.py:383: RuntimeWarning: Unable to load plugin cherrypyliveserver = noseselenium.plugins:CherryPyLiveServerPlugin: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
  RuntimeWarning)
/usr/lib/pymodules/python2.7/nose/plugins/manager.py:383: RuntimeWarning: Unable to load plugin selenium_fixtures = noseselenium.plugins:SeleniumFixturesPlugin: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
  RuntimeWarning)
.E..EE.
======================================================================
ERROR: Positive test:Associate the provided floating IP to a specific server
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ubuntu/tempest/tests/test_floating_ips_actions.py", line 93, in test_associate_floating_ip
    self.fixed_ip_addr)
  File "/home/ubuntu/tempest/services/nova/json/floating_ips_client.py", line 56, in associate_floating_ip_to_server
    resp, body = self.client.post(url, post_body, None)
  File "/home/ubuntu/tempest/common/rest_client.py", line 93, in post
    return self.request('POST', url, headers, body)
  File "/home/ubuntu/tempest/common/rest_client.py", line 124, in request
    raise exceptions.NotFound(resp_body)
NotFound: Object not found
Details: Object not found
Details: 404 Not Found

The resource could not be found.

-------------------- >> begin captured logging << --------------------
tempest.common.rest_client: ERROR: Request URL: http://10.0.0.34:8774/v1.1/6aad1db96b0346a8871f77bd6714fd1d/os-floating-ips/1/associate
tempest.common.rest_client: ERROR: Request Body: {"associate_address": {"fixed_ip": "10.0.0.4"}}
tempest.common.rest_client: ERROR: Response Headers: {'date': 'Thu, 09 Feb 2012 19:32:20 GMT', 'status': '404', 'content-length': '52', 'content-type': 'text/plain; charset=UTF-8'}
tempest.common.rest_client: ERROR: Response Body: 404 Not Found

The resource could not be found.

--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: Negative test:Deletion of a nonexistant floating IP
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ubuntu/tempest/tests/test_floating_ips_actions.py", line 124, in test_delete_nonexistant_floating_ip
    resp, body = self.client.delete_floating_ip(self.non_exist_id)
  File "/home/ubuntu/tempest/services/nova/json/floating_ips_client.py", line 43, in delete_floating_ip
    resp, body = self.client.delete(url)
  File "/home/ubuntu/tempest/common/rest_client.py", line 99, in delete
    return self.request('DELETE', url)
  File "/home/ubuntu/tempest/common/rest_client.py", line 151, in request
    raise exceptions.ComputeFault(message)
ComputeFault: Got compute fault
Details: Got compute fault
Details: The server has either erred or is incapable of performing the requested operation.
-------------------- >> begin captured logging << --------------------
tempest.common.rest_client: ERROR: Request URL: http://10.0.0.34:8774/v1.1/6aad1db96b0346a8871f77bd6714fd1d/os-floating-ips/99996594899503
tempest.common.rest_client: ERROR: Request Body: None
tempest.common.rest_client: ERROR: Response Headers: {'date': 'Thu, 09 Feb 2012 19:32:21 GMT', 'status': '500', 'content-length': '128', 'content-type': 'application/json; charset=UTF-8'}
tempest.common.rest_client: ERROR: Response Body: {u'computeFault': {u'message': u'The server has either erred or is incapable of performing the requested operation.', u'code': 500}}
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: Positive test:Dissociate the provided floating IP
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ubuntu/tempest/tests/test_floating_ips_actions.py", line 109, in test_dissociate_floating_ip
    self.fixed_ip_addr)
  File "/home/ubuntu/tempest/services/nova/json/floating_ips_client.py", line 56, in associate_floating_ip_to_server
    resp, body = self.client.post(url, post_body, None)
  File "/home/ubuntu/tempest/common/rest_client.py", line 93, in post
    return self.request('POST', url, headers, body)
  File "/home/ubuntu/tempest/common/rest_client.py", line 124, in request
    raise exceptions.NotFound(resp_body)
NotFound: Object not found
Details: Object not found
Details: 404 Not Found

The resource could not be found.

-------------------- >> begin captured logging << --------------------
tempest.common.rest_client: ERROR: Request URL: http://10.0.0.34:8774/v1.1/6aad1db96b0346a8871f77bd6714fd1d/os-floating-ips/1/associate
tempest.common.rest_client: ERROR: Request Body: {"associate_address": {"fixed_ip": "10.0.0.4"}}
tempest.common.rest_client: ERROR: Response Headers: {'date': 'Thu, 09 Feb 2012 19:32:21 GMT', 'status': '404', 'content-length': '52', 'content-type': 'text/plain; charset=UTF-8'}
tempest.common.rest_client: ERROR: Response Body: 404 Not Found

The resource could not be found.

--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 7 tests in 14.723s

FAILED (errors=3)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

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

Changed in tempest:
assignee: nobody → David Kranz (david-kranz)
status: New → In Progress
Revision history for this message
David Kranz (david-kranz) wrote :

I fixed (1) that makes all tests fail with Essex, and (2).
The submitter of this test should make it work.

Changed in tempest:
assignee: David Kranz (david-kranz) → Sapan Kona (sapan-kona)
Revision history for this message
David Kranz (david-kranz) wrote :

This test also fails in a similar way against diablo.

Revision history for this message
David Kranz (david-kranz) wrote :

With regard to (3), since the network label is not specified outside the black box, the setup code should probe into the addresses without using the network label as an index.

Jay Pipes (jaypipes)
Changed in tempest:
importance: Undecided → Critical
assignee: Sapan Kona (sapan-kona) → David Kranz (david-kranz)
milestone: none → essex-4
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/3981
Committed: http://github.com/openstack/tempest/commit/d870644139adafc22f708f73a17a39b16d1c29e6
Submitter: Jenkins
Branch: master

commit d870644139adafc22f708f73a17a39b16d1c29e6
Author: David Kranz <email address hidden>
Date: Thu Feb 9 16:10:17 2012 -0500

    Fix for critical part of bug 929765.

    Change-Id: I6ca3b3bc674305011d2469ca1f417a435d030a98

Changed in tempest:
status: In Progress → Fix Committed
Revision history for this message
David Kranz (david-kranz) wrote :

The critical part is fixed and I am working on the other problems.

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/4074
Committed: http://github.com/openstack/tempest/commit/6e977a7f54b32ace5fafe36363b5d51cf58c2539
Submitter: Jenkins
Branch: master

commit 6e977a7f54b32ace5fafe36363b5d51cf58c2539
Author: David Kranz <email address hidden>
Date: Mon Feb 13 09:34:05 2012 -0500

    Make floating ip test work. Fixes bug 929765.

    The problems were:
    1. FloatingIP client does not use json/headers for POST
    2. The API data for associate/disassociate floating ip were wrong
    3. The negative cases were too specific about what exception would be thrown

    Also made test_server_metadata work.

    Change-Id: I5bea4e03203391042589ba264d9eaed3ef1199b3

    Make test_flavors.py pass.

    There were some "expect failures" for bugs that have been fixed in Essex.
    Added release_name, defaulting to essex, to allow skipping of tests of things
    that are broken in diablo but fixed in essex.

    Change-Id: I38ada5ee200104efe112a3bcd12b902c63e4b9ed

Changed in tempest:
status: In Progress → Fix Committed
Jay Pipes (jaypipes)
Changed in tempest:
status: Fix Committed → Fix Released
Sean Dague (sdague)
Changed in tempest:
milestone: none → havana-3
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.