EC2 API throws stacktrace if adding security group rule that already exists

Bug #1180973 reported by Joe Gordon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Joe Gordon
Grizzly
Fix Released
Low
Russell Bryant

Bug Description

Using trunk (a87b4e36e9a0ce6d565cc9ea38fcff523271e9ff)

when running the following command twice, the second time a stacktrace is thrown in nova-api.log

  euca-authorize -P icmp -t -1:-1 default

2013-05-16 20:02:03.625 32701 TRACE nova.api.ec2 Traceback (most recent call last):
2013-05-16 20:02:03.625 32701 TRACE nova.api.ec2 File "/opt/stack/nova/nova/api/ec2/__init__.py", line 481, in __call__2013-05-16 20:02:03.625 32701 TRACE nova.api.ec2 result = api_request.invoke(context)2013-05-16 20:02:03.625 32701 TRACE nova.api.ec2 File "/opt/stack/nova/nova/api/ec2/apirequest.py", line 79, in invoke2013-05-16 20:02:03.625 32701 TRACE nova.api.ec2 result = method(context, **args)2013-05-16 20:02:03.625 32701 TRACE nova.api.ec2 File "/opt/stack/nova/nova/api/ec2/cloud.py", line 678, in authorize_security_group_ingress
2013-05-16 20:02:03.625 32701 TRACE nova.api.ec2 raise exception.EC2APIError(err % values_for_rule)2013-05-16 20:02:03.625 32701 TRACE nova.api.ec2 EC2APIError: {'to_port': -1, 'cidr': u'0.0.0.0/0', 'from_port': -1, 'protocol': 'icmp', 'parent_group_id': 1L} - This rule already exists in group
2013-05-16 20:02:03.625 32701 TRACE nova.api.ec2

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/29436

Changed in nova:
assignee: nobody → Joe Gordon (jogo)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/29436
Committed: http://github.com/openstack/nova/commit/dc887267572c821ce97bec9536a699b72bdae443
Submitter: Jenkins
Branch: master

commit dc887267572c821ce97bec9536a699b72bdae443
Author: Joe Gordon <email address hidden>
Date: Thu May 16 20:49:42 2013 +0000

    Don't raise unnecessary stack traces in EC2 API

    exception.EC2APIError exceptions are always expected, so no reason to have a
    LOG.exception when one is raised. Furthermore nova.api.ec2.ec2_error already
    logs the exception so the duplicate log statement is just removed

    Fix Bug 1180973

    Change-Id: I4b42a9a764f6e15bb94a383e8a725d52d7436bd7

Changed in nova:
status: In Progress → Fix Committed
tags: added: grizzly-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/29791

Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/grizzly)

Reviewed: https://review.openstack.org/29791
Committed: http://github.com/openstack/nova/commit/e05cf676a2565189bf6f9277828928069f958be2
Submitter: Jenkins
Branch: stable/grizzly

commit e05cf676a2565189bf6f9277828928069f958be2
Author: Joe Gordon <email address hidden>
Date: Thu May 16 20:49:42 2013 +0000

    Don't raise unnecessary stack traces in EC2 API

    exception.EC2APIError exceptions are always expected, so no reason to have a
    LOG.exception when one is raised. Furthermore nova.api.ec2.ec2_error already
    logs the exception so the duplicate log statement is just removed

    Fix Bug 1180973

    Change-Id: I4b42a9a764f6e15bb94a383e8a725d52d7436bd7
    (cherry picked from commit dc887267572c821ce97bec9536a699b72bdae443)

tags: removed: grizzly-backport-potential
Alan Pevec (apevec)
Changed in nova:
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-1 → 2013.2
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.