Add network to new dhcp agent cause the dhcp port status to be BUILD

Bug #1410067 reported by KaiLin on 2015-01-13
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
neutron
Medium
KaiLin

Bug Description

SYMPTOM:
1.neutron dhcp-agent-network-remove [dhcp agent of network Node1] [network]
2.neutron dhcp-agent-network-add [dhcp agent of network Node2] [network]
3.neutron port-show [dhcp-port]
Then the status of dhcp port change to BUILD, and this may cause some problem of the dhcp server and the metadata server .

CAUSE:
First I find the binding:host_id of dhcp port doesn't change to the new host_id after dhcp-agent-network-add.
Then I check the code, I find it the status of port change to BUILD in the devices_details_list = self.plugin_rpc.get_devices_details_list in ovs_neutron_agent.py.
And it should change the status of port to ACTIVE in update_device_up,but in the update_device_up we can see:
 if (host and not plugin.port_bound_to_host(rpc_context,
                                                   port_id, host)):
            LOG.debug(_("Device %(device)s not bound to the"
                        " agent host %(host)s"),
                      {'device': device, 'host': host})
            return
We can see this,it return directly because the port didn't bind to the new host, so cause the problem.

FIX:
I think we should update the binding:host_id of dhcp port to the new host.

KaiLin (linkai3) on 2015-01-13
Changed in neutron:
assignee: nobody → KaiLin (linkai3)
KaiLin (linkai3) on 2015-01-15
description: updated
KaiLin (linkai3) on 2015-01-16
tags: added: dhcp
tags: added: l3-ipam-dhcp
removed: dhcp
Changed in neutron:
importance: Undecided → Medium
status: New → Confirmed
Kahou Lei (kahou82) wrote :
Download full text (10.9 KiB)

I am not able to reproduce it on Liberty.

vagrant@controller:~/devstack$ neutron port-list
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
| id | name | mac_address | fixed_ips |
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
| 913f85c0-e341-471c-a251-348ac3f2321c | | fa:16:3e:e1:53:96 | {"subnet_id": "56a5d77a-c12d-4d5d-bc62-5365991343e4", "ip_address": "10.0.2.2"} |
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
vagrant@controller:~/devstack$ neutron port-show 913f85c0-e341-471c-a251-348ac3f2321c
+-----------------------+---------------------------------------------------------------------------------+
| Field | Value |
+-----------------------+---------------------------------------------------------------------------------+
| admin_state_up | True |
| allowed_address_pairs | |
| binding:host_id | controller |
| binding:profile | {} |
| binding:vif_details | {"port_filter": true} |
| binding:vif_type | bridge |
| binding:vnic_type | normal |
| device_id | dhcpd3377d3c-a0d1-5d71-9947-f17125c357bb-fcbaa8b8-eeb7-4319-8993-b8cff593b315 |
| device_owner | network:dhcp |
| extra_dhcp_opts | |
| fixed_ips | {"subnet_id": "56a5d77a-c12d-4d5d-bc62-5365991343e4", "ip_address": "10.0.2.2"} |
| id | 913f85c0-e341-471c-a251-348ac3f2321c |
| mac_address | fa:16:3e:e1:53:96 |
| name | |
| network_id | fcbaa8b8-eeb7-4319-8993-b8cff593b315 |
| security_groups | |
| status | ACTIVE |
| tenant_id | ac3914a6532f41be9197809e7a871ddc |
+--...

sean redmond (sean-redmond1) wrote :

I can replicate this on a Kilo build

Sam Morrison (sorrison) wrote :

Does anyone know the patch that fixes this in Liberty? Would like to backport to Kilo

Sam Morrison (sorrison) wrote :

Just checking in again on this. Would be great to backport this to Kilo

tags: added: kilo-backport-potential

This commit seems related. You won't probably need to backport the whole of it, but only the bits that update host bindings when a port is updated: http://git.openstack.org/cgit/openstack/neutron/commit/?id=9eed4167b63f0c0ad6c7ceeedc644e511c8dac75

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers