Deferred IP allocation, port update with binding_host_id + set new mac address fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
High
|
Harald Jensås |
Bug Description
On a routed provider network IP allocation will be deffered if insufficent binding information is available.
When a port is updated with binding_host_id only this works as expected:
-------
$ openstack port create --network ctlplane testport -f yaml
admin_state_up: UP
allowed_
binding_host_id: ''
binding_profile: ''
binding_
binding_vif_type: unbound
binding_vnic_type: normal
created_at: '2019-01-
data_plane_status: null
description: ''
device_id: ''
device_owner: ''
dns_assignment: null
dns_domain: null
dns_name: null
extra_dhcp_opts: ''
fixed_ips: ''
id: 9e05e8fe-
mac_address: fa:16:3e:31:de:01
name: testport
network_id: 1f731773-
port_security_
project_id: 9d8aea1921f0420
qos_policy_id: null
revision_number: 1
security_group_ids: 2354cbbe-
status: DOWN
tags: ''
trunk_details: null
updated_at: '2019-01-
$ openstack port set --host 05a94a66-
$ openstack port show testport -f yaml
admin_state_up: UP
allowed_
binding_host_id: 05a94a66-
binding_profile: ''
binding_
binding_vif_type: binding_failed
binding_vnic_type: normal
created_at: '2019-01-
data_plane_status: null
description: ''
device_id: ''
device_owner: ''
dns_assignment: null
dns_domain: null
dns_name: null
extra_dhcp_opts: ''
fixed_ips: ip_address=
id: 9e05e8fe-
mac_address: fa:16:3e:31:de:01
name: testport
network_id: 1f731773-
port_security_
project_id: 9d8aea1921f0420
qos_policy_id: null
revision_number: 3
security_group_ids: 2354cbbe-
status: DOWN
tags: ''
trunk_details: null
updated_at: '2019-01-
2019-01-16 01:13:58.064 38 DEBUG neutron.api.v2.base [req-3baa886c-
u'05a94a66-
2019-01-16 01:13:58.310 38 DEBUG neutron.
773-6dcf-
When a port update request contain both binding_host_id and a new mac address,
IP allocation does not happen:
-------
$ openstack port create --network ctlplane testport -f yaml
admin_state_up: UP
allowed_
binding_host_id: ''
binding_profile: ''
binding_
binding_vif_type: unbound
binding_vnic_type: normal
created_at: '2019-01-
data_plane_status: null
description: ''
device_id: ''
device_owner: ''
dns_assignment: null
dns_domain: null
dns_name: null
extra_dhcp_opts: ''
fixed_ips: ''
id: 3c6ecca2-
mac_address: fa:16:3e:aa:f4:46
name: testport
network_id: 1f731773-
port_security_
project_id: 9d8aea1921f0420
qos_policy_id: null
revision_number: 1
security_group_ids: 2354cbbe-
status: DOWN
tags: ''
trunk_details: null
updated_at: '2019-01-
$ openstack port set --host 05a94a66-
$ openstack port show testport -f yaml
admin_state_up: UP
allowed_
binding_host_id: 05a94a66-
binding_profile: ''
binding_
binding_vif_type: binding_failed
binding_vnic_type: normal
created_at: '2019-01-
data_plane_status: null
description: ''
device_id: ''
device_owner: ''
dns_assignment: null
dns_domain: null
dns_name: null
extra_dhcp_opts: ''
fixed_ips: ''
id: 3c6ecca2-
mac_address: 52:54:00:76:4f:56
name: testport
network_id: 1f731773-
port_security_
project_id: 9d8aea1921f0420
qos_policy_id: null
revision_number: 3
security_group_ids: 2354cbbe-
status: DOWN
tags: ''
trunk_details: null
updated_at: '2019-01-
2019-01-16 01:15:45.684 39 DEBUG neutron.api.v2.base [req-8373dd06-
u'05a94a66-
summary: |
- Deffered IP allocation, port update with binding_host_id + set new mac + Deferred IP allocation, port update with binding_host_id + set new mac address fails |
Changed in neutron: | |
importance: | Undecided → High |
tags: | added: queens-backport-potential |
tags: | added: pike-backport-potential |
tags: | added: neutron-proactive-backport-potential |
Some additional debug logging: ------- ------- ------- --
-------
--- Port update with binding_host_id only:
2019-01-16 02:04:36.755 39 DEBUG neutron. db.ipam_ backend_ mixin [req-7c09a78b- e6b7-4592- 9bb1-9d0cb513e3 67 944d2af27c0e4e4 1bc8203acf9b4e6 fb 9d8aea1921f0420 7b35a9e1fc4923a e1 - default default] HARALD - fixed_ips_requested False update_port /usr/lib/ python2. 7/site- packages/ neutron/ db/ipam_ backend_ mixin.py: 658 db.ipam_ backend_ mixin [req-7c09a78b- e6b7-4592- 9bb1-9d0cb513e3 67 944d2af27c0e4e4 1bc8203acf9b4e6 fb 9d8aea1921f0420 7b35a9e1fc4923a e1 - default default] HARALD - new_port {u'binding: host_id' : u'05a94a66- 27ca-4642- ad62-8f53827055 c7'} update_port /usr/lib/ python2. 7/site- packages/ neutron/ db/ipam_ backend_ mixin.py: 659
2019-01-16 02:04:36.755 39 DEBUG neutron.
--- Port update with binding_host_id and mac_address:
2019-01-16 02:06:23.887 39 DEBUG neutron. db.ipam_ backend_ mixin [req-ab23fb97- 2f15-4836- ba3d-e31f4357d1 e5 944d2af27c0e4e4 1bc8203acf9b4e6 fb 9d8aea1921f0420 7b35a9e1fc4923a e1 - default default] HARALD - fixed_ips_requested True update_port /usr/lib/ python2. 7/site- packages/ neutron/ db/ipam_ backend_ mixin.py: 658 db.ipam_ backend_ mixin [req-ab23fb97- 2f15-4836- ba3d-e31f4357d1 e5 944d2af27c0e4e4 1bc8203acf9b4e6 fb 9d8aea1921f0420 7b35a9e1fc4923a e1 - default default] HARALD - new_port {'fixed_ips': [], u'binding:host_id': u'05a94a66- 27ca-4642- ad62-8f53827055 c7', u'mac_address': u'52:54: 00:76:4f: 56'} update_port /usr/lib/ python2. 7/site- packages/ neutron/ db/ipam_ backend_ mixin.py: 659
2019-01-16 02:06:23.888 39 DEBUG neutron.
For some reason 'fixed_ips': [] is added to the new_port data when updating be MAC address.