commit ab7d923ae7ed4d7525649bc16ff012c1bedca0f5
Author: Matt Riedemann <email address hidden>
Date: Tue Jun 18 11:13:32 2019 -0400
Fix GET /servers/detail host_status performance regression
Change I82b11b8866ac82b05eae04351605d52fa8b91453 moved the
host_status extended server attribute processing from an
extension to the main servers view builder. This, however,
caused a regression in the detailed listing of servers because
it didn't incorporate the caching mechanism used previously
by the extension so now for each server with details when
microversion 2.16 or greater is used (and the request passes
the policy check), we get the host status per server even if
we have multiple servers on the same host.
This moves the host_status processing out of the show() method
when listing servers with details and processes them in aggregate
similar to security groups and attached volumes.
One catch is the show() method handles instances from down cells
for us so we have to handle that separately in the new host_status
processing, but it's trivial (just don't get host_status for
instances without a host field set).
This reverts commit 0cecd2ac324dc9a20e7d60987b9ef6e5082c426d.
Reviewed: https:/ /review. opendev. org/666042 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=ab7d923ae7e d4d7525649bc16f f012c1bedca0f5
Committed: https:/
Submitter: Zuul
Branch: master
commit ab7d923ae7ed4d7 525649bc16ff012 c1bedca0f5
Author: Matt Riedemann <email address hidden>
Date: Tue Jun 18 11:13:32 2019 -0400
Fix GET /servers/detail host_status performance regression
Change I82b11b8866ac82 b05eae04351605d 52fa8b91453 moved the
host_status extended server attribute processing from an
extension to the main servers view builder. This, however,
caused a regression in the detailed listing of servers because
it didn't incorporate the caching mechanism used previously
by the extension so now for each server with details when
microversion 2.16 or greater is used (and the request passes
the policy check), we get the host status per server even if
we have multiple servers on the same host.
This moves the host_status processing out of the show() method
when listing servers with details and processes them in aggregate
similar to security groups and attached volumes.
One catch is the show() method handles instances from down cells
for us so we have to handle that separately in the new host_status
processing, but it's trivial (just don't get host_status for
instances without a host field set).
This reverts commit 0cecd2ac324dc9a 20e7d60987b9ef6 e5082c426d.
Change-Id: I8278d4ea993ed1 600919e34c97596 00c8c7dbb41
Closes-Bug: #1830260