commit f5b6dc603c5f6f72ab35ef21ab9e35ec982e3219
Author: Mark Goddard <email address hidden>
Date: Fri Jan 26 14:55:34 2018 +0000
Include only required fields in ironic node cache
The ironic virt driver maintains a cache of ironic nodes to avoid
continually polling the ironic API. Code paths requiring a specific
node use a limited set of fields, _NODE_FIELDS, when querying the
ironic API for the node. This reduces the memory footprint required by
the cache, and the network traffic required to populate it. However,
in most cases the cache is populated using a detailed node list
operation in _refresh_cache(), which includes all node fields.
This change specifies _NODE_FIELDS in the node list operation in
_refresh_cache().
We also modify the unit tests to use fake node objects that are
representative of the nodes in the cache.
Change-Id: Id96e7e513f469b87992ddae1431cce714e91ed16
Related-Bug: #1746209
(cherry picked from commit 8bbad196a7f6a6e2ea093aeee87dfde2154c9358)
Reviewed: https:/ /review. opendev. org/724862 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=f5b6dc603c5 f6f72ab35ef21ab 9e35ec982e3219
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit f5b6dc603c5f6f7 2ab35ef21ab9e35 ec982e3219
Author: Mark Goddard <email address hidden>
Date: Fri Jan 26 14:55:34 2018 +0000
Include only required fields in ironic node cache
The ironic virt driver maintains a cache of ironic nodes to avoid
continually polling the ironic API. Code paths requiring a specific
node use a limited set of fields, _NODE_FIELDS, when querying the
ironic API for the node. This reduces the memory footprint required by
the cache, and the network traffic required to populate it. However,
in most cases the cache is populated using a detailed node list
operation in _refresh_cache(), which includes all node fields.
This change specifies _NODE_FIELDS in the node list operation in cache() .
_refresh_
We also modify the unit tests to use fake node objects that are
representative of the nodes in the cache.
Change-Id: Id96e7e513f469b 87992ddae1431cc e714e91ed16 2ea093aeee87dfd e2154c9358)
Related-Bug: #1746209
(cherry picked from commit 8bbad196a7f6a6e