← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1420042] Re: DHCP port is changed when dhcp-agent restart

 

** Also affects: neutron/kilo
   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/1420042

Title:
  DHCP port is changed when dhcp-agent restart

Status in neutron:
  Fix Released
Status in neutron kilo series:
  New

Bug description:
  When dhcp-agent is restarted dhcp port may change.  Obviously it
  causes problems since VMs don't notice this, old port may be reused,
  etc.

  It is easy to reproduce.

  before dhcp-agent restart)
  $ neutron port-list --device_owner network:dhcp
  +--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
  | id                                   | name | mac_address       | fixed_ips                                                                       |
  +--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
  | b72f0eb1-c1d1-4f36-a563-b4b9b5ccf562 |      | fa:16:3e:f7:c3:c5 | {"subnet_id": "9071fca2-c87e-4bd5-a2c6-89c54883acac", "ip_address": "10.0.0.2"} |
  +--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+

  1) stop dhcp-agent
  2) create port (ex. $ neutron port-create private)
  3) start dhcp-agent

  after)
  $ neutron port-list --device_owner network:dhcp
  +--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
  | id                                   | name | mac_address       | fixed_ips                                                                       |
  +--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+
  | 78653fa6-e153-41ab-b451-b40da6060415 |      | fa:16:3e:b8:b6:d3 | {"subnet_id": "9071fca2-c87e-4bd5-a2c6-89c54883acac", "ip_address": "10.0.0.4"} |
  +--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+

  It occurs as follows:
  1) network cache is initialized from state file with 'subnet empty'(!).
    (_populate_networks_cache())
  2) pending port-create-end RPC event is handled 'before the first sync_state'(!).
  3) reload_allocations called and do 'disable' because subnet is empty.
    then release_dhcp_port RPC is issued and previous dhcp port is deleted.
  4) new dhcp port is created when the first sync_state is executed. 
  note that network cache become normal at the first sync_state.

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


References