← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1811905] [NEW] Deffered IP allocation, port update with binding_host_id + set new mac address fails

 

Public bug reported:

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_address_pairs: ''
binding_host_id: ''
binding_profile: ''
binding_vif_details: ''
binding_vif_type: unbound
binding_vnic_type: normal
created_at: '2019-01-16T00:13:19Z'
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-c11a-4682-ba69-2a402094758d
mac_address: fa:16:3e:31:de:01
name: testport
network_id: 1f731773-6dcf-45ce-aa11-aaf205f2faf6
port_security_enabled: true
project_id: 9d8aea1921f04207b35a9e1fc4923ae1
qos_policy_id: null
revision_number: 1
security_group_ids: 2354cbbe-5726-42ef-8b45-e642cb9bf2ea
status: DOWN
tags: ''
trunk_details: null
updated_at: '2019-01-16T00:13:19Z'

$ openstack port set --host 05a94a66-27ca-4642-ad62-8f53827055c7
testport

$ openstack port show testport -f yaml
admin_state_up: UP
allowed_address_pairs: ''
binding_host_id: 05a94a66-27ca-4642-ad62-8f53827055c7
binding_profile: ''
binding_vif_details: ''
binding_vif_type: binding_failed
binding_vnic_type: normal
created_at: '2019-01-16T00:13:19Z'
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='172.20.0.11', subnet_id='61745187-973c-4515-a025-c719776bbf44'
id: 9e05e8fe-c11a-4682-ba69-2a402094758d
mac_address: fa:16:3e:31:de:01
name: testport
network_id: 1f731773-6dcf-45ce-aa11-aaf205f2faf6
port_security_enabled: true
project_id: 9d8aea1921f04207b35a9e1fc4923ae1
qos_policy_id: null
revision_number: 3
security_group_ids: 2354cbbe-5726-42ef-8b45-e642cb9bf2ea
status: DOWN
tags: ''
trunk_details: null
updated_at: '2019-01-16T00:13:58Z'


2019-01-16 01:13:58.064 38 DEBUG neutron.api.v2.base [req-3baa886c-f409-4a2f-82b4-a46055e6653b 944d2af27c0e4e41bc8203acf9b4e6fb 9d8aea1921f04207b35a9e1fc4923ae1 - default default] Request body: {u'port': {u'binding:host_id':
 u'05a94a66-27ca-4642-ad62-8f53827055c7'}} prepare_request_body /usr/lib/python2.7/site-packages/neutron/api/v2/base.py:715

2019-01-16 01:13:58.310 38 DEBUG neutron.db.db_base_plugin_common [req-3baa886c-f409-4a2f-82b4-a46055e6653b 944d2af27c0e4e41bc8203acf9b4e6fb 9d8aea1921f04207b35a9e1fc4923ae1 - default default] Allocated IP 172.20.0.11 (1f731
773-6dcf-45ce-aa11-aaf205f2faf6/61745187-973c-4515-a025-c719776bbf44/9e05e8fe-c11a-4682-ba69-2a402094758d) _store_ip_allocation /usr/lib/python2.7/site-packages/neutron/db/db_base_plugin_common.py:124


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_address_pairs: ''
binding_host_id: ''
binding_profile: ''
binding_vif_details: ''
binding_vif_type: unbound
binding_vnic_type: normal
created_at: '2019-01-16T00:15:35Z'
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-3f77-4528-86c2-66971c89ef2e
mac_address: fa:16:3e:aa:f4:46
name: testport
network_id: 1f731773-6dcf-45ce-aa11-aaf205f2faf6
port_security_enabled: true
project_id: 9d8aea1921f04207b35a9e1fc4923ae1
qos_policy_id: null
revision_number: 1
security_group_ids: 2354cbbe-5726-42ef-8b45-e642cb9bf2ea
status: DOWN
tags: ''
trunk_details: null
updated_at: '2019-01-16T00:15:35Z'

$ openstack port set --host 05a94a66-27ca-4642-ad62-8f53827055c7 --mac-
address 52:54:00:76:4f:56 testport

$ openstack port show testport -f yaml
admin_state_up: UP
allowed_address_pairs: ''
binding_host_id: 05a94a66-27ca-4642-ad62-8f53827055c7
binding_profile: ''
binding_vif_details: ''
binding_vif_type: binding_failed
binding_vnic_type: normal
created_at: '2019-01-16T00:15:35Z'
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-3f77-4528-86c2-66971c89ef2e
mac_address: 52:54:00:76:4f:56
name: testport
network_id: 1f731773-6dcf-45ce-aa11-aaf205f2faf6
port_security_enabled: true
project_id: 9d8aea1921f04207b35a9e1fc4923ae1
qos_policy_id: null
revision_number: 3
security_group_ids: 2354cbbe-5726-42ef-8b45-e642cb9bf2ea
status: DOWN
tags: ''
trunk_details: null
updated_at: '2019-01-16T00:15:46Z'


2019-01-16 01:15:45.684 39 DEBUG neutron.api.v2.base [req-8373dd06-d3fe-4fdc-841e-3850ec6eb374 944d2af27c0e4e41bc8203acf9b4e6fb 9d8aea1921f04207b35a9e1fc4923ae1 - default default] Request body: {u'port': {u'binding:host_id':
 u'05a94a66-27ca-4642-ad62-8f53827055c7', u'mac_address': u'52:54:00:76:4f:56'}} prepare_request_body /usr/lib/python2.7/site-packages/neutron/api/v2/base.py:715

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1811905

Title:
  Deffered IP allocation, port update with binding_host_id + set new mac
  address fails

