← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1546462] [NEW] can not reload dnsmasq after update dhcp port

 

Public bug reported:

after create_dhcp_port [1], the port would not be put into cache ,  so
if we update the dhcp port [2], there would be a NoneType error.  as
showed below:

2016-02-17 18:10:53.121 60074 ERROR oslo_messaging.rpc.dispatcher [req-0e99287a-7a91-46e2-9c36-d8ecb096de58 ] Exception during message handling: 'NoneType' object has no attribute '__getitem__'
2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher     executor_callback))
2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher     executor_callback)
2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch
2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher     result = func(ctxt, **new_args)
2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 445, in inner
2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher     return f(*args, **kwargs)
2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/neutron/agent/dhcp/agent.py", line 331, in port_update_end
2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher     old_ips = {i['ip_address'] for i in orig['fixed_ips'] or []}
2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher TypeError: 'NoneType' object has no attribute '__getitem__'
2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher


[1] https://github.com/openstack/neutron/blob/master/neutron/agent/dhcp/agent.py#L449
[2] https://github.com/openstack/neutron/blob/master/neutron/agent/dhcp/agent.py#L332

in neutron.conf:
dhcp_agents_per_network = 1
 
the bug can be reproduce as below steps:
1. create network1
2. create subnet1(10.0.0.0/24), enable dhcp, then would create a dhcp port such as 10.0.0.2, 
3. delete the dhcp port 10.0.0.2
4. delete the dhcp agent such as DhcpAgent1
5. re-added network1 to the dhcp agent1, then would be a new port 10.0.0.3
6. update the new port from 10.0.0.3 to 10.0.0.2
then there would be an error..

** Affects: neutron
     Importance: Undecided
     Assignee: magic0704 (wbaoping0704)
         Status: New

** Changed in: neutron
     Assignee: (unassigned) => magic0704 (wbaoping0704)

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

Title:
  can not reload dnsmasq after update dhcp port

Status in neutron:
  New

Bug description:
  after create_dhcp_port [1], the port would not be put into cache ,  so
  if we update the dhcp port [2], there would be a NoneType error.  as
  showed below:

  2016-02-17 18:10:53.121 60074 ERROR oslo_messaging.rpc.dispatcher [req-0e99287a-7a91-46e2-9c36-d8ecb096de58 ] Exception during message handling: 'NoneType' object has no attribute '__getitem__'
  2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
  2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
  2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher     executor_callback))
  2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
  2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher     executor_callback)
  2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch
  2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher     result = func(ctxt, **new_args)
  2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 445, in inner
  2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher     return f(*args, **kwargs)
  2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/neutron/agent/dhcp/agent.py", line 331, in port_update_end
  2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher     old_ips = {i['ip_address'] for i in orig['fixed_ips'] or []}
  2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher TypeError: 'NoneType' object has no attribute '__getitem__'
  2016-02-17 18:10:53.121 60074 TRACE oslo_messaging.rpc.dispatcher

  
  [1] https://github.com/openstack/neutron/blob/master/neutron/agent/dhcp/agent.py#L449
  [2] https://github.com/openstack/neutron/blob/master/neutron/agent/dhcp/agent.py#L332

  in neutron.conf:
  dhcp_agents_per_network = 1
   
  the bug can be reproduce as below steps:
  1. create network1
  2. create subnet1(10.0.0.0/24), enable dhcp, then would create a dhcp port such as 10.0.0.2, 
  3. delete the dhcp port 10.0.0.2
  4. delete the dhcp agent such as DhcpAgent1
  5. re-added network1 to the dhcp agent1, then would be a new port 10.0.0.3
  6. update the new port from 10.0.0.3 to 10.0.0.2
  then there would be an error..

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


Follow ups