diff --git a/devstack/libs/collectd b/devstack/libs/collectd index 205edfa..f5db521 100644 --- a/devstack/libs/collectd +++ b/devstack/libs/collectd @@ -17,7 +17,16 @@ function stop_collectd { fi } -# install collectd service +function install_requirements { + echo "Installing pre-resquisites" + if is_ubuntu; then + install_package libvirt-bin libvirt-dev python-libvirt + elif is_fedora; then + install_package libvirt libvirt-devel libvirt-python + fi +} + +# install collectd function install_collectd { if [[ "$COLLECTD_INSTALL" == True ]]; then if is_fedora || is_ubuntu; then diff --git a/devstack/plugin.sh b/devstack/plugin.sh index e328ca6..d8f9932 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -8,10 +8,10 @@ set -o xtrace "stack") case $2 in "pre-install") - # no-op - : + install_requirements ;; "install") + pip_install $COLLECTD_CEILOMETER_DIR # install system package install_collectd # adapt collectd.conf