After creating a floating ip pool, when creating a floating ip the floating ip pool is null and cannot be found.
The create_floating_ip function in floating_ips_client.py had the pool default to None. When this function is called in resource_setup there is nothing passed into it so the default is used.
This is the stack trace when you try allocate an ip with tempest:
======================================================================
FAIL: setUpClass (tempest.api.compute.floating_ips.test_list_floating_ips.FloatingIPDetailsTestJSON)
----------------------------------------------------------------------
Traceback (most recent call last):
testtools.testresult.real._StringException: Traceback (most recent call last):
File "/tmp/tempest/tempest/test.py", line 272, in setUpClass
six.reraise(etype, value, trace)
File "/tmp/tempest/tempest/test.py", line 265, in setUpClass
cls.resource_setup()
File "/tmp/tempest/tempest/api/compute/floating_ips/test_list_floating_ips.py", line 33, in resource_setup
body = cls.client.create_floating_ip()
File "/tmp/tempest/tempest/services/compute/json/floating_ips_client.py", line 51, in create_floating_ip
resp, body = self.post(url, post_body)
File "/tmp/tempest/.venv/lib/python2.7/site-packages/tempest_lib/common/rest_client.py", line 252, in post
return self.request('POST', url, extra_headers, headers, body)
File "/tmp/tempest/.venv/lib/python2.7/site-packages/tempest_lib/common/rest_client.py", line 629, in request
resp, resp_body)
File "/tmp/tempest/.venv/lib/python2.7/site-packages/tempest_lib/common/rest_client.py", line 675, in _error_checker
raise exceptions.NotFound(resp_body)
tempest_lib.exceptions.NotFound: Object not found
Details: {"itemNotFound": {"message": "NV-D903728 Floating ip pool not found.", "code": 404}}
This is the debug output when you don't specify an ip pool to nova:
DEBUG (session:195) REQ: curl -g -i -X GET http://9.5.125.143:5000/v2.0 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
INFO (connectionpool:194) Starting new HTTP connection (1): 9.5.125.143
DEBUG (connectionpool:360) "GET /v2.0 HTTP/1.1" 200 337
DEBUG (session:224) RESP: [200] date: Thu, 04 Jun 2015 18:53:19 GMT vary: X-Auth-Token content-length: 337 content-type: application/json
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}], "id": "v2.0", "links": [{"href": "http://9.5.125.143:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}}
DEBUG (v2:76) Making authentication request to http://9.5.125.143:5000/v2.0/tokens
DEBUG (connectionpool:360) "POST /v2.0/tokens HTTP/1.1" 200 4174
DEBUG (iso8601:171) Parsed 2015-06-04T19:53:19Z into {'tz_sign': None, 'second_fraction': None, 'hour': u'19', 'daydash': u'04', 'tz_hour': None, 'month': None, 'timezone': u'Z', 'second': u'19', 'tz_minute': None, 'year': u'2015', 'separator': u'T', 'monthdash': u'06', 'day': None, 'minute': u'53'} with default timezone <iso8601.iso8601.Utc object at 0x7f1da45d7e50>
DEBUG (iso8601:127) Got u'2015' for 'year' with default None
DEBUG (iso8601:127) Got u'06' for 'monthdash' with default None
DEBUG (iso8601:127) Got 6 for 'month' with default 6
DEBUG (iso8601:127) Got u'04' for 'daydash' with default None
DEBUG (iso8601:127) Got 4 for 'day' with default 4
DEBUG (iso8601:127) Got u'19' for 'hour' with default None
DEBUG (iso8601:127) Got u'53' for 'minute' with default None
DEBUG (iso8601:127) Got u'19' for 'second' with default None
DEBUG (session:195) REQ: curl -g -i -X POST http://9.5.125.143:8774/v2/ee2f7abfe1df44f0ad9dc1d80ac655a2/os-floating-ips -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}c078d61369649497433ea317bccd1d257642caa7" -d '{"pool": null}'
INFO (connectionpool:194) Starting new HTTP connection (1): 9.5.125.143
DEBUG (connectionpool:360) "POST /v2/ee2f7abfe1df44f0ad9dc1d80ac655a2/os-floating-ips HTTP/1.1" 404 84
DEBUG (session:224) RESP:
DEBUG (shell:914) NV-D903728 Floating ip pool not found. (HTTP 404) (Request-ID: req-818276b1-a47a-463c-9787-7400eb87c7c3)
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line 911, in main
OpenStackComputeShell().main(argv)
File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line 838, in main
args.func(self.cs, args)
File "/usr/lib/python2.7/site-packages/novaclient/v2/shell.py", line 2426, in do_floating_ip_create
_print_floating_ip_list([cs.floating_ips.create(pool=args.pool)])
File "/usr/lib/python2.7/site-packages/novaclient/v2/floating_ips.py", line 44, in create
return self._create("/os-floating-ips", {'pool': pool}, "floating_ip")
File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 161, in _create
_resp, body = self.api.client.post(url, body=body)
File "/usr/lib/python2.7/site-packages/keystoneclient/adapter.py", line 176, in post
return self.request(url, 'POST', **kwargs)
File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 96, in request
raise exceptions.from_response(resp, body, url, method)
NotFound: NV-D903728 Floating ip pool not found. (HTTP 404) (Request-ID: req-818276b1-a47a-463c-9787-7400eb87c7c3)
ERROR (NotFound): NV-D903728 Floating ip pool not found. (HTTP 404) (Request-ID: req-818276b1-a47a-463c-9787-7400eb87c7c3)
I noticed that CONF.floating_network_name anywhere which could be an issue.
Tempest does not specify a pool when using the nova floating ip client. The default pool for nova will be used. I suspect that in this case you are using neutron but nova is not configured to use the same pool as is being provided by neutron. In any event, this is not a tempest bug.