← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1372337] Re: KeyError in neutron server when L2 agent requests info for devices

 

** Changed in: neutron
       Status: Fix Committed => 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/1372337

Title:
  KeyError in neutron server when L2 agent requests info for devices

Status in OpenStack Neutron (virtual network service):
  Fix Released

Bug description:
  if L2 agent uses enhanced-security-group-rpc, in bellow case there will be a KeyError in neutron server:
  1. Create security group with IPv6 ingress rule but no IPv4 ingress rule.
    (or delete IPv4 ingress rule from default security group)
  2. Launch a VM on an IPv4 subnet, making it member of sec group created earlier

  Instance will not get its network info. Neutron server starts
  reporting following errors and sends them to agent on each request for
  devices info:

  2014-09-24 02:01:51.353 ERROR oslo.messaging.rpc.dispatcher [req-9b631b65-a753-4292-8442-98936a31db74 None None] Exception during message handling: 'IPv4'
  2014-09-24 02:01:51.353 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
  2014-09-24 02:01:51.353 TRACE oslo.messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply
  2014-09-24 02:01:51.353 TRACE oslo.messaging.rpc.dispatcher     incoming.message))
  2014-09-24 02:01:51.353 TRACE oslo.messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch
  2014-09-24 02:01:51.353 TRACE oslo.messaging.rpc.dispatcher     return self._do_dispatch(endpoint, method, ctxt, args)
  2014-09-24 02:01:51.353 TRACE oslo.messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch
  2014-09-24 02:01:51.353 TRACE oslo.messaging.rpc.dispatcher     result = getattr(endpoint, method)(ctxt, **new_args)
  2014-09-24 02:01:51.353 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/neutron/neutron/api/rpc/handlers/securitygroups_rpc.py", line 75, in security_group_info_for_devices
  2014-09-24 02:01:51.353 TRACE oslo.messaging.rpc.dispatcher     return self.plugin.security_group_info_for_ports(context, ports)
  2014-09-24 02:01:51.353 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/neutron/neutron/db/securitygroups_rpc_base.py", line 201, in security_group_info_for_ports
  2014-09-24 02:01:51.353 TRACE oslo.messaging.rpc.dispatcher     return self._get_security_group_member_ips(context, sg_info)
  2014-09-24 02:01:51.353 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/neutron/neutron/db/securitygroups_rpc_base.py", line 209, in _get_security_group_member_ips
  2014-09-24 02:01:51.353 TRACE oslo.messaging.rpc.dispatcher     if ip not in sg_info['sg_member_ips'][sg_id][ethertype]:
  2014-09-24 02:01:51.353 TRACE oslo.messaging.rpc.dispatcher KeyError: 'IPv4'
  2014-09-24 02:01:51.353 TRACE oslo.messaging.rpc.dispatcher
  2014-09-24 02:01:51.354 ERROR oslo.messaging._drivers.common [req-9b631b65-a753-4292-8442-98936a31db74 None None] Returning exception 'IPv4' to caller

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


References