Browse code

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

Chris Dent authored on 2015/06/18 01:42:43
Showing 1 changed files
... ...
@@ -334,12 +334,15 @@ function install_ceilometer {
334 334
         pip_install_gr pymongo
335 335
     fi
336 336
 
337
-    if [[ "$VIRT_DRIVER" = 'libvirt' ]]; then
338
-        pip_install_gr libvirt-python
339
-    fi
337
+    # Only install virt drivers if we're running nova compute
338
+    if is_service_enabled n-cpu ; then
339
+        if [[ "$VIRT_DRIVER" = 'libvirt' ]]; then
340
+            pip_install_gr libvirt-python
341
+        fi
340 342
 
341
-    if [[ "$VIRT_DRIVER" = 'vsphere' ]]; then
342
-        pip_instal_gr oslo.vmware
343
+        if [[ "$VIRT_DRIVER" = 'vsphere' ]]; then
344
+            pip_instal_gr oslo.vmware
345
+        fi
343 346
     fi
344 347
 
345 348
     if [ "$CEILOMETER_BACKEND" = 'es' ] ; then