while adding/removing security groups to instance, checking power state of instance is not required

Bug #1107721 reported by boddepalli srikanth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Giampaolo Lauria

Bug Description

For instacne in non-running state, unable to add/remove security group due to below conditon.

$ compute/api.py:

    def add_to_instance(self, context, instance, security_group_name):
           .....
           if instance['power_state'] != power_state.RUNNING: <<<<<
                 raise exception.InstanceNotRunning(instance_id=instance_uuid)
           ....

   def remove_from_instance(self, context, instance, security_group_name):
           .....
           if instance['power_state'] != power_state.RUNNING: <<<<<
                 raise exception.InstanceNotRunning(instance_id=instance_uuid)
           ....

Is it required?

Revision history for this message
Vish Ishaya (vishvananda) wrote :

I don't believe this is required.

tags: added: low-hanging-fruit
Changed in nova:
importance: Undecided → Low
status: New → Triaged
Changed in nova:
assignee: nobody → Giampaolo Lauria (lauria)
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/24550

Changed in nova:
status: Triaged → In Progress
Changed in nova:
importance: Low → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/24550
Committed: http://github.com/openstack/nova/commit/074f64cd67b96f31b9e43299b633e9df71450f59
Submitter: Jenkins
Branch: master

commit 074f64cd67b96f31b9e43299b633e9df71450f59
Author: Giampaolo Lauria <email address hidden>
Date: Fri Mar 15 14:55:12 2013 -0400

    Remove unnecessary checks in api.py

    Remove existing check to ensure instance was running
    when adding or removing security groups to/from an
    instance.
    Modified unit test accordingly
    Fixes bug 1107721

    Change-Id: If1148653edd96bd70b983c2fa89cd9973d80e48b

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-1
status: Fix Committed → Fix Released
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.