Public bug reported: 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. ** Affects: nova Importance: Low Status: Triaged ** Tags: perf security-groups -- 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): Triaged 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 : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp