← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1582583] Re: A exception occurs during starting neutron-dhcp-agent when a subnet is disabled dhcp

 

Reviewed:  https://review.openstack.org/319059
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=753f4ea70f9c491f608daff8dbf36c6627c9bba2
Submitter: Jenkins
Branch:    master

commit 753f4ea70f9c491f608daff8dbf36c6627c9bba2
Author: Hong Hui Xiao <honghui_xiao@xxxxxxxx>
Date:   Sat Aug 20 08:29:09 2016 -0400

    Not check subnet with dhcp disabled when get_isolated_subnets
    
    [1] will only return subnets with dhcp enabled for dhcp agent. If there
    is subnet with dhcp disabled in network, and the subnet is attached to
    router, exception can be observed as bug described.
    
    The fix here will just check the subnets that are in network in
    dhcp-agent, when call get_isolated_subnets.
    
    [1] http://git.openstack.org/cgit/openstack/neutron/tree/neutron/api/rpc/handlers/dhcp_rpc.py#n141
    
    Change-Id: I5e816c48d25efda9ea349210316c8f1ea5bdbcac
    Closes-bug: #1582583


** Changed in: neutron
       Status: In Progress => Fix Released

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

Title:
  A exception occurs during starting neutron-dhcp-agent when a subnet is
  disabled dhcp

Status in neutron:
  Fix Released

Bug description:
  neutron version: kilo

  Steps: 
  1. Disable dhcp for a subnet.
  2. Restart neutron-dhcp-agent
  3. A expection occurs due to the subnet is disabled dhcp.

  2016-05-17 06:19:29.530 4656 ERROR neutron.agent.dhcp.agent [-] u'0e1970ac-8525-4674-9ebd-31aa8796a79a'
  2016-05-17 06:19:29.530 4656 TRACE neutron.agent.dhcp.agent Traceback (most recent call last):
  2016-05-17 06:19:29.530 4656 TRACE neutron.agent.dhcp.agent   File "/opt/bbc/openstack-11.0-bbc148/neutron/local/lib/python2.7/site-packages/neutron/common/utils.py", line 343, in call
  2016-05-17 06:19:29.530 4656 TRACE neutron.agent.dhcp.agent     return func(*args, **kwargs)
  2016-05-17 06:19:29.530 4656 TRACE neutron.agent.dhcp.agent   File "/opt/bbc/openstack-11.0-bbc148/neutron/local/lib/python2.7/site-packages/neutron/agent/dhcp/agent.py", line 219, in safe_configure_dhcp_for_network
  2016-05-17 06:19:29.530 4656 TRACE neutron.agent.dhcp.agent     self.configure_dhcp_for_network(network)
  2016-05-17 06:19:29.530 4656 TRACE neutron.agent.dhcp.agent   File "/opt/bbc/openstack-11.0-bbc148/neutron/local/lib/python2.7/site-packages/neutron/agent/dhcp/agent.py", line 229, in configure_dhcp_for_network
  2016-05-17 06:19:29.530 4656 TRACE neutron.agent.dhcp.agent     self.conf, network)
  2016-05-17 06:19:29.530 4656 TRACE neutron.agent.dhcp.agent   File "/opt/bbc/openstack-11.0-bbc148/neutron/local/lib/python2.7/site-packages/neutron/agent/linux/dhcp.py", line 875, in should_enable_metadata
  2016-05-17 06:19:29.530 4656 TRACE neutron.agent.dhcp.agent     isolated_subnets = cls.get_isolated_subnets(network)
  2016-05-17 06:19:29.530 4656 TRACE neutron.agent.dhcp.agent   File "/opt/bbc/openstack-11.0-bbc148/neutron/local/lib/python2.7/site-packages/neutron/agent/linux/dhcp.py", line 846, in get_isolated_subnets
  2016-05-17 06:19:29.530 4656 TRACE neutron.agent.dhcp.agent     if subnets[alloc.subnet_id].gateway_ip == alloc.ip_address:
  2016-05-17 06:19:29.530 4656 TRACE neutron.agent.dhcp.agent KeyError: u'0e1970ac-8525-4674-9ebd-31aa8796a79a'
  2016-05-17 06:19:29.530 4656 TRACE neutron.agent.dhcp.agent
  2016-05-17 06:19:33.192 4656 INFO neutron.agent.dhcp.agent [req-81176fe9-0df5-4ff3-ad1f-96cfe27f7ba2 ] Synchronizing state complete

  (the subnet actually exists with id '0e1970ac-8525-4674-9ebd-
  31aa8796a79a')

  4. Then if enable dhcp for the subnet, the exception will disappear.

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


References