can't create neutron port fixed_ip if subnet associated with segment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Undecided
|
Harald Jensås | ||
neutron |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
There doesn't seem to be a way to create a fixed_ip for an OS::Neutron::Port if the subnet is associated with a Neutron segment.
For example, using this:
resources:
instance_port:
type: OS::Neutron::Port
properties:
network: ctlplane
fixed_ips: [{"subnet": ctlplane-subnet0, "ip_address": 10.8.146.8}]
my_ironic_
type: OS::Nova::Server
properties:
key_name: default
image: overcloud-full
flavor: baremetal
networks:
- network: ctlplane
port: {get_resource: instance_port}
If the subnet is NOT associated with a segment, I am able to create a stack with a Neutron port with 10.8.146.8 as expected.
However, in this case the subnet is associated with a neutron segment:
[stack@host01 ~]$ neutron subnet-show ctlplane-subnet0
+------
| Field | Value |
+------
| allocation_pools | {"start": "10.8.146.5", "end": "10.8.146.20"} |
| cidr | 10.8.146.0/24 |
| created_at | 2017-05-
| description | |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 10.8.146.1 |
| host_routes | {"destination": "169.254.
| id | 2510cb92-
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | ctlplane-subnet0 |
| network_id | 5f93540c-
| project_id | 08b43a05b88c4d4
| revision_number | 2 |
| segment_id | d5b2dc5d-
| service_types | |
| subnetpool_id | |
| tags | |
| tenant_id | 08b43a05b88c4d4
| updated_at | 2017-05-
+------
[stack@host01 ~]$ openstack network segment show d5b2dc5d-
+------
| Field | Value |
+------
| description | None |
| id | d5b2dc5d-
| name | subnet0 |
| network_id | 5f93540c-
| network_type | flat |
| physical_network | ctlplane |
| segmentation_id | None |
+------
The stack is created successfuly, however the neutron port has a fixed_ip from the allocation_pool (10.8.146.15, see below) not the defined fixed_ip in the template.
[stack@host01 ~]$ heat stack-list
+------
| id | stack_name | stack_status | creation_time | updated_time |
+------
| ed4e655b-
+------
[stack@host01 ~]$ neutron port-show da1787b8-
+------
| Field | Value |
+------
| admin_state_up | True |
| allowed_
| binding:host_id | host01.
| binding:profile | {} |
| binding:vif_details | {"port_filter": true, "ovs_hybrid_plug": true} |
| binding:vif_type | ovs |
| binding:vnic_type | normal |
| created_at | 2017-05-
| description | |
| device_id | 3aad41e0-
| device_owner | compute:None |
| extra_dhcp_opts | {"opt_value": "http://
| | "tag:ipxe,
| | {"opt_value": "10.8.146.1", "ip_version": 4, "opt_name": "tftp-server"} |
| | {"opt_value": "undionly.kpxe", "ip_version": 4, "opt_name": "tag:!ipxe |
| | ,bootfile-name"} |
| | {"opt_value": "10.8.146.1", "ip_version": 4, "opt_name": "server-
| fixed_ips | {"subnet_id": "2510cb92-
| | "10.8.146.15"} |
| id | da1787b8-
| ip_allocation | deferred |
| mac_address | b0:83:fe:c6:53:21 |
| name | test-stack-
| network_id | 5f93540c-
| project_id | 08b43a05b88c4d4
| revision_number | 12 |
| security_groups | f862fbd3-
| status | DOWN |
| tags | |
| tenant_id | 08b43a05b88c4d4
| updated_at | 2017-05-
+------
In heat/engine/
Can you create port with the subnet with the desired fixed_ip without heat? Looks like a neutron issue rather than heat one. AFAIK, neutron segment support does not allow specifying segment for a port yet.