Status in neutron:
  New

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_address_pairs: ''
  binding_host_id: ''
  binding_profile: ''
  binding_vif_details: ''
  binding_vif_type: unbound
  binding_vnic_type: normal
  created_at: '2019-01-16T00:13:19Z'
  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-c11a-4682-ba69-2a402094758d
  mac_address: fa:16:3e:31:de:01
  name: testport
  network_id: 1f731773-6dcf-45ce-aa11-aaf205f2faf6
  port_security_enabled: true
  project_id: 9d8aea1921f04207b35a9e1fc4923ae1
  qos_policy_id: null
  revision_number: 1
  security_group_ids: 2354cbbe-5726-42ef-8b45-e642cb9bf2ea
  status: DOWN
  tags: ''
  trunk_details: null
  updated_at: '2019-01-16T00:13:19Z'

  $ openstack port set --host 05a94a66-27ca-4642-ad62-8f53827055c7
  testport

  $ openstack port show testport -f yaml
  admin_state_up: UP
  allowed_address_pairs: ''
  binding_host_id: 05a94a66-27ca-4642-ad62-8f53827055c7
  binding_profile: ''
  binding_vif_details: ''
  binding_vif_type: binding_failed
  binding_vnic_type: normal
  created_at: '2019-01-16T00:13:19Z'
  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='172.20.0.11', subnet_id='61745187-973c-4515-a025-c719776bbf44'
  id: 9e05e8fe-c11a-4682-ba69-2a402094758d
  mac_address: fa:16:3e:31:de:01
  name: testport
  network_id: 1f731773-6dcf-45ce-aa11-aaf205f2faf6
  port_security_enabled: true
  project_id: 9d8aea1921f04207b35a9e1fc4923ae1
  qos_policy_id: null
  revision_number: 3
  security_group_ids: 2354cbbe-5726-42ef-8b45-e642cb9bf2ea
  status: DOWN
  tags: ''
  trunk_details: null
  updated_at: '2019-01-16T00:13:58Z'


  
  2019-01-16 01:13:58.064 38 DEBUG neutron.api.v2.base [req-3baa886c-f409-4a2f-82b4-a46055e6653b 944d2af27c0e4e41bc8203acf9b4e6fb 9d8aea1921f04207b35a9e1fc4923ae1 - default default] Request body: {u'port': {u'binding:host_id':
   u'05a94a66-27ca-4642-ad62-8f53827055c7'}} prepare_request_body /usr/lib/python2.7/site-packages/neutron/api/v2/base.py:715

  2019-01-16 01:13:58.310 38 DEBUG neutron.db.db_base_plugin_common [req-3baa886c-f409-4a2f-82b4-a46055e6653b 944d2af27c0e4e41bc8203acf9b4e6fb 9d8aea1921f04207b35a9e1fc4923ae1 - default default] Allocated IP 172.20.0.11 (1f731
  773-6dcf-45ce-aa11-aaf205f2faf6/61745187-973c-4515-a025-c719776bbf44/9e05e8fe-c11a-4682-ba69-2a402094758d) _store_ip_allocation /usr/lib/python2.7/site-packages/neutron/db/db_base_plugin_common.py:124



  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_address_pairs: ''
  binding_host_id: ''
  binding_profile: ''
  binding_vif_details: ''
  binding_vif_type: unbound
  binding_vnic_type: normal
  created_at: '2019-01-16T00:15:35Z'
  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-3f77-4528-86c2-66971c89ef2e
  mac_address: fa:16:3e:aa:f4:46
  name: testport
  network_id: 1f731773-6dcf-45ce-aa11-aaf205f2faf6
  port_security_enabled: true
  project_id: 9d8aea1921f04207b35a9e1fc4923ae1
  qos_policy_id: null
  revision_number: 1
  security_group_ids: 2354cbbe-5726-42ef-8b45-e642cb9bf2ea
  status: DOWN
  tags: ''
  trunk_details: null
  updated_at: '2019-01-16T00:15:35Z'

  $ openstack port set --host 05a94a66-27ca-4642-ad62-8f53827055c7
  --mac-address 52:54:00:76:4f:56 testport

  $ openstack port show testport -f yaml
  admin_state_up: UP
  allowed_address_pairs: ''
  binding_host_id: 05a94a66-27ca-4642-ad62-8f53827055c7
  binding_profile: ''
  binding_vif_details: ''
  binding_vif_type: binding_failed
  binding_vnic_type: normal
  created_at: '2019-01-16T00:15:35Z'
  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-3f77-4528-86c2-66971c89ef2e
  mac_address: 52:54:00:76:4f:56
  name: testport
  network_id: 1f731773-6dcf-45ce-aa11-aaf205f2faf6
  port_security_enabled: true
  project_id: 9d8aea1921f04207b35a9e1fc4923ae1
  qos_policy_id: null
  revision_number: 3
  security_group_ids: 2354cbbe-5726-42ef-8b45-e642cb9bf2ea
  status: DOWN
  tags: ''
  trunk_details: null
  updated_at: '2019-01-16T00:15:46Z'

  
  2019-01-16 01:15:45.684 39 DEBUG neutron.api.v2.base [req-8373dd06-d3fe-4fdc-841e-3850ec6eb374 944d2af27c0e4e41bc8203acf9b4e6fb 9d8aea1921f04207b35a9e1fc4923ae1 - default default] Request body: {u'port': {u'binding:host_id':
   u'05a94a66-27ca-4642-ad62-8f53827055c7', u'mac_address': u'52:54:00:76:4f:56'}} prepare_request_body /usr/lib/python2.7/site-packages/neutron/api/v2/base.py:715

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1811905/+subscriptions


Follow ups