rate limits builder uses incorrect key

Bug #787023 reported by Alex Meade
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Alex Meade

Bug Description

The view buider in limits.py has a mistype:

for limit in limits:
                if limit["uri"] == rate_limit["URI"] and \
                   limit["regex"] == limit["regex"]: <--------mistype
                    _rate_limit_key = limit
                    break

the line should read:
 limit["regex"] == rate_limit["regex"]:

Currently, if there were multiple limits on actions with the same uri but different regexes it would wrongfully be considered the same action (I'm not sure that is even possible); potentially causing the limits to display incorrectly.

Related branches

Alex Meade (alex-meade)
Changed in nova:
assignee: nobody → Alex Meade (alex-meade)
Alex Meade (alex-meade)
Changed in nova:
status: New → In Progress
Alex Meade (alex-meade)
Changed in nova:
status: In Progress → Fix Committed
status: Fix Committed → In Progress
Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Medium
Alex Meade (alex-meade)
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → diablo-1
Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-1 → 2011.3
status: Fix Committed → Fix Released
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.