Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libvirt: Optimize test_connection and capabilities
The getCapabilities call can be very slow so it is not a good choice for testing the libvirt connection. This patch switches to getLibVersion and also caches the result of getCapabilities so it doesn't need to be requested every time. Note that this means that nova-compute will need to be restarted if the capaabilities of the host changes. This is an acceptable risk because capabilities changes should be very rare and nova-compute should be restarted if libvirt is restarted or reinstalled. This simple change lowers boot time in my devstack install from 22 seconds down to 8 seconds! Fixes bug 1100446 Change-Id: I1b5072a906b19c6130957cf255e8d35b20990828
- Loading branch information
1 parent
65d7543
commit ec3d7e4
Showing
2 changed files
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters