Tempest floating ips test for compute api fail with "no floating pool found" Error but pass with network api

Bug #1477345 reported by Imran Hayder
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Invalid
Undecided
Unassigned

Bug Description

BACKGROUND:
i have a floating pool named "public" :
ogden-cumulus:/var/lib/jenkins/workspace/tempest_cloud_compute/tempest-repo/tempest # openstack ip floating pool list
+--------+
| Name |
+--------+
| public |
+--------+

now running tempest floating ips test via compute api . they fail as "no floating pool found" .

=============
./run_tempest,sh tempest.api.compute.
2015-07-22 23:09:03.217 19265 INFO tempest_lib.common.rest_client [req-cbdd7d16-2bd3-4e11-a76f-d3272ab1c933 ] Request (FloatingIPsTestJSON:setUpClass): 404 POST http://10.242.47.14:8774/v2/7aa55dac4e644530b8dae70e1ad1e66b/os-floating-ips 0.052s
2015-07-22 23:09:03.217 19265 DEBUG tempest_lib.common.rest_client [req-cbdd7d16-2bd3-4e11-a76f-d3272ab1c933 ] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: {"pool": null}
    Response - Headers: {'status': '404', 'content-length': '73', 'x-compute-request-id': 'req-cbdd7d16-2bd3-4e11-a76f-d3272ab1c933', 'connection': 'close', 'date': 'Wed, 22 Jul 2015 23:11:26 GMT', 'content-type': 'application/json; charset=UTF-8'}
        Body: {"itemNotFound": {"message": "Floating ip pool not found.", "code": 404}} _log_request_full /var/lib/jenkins/workspace/tempest_cloud_compute/tempest-repo/tempest/.venv/lib/python2.7/site-packages/tempest_lib/common/rest_client.py:411
=============

in the above error, we can see the Body{pool: null} passed, because the compute floating IPs client initializes the floating ip with pool value = None.

so they fail.

MORE DETAILS:
when trying to run the tempest api compute tests for floating ips:

````````````````````
./run_tempest.sh tempest.api.compute.floating_ips.test_floating_ips_actions

======================================================================
FAIL: setUpClass (tempest.api.compute.floating_ips.test_floating_ips_actions.FloatingIPsTestJSON)
----------------------------------------------------------------------
Traceback (most recent call last):
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "tempest/test.py", line 272, in setUpClass
    six.reraise(etype, value, trace)
  File "tempest/test.py", line 265, in setUpClass
    cls.resource_setup()
  File "tempest/api/compute/floating_ips/test_floating_ips_actions.py", line 41, in resource_setup
    body = cls.client.create_floating_ip()
  File "tempest/services/compute/json/floating_ips_client.py", line 50, in create_floating_ip
    resp, body = self.post(url, post_body)
  File "/var/lib/jenkins/workspace/tempest_cloud_compute/tempest-repo/tempest/.venv/lib/python2.7/site-packages/tempest_lib/common/rest_client.py", line 256, in post
    return self.request('POST', url, extra_headers, headers, body)
  File "/var/lib/jenkins/workspace/tempest_cloud_compute/tempest-repo/tempest/.venv/lib/python2.7/site-packages/tempest_lib/common/rest_client.py", line 643, in request
    resp, resp_body)
  File "/var/lib/jenkins/workspace/tempest_cloud_compute/tempest-repo/tempest/.venv/lib/python2.7/site-packages/tempest_lib/common/rest_client.py", line 695, in _error_checker
    raise exceptions.NotFound(resp_body)
tempest_lib.exceptions.NotFound: Object not found
Details: {u'message': u'Floating ip pool not found.', u'code': 404}

````````````````

when running floating ip tests for neutron, they passed because i set the correct value of pool "public" in tempest.conf :
network.floating_network_name = public
network.public_network_id = ef22ea64-bad2-4370-8c27-4f2adca4bcd6

with that set, neutron floating ip tests pass without any issues.

But i dont see any option for compute to specify a pool, or even looking at the code, it sets the pool value to None .

the same reason, why scenario.my test_volume_boot_pattern and scenario.test_server_basic_ops( run_valdiation = true in [validation]) fail for reason "floating pool not found" .

summary: Tempest floating ips test for compute api fail with "no floating pool
- found" but pass network api
+ found" Error but pass with network api
Revision history for this message
Imran Hayder (hayderimran7) wrote :

actually the issue is fixed now .
i set "default_floating_pool = public" under [default] section in nova.conf , restarted nova-api and the tests are passing now.

Slowest 7 tests took 50.82 secs:
tempest.api.compute.floating_ips.test_floating_ips_actions.FloatingIPsTestJSON
    test_allocate_floating_ip[id-f7bfb946-297e-41b8-9e8c-aba8e9bb5194,network] 9.94
    test_associate_already_associated_floating_ip[id-6edef4b2-aaf1-4abc-bbe3-993e2561e0fe,network] 22.37
    test_associate_disassociate_floating_ip[id-307efa27-dc6f-48a0-8cd2-162ce3ef0b52,network] 7.58
    test_delete_floating_ip[id-de45e989-b5ca-4a9b-916b-04a52e7bbb8b,network] 2.93
tempest.api.compute.floating_ips.test_floating_ips_actions_negative.FloatingIPsNegativeTestJSON
    test_allocate_floating_ip_from_nonexistent_pool[id-6e0f059b-e4dd-48fb-8207-06e3bba5b074,negative,network] 2.49
    test_associate_ip_to_server_without_passing_floating_ip[id-804b4fcb-bbf5-412f-925d-896672b61eb3,negative,network] 2.91
    test_delete_nonexistent_floating_ip[id-ae1c55a8-552b-44d4-bfb6-2a115a15d0ba,negative,network] 2.60

Ran 9 tests in 164.357s

OK

Changed in tempest:
status: New → Invalid
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.