Code logic inconsistency in quantum.db.securitygroups_db.py:SecurityGroupDbMixin._ensure_default_security_group
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Confirmed
|
Low
|
Abishek Subramanian |
Bug Description
def _ensure_
"""Create a default security group if one doesn't exist.
:returns: the default security group id.
"""
# if in proxy mode a default security group will be created by source
if not security_group and cfg.CONF.
return
filters = {'name': ['default'], 'tenant_id': [tenant_id]}
if not default_group:
>>> >>>>
"if security_group:" never can be False. Because it security_group overlap by previous line.
And as the check, in the begin of this function:
# if in proxy mode a default security group will be created by source
if not security_group and cfg.CONF.
return
We needn't assign 'external_id' at here. Also need reference code at securitygroups_
<<<<<<<
if security_group:
ret = self.create_
return ret['id']
else:
return default_
summary: |
Code logic inconsistency in - quantum.db.securitygroups_db.py:_ensure_default_security_group + quantum.db.securitygroups_db.py:SecurityGroupDbMixin._ensure_default_security_group |
description: | updated |
Changed in quantum: | |
status: | New → Triaged |
importance: | Undecided → Medium |
tags: | added: sg-fw |
Changed in quantum: | |
assignee: | nobody → Abishek Subramanian (absubram) |
Changed in quantum: | |
importance: | Medium → Low |
Changed in quantum: | |
status: | Invalid → Confirmed |
This has already been fixed by Aaron Rosen via commit for bug 1130927.
Please close this out.