yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #19974
[Bug 1354343] Re: parameter passed to SecurityGroupRuleExists doesn't match expect
** Changed in: neutron
Status: Fix Committed => Fix Released
** Changed in: neutron
Milestone: None => juno-3
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1354343
Title:
parameter passed to SecurityGroupRuleExists doesn't match expect
Status in OpenStack Neutron (virtual network service):
Fix Released
Bug description:
When we use db.securitygroups_db.SecurityGroupDbMixin._check_for_duplicate_rules() to check whether a
security group rule exists, exception SecurityGroupRuleExists will be raised if true, but the id we passed is
security rule id, which SecurityGroupRuleExists expect is a security group id.
I think this is the exception's fault, if this is confirmed, I'll fix
the exception ASAP.
def _check_for_duplicate_rules(self, context, security_group_rules):
...
filters = self._make_security_group_rule_filter_dict(i)
db_rules = self.get_security_group_rules(context, filters)
...
for db_rule in db_rules:
# need to remove id from db_rule for matching
id = db_rule.pop('id')
if (i['security_group_rule'] == db_rule):
raise ext_sg.SecurityGroupRuleExists(id=id)
class SecurityGroupRuleExists(qexception.InUse):
message = _("Security group rule already exists. Group id is %(id)s.")
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1354343/+subscriptions
References