diff options
author | Vishvananda Ishaya <vishvananda@gmail.com> | 2013-01-16 16:50:47 -0800 |
---|---|---|
committer | Vishvananda Ishaya <vishvananda@gmail.com> | 2013-01-16 19:09:05 -0800 |
commit | ec3d7e4cb882eff42fa8f1e5f8f52723fb909b0e (patch) | |
tree | b2badd6b0cf947c98e361a23bd5b215b009490cc /nova/exception.py | |
parent | 65d75430af77367622e660f57361b972a0f8dac1 (diff) | |
download | nova-ec3d7e4cb882eff42fa8f1e5f8f52723fb909b0e.tar.gz nova-ec3d7e4cb882eff42fa8f1e5f8f52723fb909b0e.tar.xz nova-ec3d7e4cb882eff42fa8f1e5f8f52723fb909b0e.zip |
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
Diffstat (limited to 'nova/exception.py')
0 files changed, 0 insertions, 0 deletions