Create a port with ip address which is not the address pool in subnet

Bug #1538952 reported by zhanghaixia on 2016-01-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Undecided
Unassigned

Bug Description

version: 2015.1.2

step:
* create a port by the restapi
* {
      "port": {
        ......
        "fixed_ip": [
              {
                   "subnet_id": "***"
                   "ip_address": "***"
               }
        ]
  }

* create port is successful although the ip_address is not in the allocation pool

information type: Private Security → Public
linwei,wu (wlwwu) on 2016-01-28
Changed in neutron:
assignee: nobody → linwei,wu (wlwwu)
Changed in neutron:
status: New → Opinion
Cedric Brandily (cbrandily) wrote :

AFAIK, allocation-pools are used only when ip address allocation is delegated to neutron

Miguel Lavalle (minsel) wrote :

I just tried to replicate this error. I am using devstack built from master with Neutron. Here's my request:

Request

POST http://9.114.111.101:9696/v2.0/ports

    Accept: application/json
    Content-Type: application/json
    X-Auth-Token: 506e1e77dd6948e9ac8c7e16498acb3b

Body
{ "port": { "network_id": "38c5e950-b450-4c30-83d4-ee181c28aad3", "fixed_ips": [ { "subnet_id": "5b9282a1-0be1-4ade-b478-7868ad2a16ff", "ip_address": "10.0.1.10" } ], "admin_state_up": true } }

The subnet I am using is:

5b9282a1-0be1-4ade-b478-7868ad2a16ff | private-subnet | 10.0.0.0/24 | {"start": "10.0.0.2", "end": "10.0.0.254"}

And the response I get from the port POST is the expected one:

400 Bad Request

{
  "NeutronError": {
    "message": "IP address 10.0.1.10 is not a valid IP for the specified subnet.",
    "type": "InvalidIpForSubnet",
    "detail": ""
  }
}

Changed in neutron:
assignee: linwei,wu (wlwwu) → zhanghaixia (zhang-haixia)
summary: - Creat a port with ip address which is not the address pool in subnet
+ Creat a port with ip address which is not the address pool in subnet
Reedip (reedip-banerjee) on 2016-02-01
summary: - Creat a port with ip address which is not the address pool in subnet
+ Create a port with ip address which is not the address pool in subnet
Changed in neutron:
assignee: zhanghaixia (zhang-haixia) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers