Improve metadata server performance with large security groups
Don't include the rules in the SG fetch in the metadata server, since
we don't need them there, and with >1000 rules, it starts to get
really slow, especially in Pike and later.
NOTE(mriedem): The test had to be modified in this backport because
the mock call() behavior is different since Train and I'm not
entirely sure why but I'm guessing it's due to change
I4484e63c97bd1cdde3d88855eabe7545784f365e which was added in Train.
To get around this, I just modified the test to use a simple
predictable side_effect for _convert_to_nova_security_group_format.
Change-Id: I7de14456d04370c842b4c35597dca3a628a826a2
(cherry picked from commit eaf16fdde59a14fb38df669b21a911a0c2d2576f)
(cherry picked from commit 418af2d865809cfa907678f883dae07f4f31baa2)
Reviewed: https:/ /review. opendev. org/695925 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=fec95a2e4f7 63e151935044833 83f918feb3e636
Committed: https:/
Submitter: Zuul
Branch: stable/stein
commit fec95a2e4f763e1 5193504483383f9 18feb3e636
Author: Doug Wiegley <email address hidden>
Date: Tue Nov 5 17:29:11 2019 -0500
Improve metadata server performance with large security groups
Don't include the rules in the SG fetch in the metadata server, since
we don't need them there, and with >1000 rules, it starts to get
really slow, especially in Pike and later.
Closes-Bug: #1851430
Co-Authored-By: Doug Wiegley <email address hidden>
Co-Authored-By: Matt Riedemann <email address hidden>
NOTE(mriedem): The test had to be modified in this backport because bd1cdde3d88855e abe7545784f365e which was added in Train. to_nova_ security_ group_format.
the mock call() behavior is different since Train and I'm not
entirely sure why but I'm guessing it's due to change
I4484e63c97
To get around this, I just modified the test to use a simple
predictable side_effect for _convert_
Change-Id: I7de14456d04370 c842b4c35597dca 3a628a826a2 b38df669b21a911 a0c2d2576f) a907678f883dae0 7f4f31baa2)
(cherry picked from commit eaf16fdde59a14f
(cherry picked from commit 418af2d865809cf