Reviewed: https://review.openstack.org/315311 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=f726163977367251b7466a3fbf351f5e128004b3 Submitter: Jenkins Branch: master
commit f726163977367251b7466a3fbf351f5e128004b3 Author: liyingjun <[email protected]> Date: Wed Apr 20 22:09:30 2016 +0800 Optimize creating security_group When passing a source group_id for creating a new security group rule, the code is looking up that group twice. We should just look that up once at the beginning and reuse it so we don't have to hit the nova db or neutron twice for the same thing. Change-Id: I3ea4586d11b14da5f6d93e8d20f05171e7e6f0e8 Closes-bug: #1580621 ** Changed in: nova Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1580621 Title: Avoid looking up a source security group twice when creating new rules Status in OpenStack Compute (nova): Fix Released Bug description: When passing a source group_id for creating a new security group rule, the code is looking up that group twice, once here: https://github.com/openstack/nova/blob/f8a01ccdffc13403df77148867ef3821100b5edb/nova/api/openstack/compute/security_groups.py#L246 -> https://github.com/openstack/nova/blob/f8a01ccdffc13403df77148867ef3821100b5edb/nova/api/openstack/compute/security_groups.py#L299 And then once again before creating the rule: https://github.com/openstack/nova/blob/f8a01ccdffc13403df77148867ef3821100b5edb/nova/api/openstack/compute/security_groups.py#L272 We should just look that up once at the beginning and reuse it so we don't have to hit the nova db (nova-net) or neutron twice for the same thing. This is a low severity performance optimization. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1580621/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

