[1.11-38] 'No more IP addresses available on network' Error seen on creating a router-interface, when allocation pool is specified without a gateway

Bug #1372384 reported by Ganesha HV
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R1.1
Fix Committed
High
Sachin Bansal
Trunk
Fix Committed
High
Sachin Bansal

Bug Description

1]. Created a net and a associated subnet, specifying a allocation pool:
root@nodea26:/opt/contrail/utils# neutron net-create vrrp-net
Created a new network:
+-------------------------+--------------------------------------+
| Field | Value |
+-------------------------+--------------------------------------+
| admin_state_up | True |
| contrail:fq_name | default-domain |
| | admin |
| | vrrp-net |
| contrail:instance_count | 0 |
| id | 57a746b5-835a-46b9-912f-59366fb2c00c |
| name | vrrp-net |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 5e8a0337d4fa4efaa41f5cdff84b2109 |
+-------------------------+--------------------------------------+
root@nodea26:/opt/contrail/utils# neutron subnet-create --name vrrp-subnet --allocation-pool start=10.0.0.2,end=10.0.0.200 vrrp-net 10.0.0.0/24
Created a new subnet:
+------------------+--------------------------------------------+
| Field | Value |
+------------------+--------------------------------------------+
| allocation_pools | {"start": "10.0.0.2", "end": "10.0.0.200"} |
| cidr | 10.0.0.0/24 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 10.0.0.1 |
| host_routes | |
| id | 180282ca-0df1-4a4a-8f25-580886a451bc |
| ip_version | 4 |
| name | vrrp-subnet |
| network_id | 57a746b5-835a-46b9-912f-59366fb2c00c |
| tenant_id | 5e8a0337d4fa4efaa41f5cdff84b2109 |
+------------------+--------------------------------------------+
2]. Created a router and tried to add a interface to it:
root@nodea26:/opt/contrail/utils# neutron router-create router1
Created a new router:
+-----------------------+--------------------------------------+
| Field | Value |
+-----------------------+--------------------------------------+
| admin_state_up | True |
| contrail:fq_name | default-domain |
| | admin |
| | router1 |
| external_gateway_info | |
| id | 94d24489-86d8-4a91-b40a-5683a39964a0 |
| name | router1 |
| status | ACTIVE |
| tenant_id | 5e8a0337d4fa4efaa41f5cdff84b2109 |
+-----------------------+--------------------------------------+
root@nodea26:/opt/contrail/utils# neutron router-interface-add router1 vrrp-subnet
409-{u'NeutronError': {u'message': u'No more IP addresses available on network 57a746b5-835a-46b9-912f-59366fb2c00c.', u'type': u'ContrailConflictError', u'detail': u''}}

3]. The same error is seen when we start the allocation pool from a different address other than .2 and a gateway is specified too:

root@nodea26:/opt/contrail/utils# neutron net-create hvg1
Created a new network:
+-------------------------+--------------------------------------+
| Field | Value |
+-------------------------+--------------------------------------+
| admin_state_up | True |
| contrail:fq_name | default-domain |
| | admin |
| | hvg1 |
| contrail:instance_count | 0 |
| id | 1f6390f9-034d-42b3-ab45-c3a5a2af1fef |
| name | hvg1 |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 5e8a0337d4fa4efaa41f5cdff84b2109 |
+-------------------------+--------------------------------------+
root@nodea26:/opt/contrail/utils# neutron subnet-create --name hvg1 --allocation-pool start=30.0.0.3,end=30.0.0.200 --gateway=30.0.0.1 hvg1 30.0.0.0/24
Created a new subnet:
+------------------+--------------------------------------------+
| Field | Value |
+------------------+--------------------------------------------+
| allocation_pools | {"start": "30.0.0.3", "end": "30.0.0.200"} |
| cidr | 30.0.0.0/24 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 30.0.0.1 |
| host_routes | |
| id | 962e2ed6-59b2-465d-9882-83c353415ed0 |
| ip_version | 4 |
| name | hvg1 |
| network_id | 1f6390f9-034d-42b3-ab45-c3a5a2af1fef |
| tenant_id | 5e8a0337d4fa4efaa41f5cdff84b2109 |
+------------------+--------------------------------------------+
root@nodea26:/opt/contrail/utils# neutron router-create router123
Created a new router:
+-----------------------+--------------------------------------+
| Field | Value |
+-----------------------+--------------------------------------+
| admin_state_up | True |
| contrail:fq_name | default-domain |
| | admin |
| | router123 |
| external_gateway_info | |
| id | b35ad36c-5c86-4469-91a8-26790023fa7f |
| name | router123 |
| status | ACTIVE |
| tenant_id | 5e8a0337d4fa4efaa41f5cdff84b2109 |
+-----------------------+--------------------------------------+
root@nodea26:/opt/contrail/utils# neutron router-interface-add router123 hvg1
409-{u'NeutronError': {u'message': u'No more IP addresses available on network 1f6390f9-034d-42b3-ab45-c3a5a2af1fef.', u'type': u'ContrailConflictError', u'detail': u''}}
root@nodea26:/opt/contrail/utils#

Shown to Prakash.

Tags: neutronapi
information type: Proprietary → Public
tags: added: neutronapi
removed: neutron
Revision history for this message
Sachin Bansal (sbansal) wrote :

Could you please confirm the behavior on stock devstack?

Revision history for this message
Vedamurthy Joshi (vedujoshi) wrote :

Sachin, why do we need to compare in this case? Gateway is always outside of allocation pool

Revision history for this message
Vedamurthy Joshi (vedujoshi) wrote :

Verified on openvswitch...it works as expected

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/3032
Committed: http://github.org/Juniper/contrail-controller/commit/aad6d3ed51f1c97fde9403f893b59011aacf4a85
Submitter: Zuul
Branch: master

commit aad6d3ed51f1c97fde9403f893b59011aacf4a85
Author: Sachin Bansal <email address hidden>
Date: Tue Sep 23 10:24:52 2014 -0700

Do not try to reserve the address if it is same as gateway ip. Gateway ip is already reserved at the time of subnet creation.

Change-Id: Id763db6d20620dd820443ffb619c0fb66c0b8190
Closes-Bug: 1372384

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/3033
Committed: http://github.org/Juniper/contrail-controller/commit/4fb15fc3a6eb2d140ba22bd5a5239501b1ae07cb
Submitter: Zuul
Branch: R1.10

commit 4fb15fc3a6eb2d140ba22bd5a5239501b1ae07cb
Author: Sachin Bansal <email address hidden>
Date: Tue Sep 23 10:24:52 2014 -0700

Do not try to reserve the address if it is same as gateway ip. Gateway ip is already reserved at the time of subnet creation.

Change-Id: Id763db6d20620dd820443ffb619c0fb66c0b8190
Closes-Bug: 1372384
(cherry picked from commit aad6d3ed51f1c97fde9403f893b59011aacf4a85)

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.