Missing Ip range in security groups causes an error in Horizon

Bug #1207826 reported by Shweta P
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cisco Openstack
Fix Released
Medium
Mark T. Voelker
Grizzly
Fix Released
Medium
Mark T. Voelker

Bug Description

Creating security group rules via quantum without ip range causes a problem when accessed from horizon.

When trying to edit the security group rule from horizon, the page is not display.

The horizon trace shows the following error

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/horizon/tables/base.py", line 1324, in get_rows
    row = self._meta.row_class(self, datum)
  File "/usr/lib/python2.7/dist-packages/horizon/tables/base.py", line 426, in __init__
    self.load_cells()
  File "/usr/lib/python2.7/dist-packages/horizon/tables/base.py", line 463, in load_cells
    data = column.get_data(datum)
  File "/usr/lib/python2.7/dist-packages/horizon/tables/base.py", line 295, in get_data
    data = self.get_raw_data(datum)
  File "/usr/lib/python2.7/dist-packages/horizon/tables/base.py", line 265, in get_raw_data
    data = self.transform(datum)
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/access_and_security/security_groups/tables.py", line 97, in get_source
    return rule.ip_range['cidr'] + ' (CIDR)'
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
Error while rendering table rows.

Steps to reproduce:
Add the securtiy rules via quantumclient
quantum security-group-rule-create --protocol icmp --direction ingress default
quantum security-group-rule-create --protocol tcp --port-range-min 22 --port-range-max 22 --direction ingress

And try to edit the security from horizon

Pradeep has already identified the fix that is upstream

Shweta P (shweta-ap05)
Changed in openstack-cisco:
milestone: none → g.1
Revision history for this message
Mark T. Voelker (mvoelker) wrote :

This is fixed in the upstream grizzly/stable branch in:
https://github.com/openstack/horizon/commit/d804fc6f9e84b2726e437457354d18036e8ac836

Revision history for this message
Pradeep Kilambi (pkilambi) wrote :

The fix for this in upstream stable/grizzly

https://github.com/openstack/horizon/commit/d804fc6f9e84b2726e437457354d18036e8ac836

We just need to cherry pick this and we should be good.

Revision history for this message
Mark T. Voelker (mvoelker) wrote :

Ok, I pulled stable branch to get this fix. Packages should start building shortly.

Changed in openstack-cisco:
assignee: nobody → Mark T. Voelker (mvoelker)
status: New → In Progress
importance: Undecided → Medium
Revision history for this message
Mark T. Voelker (mvoelker) wrote :

New packages are built in grizzly-proposed, so I'll set this to fixed for now...Shweta/Pradeep, let me know if for some reason that doesn't fix the problem.

Changed in openstack-cisco:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.