yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #49050
[Bug 1566327] Re: Creating a security group rule with no protocol fails with KeyError
Reviewed: https://review.openstack.org/301749
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=5a41caa47a080fdbc1801e2771163734b9790c57
Submitter: Jenkins
Branch: master
commit 5a41caa47a080fdbc1801e2771163734b9790c57
Author: Ihar Hrachyshka <ihrachys@xxxxxxxxxx>
Date: Tue Apr 5 16:56:16 2016 +0200
Don't drop 'protocol' from client supplied security_group_rule dict
If protocol was present in the dict, but was None, then it was never
re-instantiated after being popped out of the dict. This later resulted
in KeyError when trying to access the key on the dict.
Change-Id: I4985e7b54117bee3241d7365cb438197a09b9b86
Closes-Bug: #1566327
** 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/1566327
Title:
Creating a security group rule with no protocol fails with KeyError
Status in neutron:
Fix Released
Bug description:
neutron security-group-rule-create --direction ingress default
results in:
2016-04-05 15:50:56.772 ERROR neutron.api.v2.resource [req-67736b7a-6a4c-442c-9536-890ccf5c8d19 admin 3dc1eb0373d34ba9b2edfb41ee98149c] create failed
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource Traceback (most recent call last):
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/resource.py", line 84, in resource
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource result = method(request=request, **args)
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/base.py", line 410, in create
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource return self._create(request, body, **kwargs)
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 148, in wrapper
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource ectxt.value = e.inner_exc
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource self.force_reraise()
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 138, in wrapper
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource return f(*args, **kwargs)
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/base.py", line 521, in _create
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource obj = do_create(body)
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/base.py", line 503, in do_create
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource request.context, reservation.reservation_id)
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource self.force_reraise()
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/base.py", line 496, in do_create
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource return obj_creator(request.context, **kwargs)
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/securitygroups_rpc_base.py", line 74, in create_security_group_rule
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource security_group_rule)
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/securitygroups_db.py", line 374, in create_security_group_rule
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource return self._create_security_group_rule(context, security_group_rule)
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/securitygroups_db.py", line 399, in _create_security_group_rule
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource protocol=rule_dict['protocol'],
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource KeyError: 'protocol'
2016-04-05 15:50:56.772 TRACE neutron.api.v2.resource
This is a regression, since it was working before.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1566327/+subscriptions
References