port-create on a specific subnet in a VN is not working

Bug #1349970 reported by Vedamurthy Joshi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Fix Committed
Critical
Sachin Bansal

Bug Description

Build 1.10 2278

Below, i wanted to create a port in CIDR 114.180.155.0/24 of VN vn1-57322024 . But the port is always created on 111.141.59.0/24

REQ: curl -i http://10.204.217.69:9696/v2.0/ports.json -X POST -H "X-Auth-Token: <token>" -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-neutronclient" -d '{"port": {"network_id": "f3697b71-ee56-425a-92e9-ed9af09ac536", "fixed_ips": [{"subnet_id": "8daac0eb-d084-4083-a099-6904614b6ef1"}], "admin_state_up": true}}'

DEBUG: neutronclient.client RESP:{'date': 'Tue, 29 Jul 2014 17:36:25 GMT', 'status': '201', 'content-length': '586', 'content-type': 'application/json; charset=UTF-8'} {"port": {"status": "ACTIVE", "name": "faf8f8f3-4c7f-48db-8a8c-b8f1b40cd282", "admin_state_up": true, "network_id": "f3697b71-ee56-425a-92e9-ed9af09ac536", "tenant_id": "a427a668c0dc4b8bb0b0c9ccdc0073d3", "device_owner": "", "mac_address": "02:fa:f8:f8:f3:4c", "fixed_ips": [{"subnet_id": "2e6948a6-14fe-42de-8c31-ebfa19a223df", "port_id": "faf8f8f3-4c7f-48db-8a8c-b8f1b40cd282", "ip_address": "111.141.59.4", "net_id": "f3697b71-ee56-425a-92e9-ed9af09ac536"}], "id": "faf8f8f3-4c7f-48db-8a8c-b8f1b40cd282", "security_groups": ["8d29b9df-9512-4a85-af9b-e2898f40037e"], "device_id": ""}}

Created a new port:
+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| admin_state_up | True |
| device_id | |
| device_owner | |
| fixed_ips | {"subnet_id": "2e6948a6-14fe-42de-8c31-ebfa19a223df", "ip_address": "111.141.59.4", "port_id": "faf8f8f3-4c7f-48db-8a8c-b8f1b40cd282", "net_id": "f3697b71-ee56-425a-92e9-ed9af09ac536"} |
| id | faf8f8f3-4c7f-48db-8a8c-b8f1b40cd282 |
| mac_address | 02:fa:f8:f8:f3:4c |
| name | faf8f8f3-4c7f-48db-8a8c-b8f1b40cd282 |
| network_id | f3697b71-ee56-425a-92e9-ed9af09ac536 |
| security_groups | 8d29b9df-9512-4a85-af9b-e2898f40037e |
| status | ACTIVE |
| tenant_id | a427a668c0dc4b8bb0b0c9ccdc0073d3 |
-------------------------

root@nodec22:~# neutron subnet-list
+--------------------------------------+------+------------------+------------------------------------------------------+
| id | name | cidr | allocation_pools |
+--------------------------------------+------+------------------+------------------------------------------------------+
| cb02aaa2-2195-4d79-986a-14ab5e1b29f1 | | 93.229.47.0/24 | {"start": "93.229.47.2", "end": "93.229.47.254"} |
| 847b4328-ca37-454b-a261-f6d2d7d20199 | | 4.109.152.0/24 | {"start": "4.109.152.2", "end": "4.109.152.254"} |
| 8daac0eb-d084-4083-a099-6904614b6ef1 | | 114.180.155.0/24 | {"start": "114.180.155.2", "end": "114.180.155.254"} |
| 2e6948a6-14fe-42de-8c31-ebfa19a223df | | 111.141.59.0/24 | {"start": "111.141.59.2", "end": "111.141.59.254"} |
| 6f102533-796b-4656-940b-b8c1d06596c5 | | 1.1.1.0/24 | {"start": "1.1.1.2", "end": "1.1.1.254"} |
+--------------------------------------+------+------------------+------------------------------------------------------+
root@nodec22:~#

root@nodec22:~# neutron net-list
+--------------------------------------+-------------------------+-------------------------------------------------------+
| id | name | subnets |
+--------------------------------------+-------------------------+-------------------------------------------------------+
| 2dcc19d6-0e08-4466-b775-b6d457be8922 | net1 | 6f102533-796b-4656-940b-b8c1d06596c5 1.1.1.0/24 |
| b76be5aa-99f1-407b-9740-ed1ddf70c82c | vn1-65296399 | cb02aaa2-2195-4d79-986a-14ab5e1b29f1 93.229.47.0/24 |
| | | 847b4328-ca37-454b-a261-f6d2d7d20199 4.109.152.0/24 |
| b60e5b42-10e7-451f-82d6-3b5cf186377f | default-virtual-network | |
| 17dda2d9-86bf-4958-adc2-0705bae223f8 | __link_local__ | |
| f3697b71-ee56-425a-92e9-ed9af09ac536 | vn1-57322024 | 8daac0eb-d084-4083-a099-6904614b6ef1 114.180.155.0/24 |
| | | 2e6948a6-14fe-42de-8c31-ebfa19a223df 111.141.59.0/24 |
| f19e8563-b508-4b43-ad38-23a5902b45bb | ip-fabric | |
+--------------------------------------+-------------------------+-------------------------------------------------------+
root@nodec22:~#

tags: added: neutronapi
Raj Reddy (rajreddy)
Changed in juniperopenstack:
importance: High → Critical
Sachin Bansal (sbansal)
Changed in juniperopenstack:
assignee: Praneet Bachheti (praneetb) → Sachin Bansal (sbansal)
Sachin Bansal (sbansal)
Changed in juniperopenstack:
status: New → In Progress
Revision history for this message
Sachin Bansal (sbansal) wrote :
Changed in juniperopenstack:
status: In Progress → Fix Committed
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.