Not possible to change fixed-ips if port is on routed provider network
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Harald Jensås | ||
tripleo |
Fix Released
|
High
|
Unassigned |
Bug Description
For ports on normal networks (non-Routed Provider Networks) it is possible to change the fixed-ip of a port. When a port is on a Routed Provider Network the same operation return an error: "Invalid input for operation: IP allocation requires subnets for network." Since this is an unbound port, and the change does not move the port ip allocation to a subnet associated with a different segment this operation should succeed.
$ grep flat_networks /etc/neutron/
flat_networks = public,mynetwork
$ openstack network create \
--provider-
--provider-
mynetwork
$ openstack subnet create \
--network mynetwork \
--network-segment $(openstack network segment list --network mynetwork -f value -c ID) \
--subnet-range 192.168.254.0/24 \
--allocation-pool start=192.
mysubnet
$ openstack network show mynetwork -f value -c id && openstack subnet show mysubnet -f value -c id
57e622a0-
df2cbb56-
$ curl -s -X POST \
-H "X-Auth-Token: $(openstack token issue -f value -c id)" \
http://
-d '{"port": {"name": "test-port", "network_id": "57e622a0-
| python -m json.tool
{
"port": {
{
}
],
"dns_name": "",
{
}
],
"id": "84ef332d-
"name": "test-port",
],
"status": "DOWN",
"tags": [],
}
}
$ curl -s -X PUT \
-H "X-Auth-Token: $(openstack token issue -f value -c id)" \
http://
-d '{"port": {"fixed_ips": [{"ip_address": "192.168.
| python -m json.tool
{
"NeutronError": {
"detail": "",
"message": "Invalid input for operation: IP allocation requires subnets for network.",
"type": "InvalidInput"
}
}
Changed in tripleo: | |
importance: | Undecided → High |
status: | New → Triaged |
milestone: | none → train-3 |
Changed in neutron: | |
assignee: | nobody → Harald Jensås (harald-jensas) |
Changed in tripleo: | |
milestone: | train-3 → ussuri-1 |
Changed in neutron: | |
importance: | Undecided → Medium |
Changed in tripleo: | |
milestone: | ussuri-1 → ussuri-2 |
The heat template below can also be used to reproduce the issue:
# Create stack with:
#
# fixed_ips:
# [{subnet: mysubnet}]
#
# Update stack with:
#
# fixed_ips:
# [{'ip_address': '192.168.254.150'}]
# Result: reason: 'Resource UPDATE failed: BadRequest: resources.port: Invalid 18a11655- 8a9d-4111- 863f-7a9653555a 90'']'
# stack_status_
# input for operation: IP allocation requires subnets for network.
#
# Neutron server returns request_ids: [''req-
#
# Running the same operation on a non-Routed Provider Network succeeds.
# version: ocata
heat_template_
resources:
[{'ip_ address' : '192.168.254.150'}] nt_policy: AUTO
port:
type: OS::Neutron::Port
properties:
network: mynetwork
name: test-port
fixed_ips:
# [{subnet: mysubnet}]
replaceme