security group driver gets loaded way too much in the api

Bug #1825018 reported by Matt Riedemann on 2019-04-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Low
Matt Riedemann
Ocata
Low
Unassigned
Pike
Low
Unassigned
Queens
Low
Unassigned
Rocky
Low
Matt Riedemann
Stein
Low
Matt Riedemann
Train
Low
Matt Riedemann

Bug Description

There was a fix in Mitaka https://review.openstack.org/#/c/256073/ to cache the security group driver once it was loaded per process. That cache was removed in Newton https://review.openstack.org/#/c/325684/. I put up a test patch to see how many times the security group driver gets loaded https://review.openstack.org/#/c/652783/ and in the neutron-grenade-multinode job the nova-api logs show it getting loaded over 1000 times (browser count hit tops out at 1000). So the fix from mitaka was definitely regressed in newton and we should add the driver cache code again.

Changed in nova:
assignee: nobody → Zhenyu Zheng (zhengzhenyu)
Matt Riedemann (mriedem) on 2019-06-19
Changed in nova:
assignee: Zhenyu Zheng (zhengzhenyu) → nobody
tags: added: low-hanging-fruit
Nara Jitender (jitu789) on 2019-09-12
Changed in nova:
assignee: nobody → Nara Jitender (jitu789)
Changed in nova:
assignee: Nara Jitender (jitu789) → Triveni Gurram (triveni12)
Matt Riedemann (mriedem) on 2019-12-03
Changed in nova:
assignee: Triveni Gurram (triveni12) → nobody

Fix proposed to branch: master
Review: https://review.opendev.org/697122

Changed in nova:
assignee: nobody → Matt Riedemann (mriedem)
status: Triaged → In Progress

Reviewed: https://review.opendev.org/697122
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=0461921d9e5313c3e92b039b90f713ed961e20c8
Submitter: Zuul
Branch: master

commit 0461921d9e5313c3e92b039b90f713ed961e20c8
Author: Matt Riedemann <email address hidden>
Date: Tue Dec 3 10:54:29 2019 -0500

    Cache security group driver

    Change I0932c652fb455fe10239215a93e183ea947234e3 from Mitaka
    was a performance improvement to cache the loaded security
    group driver since the API calls get_openstack_security_group_driver
    a lot. That performance fix was regressed with change
    Ia4a8d9954bf456253101b936f8b4ff513aaa73b2 in Newton.

    This caches the loaded security group driver once again. This
    is pretty similar to the original change except simpler since
    we don't have to account for the skip_policy_check flag.

    Change-Id: Icacc763f19db6dc90e72af32e17d480775ad5edf
    Closes-Bug: #1825018

Changed in nova:
status: In Progress → Fix Released

Reviewed: https://review.opendev.org/697475
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=3ea6a7f79b0ad8a12c8ccfdeda838784c7922e63
Submitter: Zuul
Branch: stable/train

commit 3ea6a7f79b0ad8a12c8ccfdeda838784c7922e63
Author: Matt Riedemann <email address hidden>
Date: Tue Dec 3 10:54:29 2019 -0500

    Cache security group driver

    Change I0932c652fb455fe10239215a93e183ea947234e3 from Mitaka
    was a performance improvement to cache the loaded security
    group driver since the API calls get_openstack_security_group_driver
    a lot. That performance fix was regressed with change
    Ia4a8d9954bf456253101b936f8b4ff513aaa73b2 in Newton.

    This caches the loaded security group driver once again. This
    is pretty similar to the original change except simpler since
    we don't have to account for the skip_policy_check flag.

    Change-Id: Icacc763f19db6dc90e72af32e17d480775ad5edf
    Closes-Bug: #1825018
    (cherry picked from commit 0461921d9e5313c3e92b039b90f713ed961e20c8)

Reviewed: https://review.opendev.org/697480
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=99048af872743638b3628555e96351e00bf1eb7e
Submitter: Zuul
Branch: stable/stein

commit 99048af872743638b3628555e96351e00bf1eb7e
Author: Matt Riedemann <email address hidden>
Date: Tue Dec 3 10:54:29 2019 -0500

    Cache security group driver

    Change I0932c652fb455fe10239215a93e183ea947234e3 from Mitaka
    was a performance improvement to cache the loaded security
    group driver since the API calls get_openstack_security_group_driver
    a lot. That performance fix was regressed with change
    Ia4a8d9954bf456253101b936f8b4ff513aaa73b2 in Newton.

    This caches the loaded security group driver once again. This
    is pretty similar to the original change except simpler since
    we don't have to account for the skip_policy_check flag.

    Change-Id: Icacc763f19db6dc90e72af32e17d480775ad5edf
    Closes-Bug: #1825018
    (cherry picked from commit 0461921d9e5313c3e92b039b90f713ed961e20c8)
    (cherry picked from commit 3ea6a7f79b0ad8a12c8ccfdeda838784c7922e63)

Reviewed: https://review.opendev.org/697505
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=179b556a5bebb8c5810b6065cd992a0a81bf288c
Submitter: Zuul
Branch: stable/rocky

commit 179b556a5bebb8c5810b6065cd992a0a81bf288c
Author: Matt Riedemann <email address hidden>
Date: Tue Dec 3 10:54:29 2019 -0500

    Cache security group driver

    Change I0932c652fb455fe10239215a93e183ea947234e3 from Mitaka
    was a performance improvement to cache the loaded security
    group driver since the API calls get_openstack_security_group_driver
    a lot. That performance fix was regressed with change
    Ia4a8d9954bf456253101b936f8b4ff513aaa73b2 in Newton.

    This caches the loaded security group driver once again. This
    is pretty similar to the original change except simpler since
    we don't have to account for the skip_policy_check flag.

    Change-Id: Icacc763f19db6dc90e72af32e17d480775ad5edf
    Closes-Bug: #1825018
    (cherry picked from commit 0461921d9e5313c3e92b039b90f713ed961e20c8)
    (cherry picked from commit 3ea6a7f79b0ad8a12c8ccfdeda838784c7922e63)
    (cherry picked from commit 99048af872743638b3628555e96351e00bf1eb7e)

This issue was fixed in the openstack/nova 20.1.0 release.

This issue was fixed in the openstack/nova 19.1.0 release.

This issue was fixed in the openstack/nova 18.3.0 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers