update security group raise HttpError500 exception

Bug #1244018 reported by huangtianhua on 2013-10-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
High
huangtianhua
Havana
High
huangtianhua

Bug Description

1.Set the item "security_group_api=nova" in nova.conf
2.Restart nova
3.Create a security group
4.Update the security group
   PUT http://192.168.83.241:8774/v2/99a7b3d4bd6540aaaceae89ac74bfab6/os-security-groups/7
   {
    "security_group": {
        "name": "huangtianhua",
        "description":"for test"
        }
   }
5.The server raises exception as bellow:
   {
    "computeFault": {
        "message": "The server has either erred or is incapable of performing the requested operation.",
        "code": 500
       }
   }
6.I think it's a bug.When traversal the rules of the group before returning throws error:
   "DetachedInstanceError: Parent instance <SecurityGroup at 0x789eed0> is not bound to a Session; lazy load operation of attribute 'rules' cannot proceed."

Changed in nova:
assignee: nobody → huangtianhua (huangtianhua)

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

Changed in nova:
status: New → In Progress

Reviewed: https://review.openstack.org/53489
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=b9b55935cb61cc1726525b1c4963e352a3a81ea9
Submitter: Jenkins
Branch: master

commit b9b55935cb61cc1726525b1c4963e352a3a81ea9
Author: huangtianhua <email address hidden>
Date: Thu Oct 24 10:21:50 2013 +0800

    Fix a lazy-load exception in security_group_update()

    When security_group_api is nova, the update_security_group api raises http
    500 error: group rules fails with lazy load exception. Because the rule
    infos of the security group will be return in response body, but the rule
    attribute hasn't been preloaded.

    Closes-Bug: #1244018
    Change-Id: Ie07879ac22e4add90f75968778bf334915e8349c

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-2
Changed in nova:
importance: Undecided → High
tags: added: havana-backport-potential
Thierry Carrez (ttx) on 2014-01-22
Changed in nova:
status: Fix Committed → Fix Released
Alan Pevec (apevec) on 2014-01-29
tags: removed: havana-backport-potential

Reviewed: https://review.openstack.org/64521
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=98a2613bbc51ec722dab423dded69586a6efe27d
Submitter: Jenkins
Branch: stable/havana

commit 98a2613bbc51ec722dab423dded69586a6efe27d
Author: huangtianhua <email address hidden>
Date: Thu Oct 24 10:21:50 2013 +0800

    Fix a lazy-load exception in security_group_update()

    When security_group_api is nova, the update_security_group api raises http
    500 error: group rules fails with lazy load exception. Because the rule
    infos of the security group will be return in response body, but the rule
    attribute hasn't been preloaded.

    Closes-Bug: #1244018
    (cherry picked from commit b9b55935cb61cc1726525b1c4963e352a3a81ea9)

    Conflicts:
     nova/tests/api/openstack/compute/contrib/test_security_groups.py
    Change-Id: Ie07879ac22e4add90f75968778bf334915e8349c

Thierry Carrez (ttx) on 2014-04-17
Changed in nova:
milestone: icehouse-2 → 2014.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers