FloatingIpPoolNotFound when creating ElasticIp

Bug #1206865 reported by Xiang Hui
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
Xiang Hui

Bug Description

OS : RHEL6.4
OpenStack version : Havana
Template : WordPress_2_Instances_With_EBS_EIP.template get from https://github.com/openstack/heat-templates.git

2013-07-29 04:38:05.006 13486 INFO heat.engine.resource [-] creating ElasticIp "DatabaseIPAddress"
2013-07-29 04:38:05.006 13486 DEBUG heat.engine.scheduler [-] Task resource_action running step /usr/lib/python2.6/site-packages/heat/engine/scheduler.py:165
2013-07-29 04:38:05.017 13486 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 9.123.136.218
2013-07-29 04:38:05.058 13486 DEBUG urllib3.connectionpool [-] "POST /v2/b21a96e16c3c438caab4a27a1f58a5b8/os-floating-ips HTTP/1.1" 404 97 _make_request /usr/lib/python2.6/site-packages/urllib3/connectionpool.py:295
2013-07-29 04:38:05.059 13486 ERROR heat.engine.resource [-] CREATE : ElasticIp "DatabaseIPAddress"
2013-07-29 04:38:05.059 13486 TRACE heat.engine.resource Traceback (most recent call last):
2013-07-29 04:38:05.059 13486 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/heat/engine/resource.py", line 359, in _do_action
2013-07-29 04:38:05.059 13486 TRACE heat.engine.resource handle_data = handle()
2013-07-29 04:38:05.059 13486 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/heat/engine/resources/eip.py", line 51, in handle_create
2013-07-29 04:38:05.059 13486 TRACE heat.engine.resource ips = self.nova().floating_ips.create()
2013-07-29 04:38:05.059 13486 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/novaclient/v1_1/floating_ips.py", line 41, in create
2013-07-29 04:38:05.059 13486 TRACE heat.engine.resource return self._create("/os-floating-ips", {'pool': pool}, "floating_ip")
2013-07-29 04:38:05.059 13486 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/novaclient/base.py", line 145, in _create
2013-07-29 04:38:05.059 13486 TRACE heat.engine.resource _resp, body = self.api.client.post(url, body=body)
2013-07-29 04:38:05.059 13486 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 233, in post
2013-07-29 04:38:05.059 13486 TRACE heat.engine.resource return self._cs_request(url, 'POST', **kwargs)
2013-07-29 04:38:05.059 13486 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 217, in _cs_request
2013-07-29 04:38:05.059 13486 TRACE heat.engine.resource **kwargs)
2013-07-29 04:38:05.059 13486 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 199, in _time_request
2013-07-29 04:38:05.059 13486 TRACE heat.engine.resource resp, body = self.request(url, method, **kwargs)
2013-07-29 04:38:05.059 13486 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 193, in request
2013-07-29 04:38:05.059 13486 TRACE heat.engine.resource raise exceptions.from_response(resp, body, url, method)
2013-07-29 04:38:05.059 13486 TRACE heat.engine.resource NotFound: FloatingIpPoolNotFound: Floating ip pool not found. (HTTP 404) (Request-ID: req-ad1c06c3-9bba-45ca-8770-6f4a170999ae)

Tags: floatingip
Revision history for this message
Xiang Hui (xianghui) wrote :

The root cause is found as follows:
  The Nova extension "/os-floating-ips", {'pool': pool}, "floating_ip") needs a floating-ip-pool to create a new floating ip, the value of parameter 'pool' default is None, but
  in https://github.com/openstack/heat/blob/master/heat/engine/resources/eip.py#L51 heat didn't pass a pool in, which cause this error.

It also can be proved by nova :
  [root@oc2603148815 cfn]# nova floating-ip-create
ERROR: FloatingIpPoolNotFound: Floating ip pool not found. (HTTP 404) (Request-ID: req-44f46601-5c82-4eba-be33-85224eee32e9)

   [root@oc2603148815 cfn]# nova floating-ip-pool-list
+---------+
| name |
+---------+
| ext_net |
+---------+
[root@oc2603148815 cfn]# nova floating-ip-create ext_net
+---------------+-------------+----------+---------+
| Ip | Instance Id | Fixed Ip | Pool |
+---------------+-------------+----------+---------+
| 192.168.12.13 | None | None | ext_net |
+---------------+-------------+----------+---------+

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/40162

Changed in heat:
assignee: nobody → Xiang Hui (xianghui)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/40162
Committed: http://github.com/openstack/heat/commit/0e1e4b697b96328bf8d8a42e0c4fc8fb074e2a63
Submitter: Jenkins
Branch: master

commit 0e1e4b697b96328bf8d8a42e0c4fc8fb074e2a63
Author: Hui HX Xiang <email address hidden>
Date: Sun Aug 4 22:30:32 2013 -0700

    Catch "FloatingIpPoolNotFound" in eip.py

    This patchset catch the "FloatingIpPoolNotFound" exception in eip
    of heat, the floatingippool cannot be configured by heat currently
    but it can be assigned by setting 'default_floating_pool' in
    nova.conf

    Fixes bug #1206865

    Change-Id: Idd0fd39f5470904dd351a39f66a57781d9f7c444

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: havana-3 → 2013.2
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.