Install python-libvirt for ceilometer only if n-cpu enabled

Nova is responsible for installing the libvirt package (if it is being
used). It is required by python-libvirt but python-libvirt only required
in ceilometer if nova compute is being used. There are some usage
scenarios where nova compute is not being used so in that case don't
install python-libvirt.

Change-Id: I0db66f1c0526e24ade98de85989a5ed8d37f0c4f
This commit is contained in:
Chris Dent 2015-06-17 16:42:43 +00:00
parent 40fc66324c
commit ccd4c2e177

View File

@ -334,12 +334,15 @@ function install_ceilometer {
pip_install_gr pymongo
fi
if [[ "$VIRT_DRIVER" = 'libvirt' ]]; then
pip_install_gr libvirt-python
fi
# Only install virt drivers if we're running nova compute
if is_service_enabled n-cpu ; then
if [[ "$VIRT_DRIVER" = 'libvirt' ]]; then
pip_install_gr libvirt-python
fi
if [[ "$VIRT_DRIVER" = 'vsphere' ]]; then
pip_instal_gr oslo.vmware
if [[ "$VIRT_DRIVER" = 'vsphere' ]]; then
pip_instal_gr oslo.vmware
fi
fi
if [ "$CEILOMETER_BACKEND" = 'es' ] ; then