Make mongo install for ceilometer NOPRIME
mongodb packages are missing on some platforms, so we switch to a manual install. Also gate the mongo call in cleanup Change-Id: I1755e461c66be30da3db2a0994f908503c4c38ea
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
python-pymongo
|
python-pymongo #NOPRIME
|
||||||
mongodb-server
|
mongodb-server #NOPRIME
|
||||||
libnspr4-dev
|
libnspr4-dev
|
||||||
pkg-config
|
pkg-config
|
||||||
libxml2-dev
|
libxml2-dev
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
selinux-policy-targeted
|
selinux-policy-targeted
|
||||||
mongodb-server
|
mongodb-server #NOPRIME
|
||||||
pymongo
|
pymongo # NOPRIME
|
||||||
mongodb # NOPRIME
|
mongodb # NOPRIME
|
||||||
|
|||||||
@@ -106,7 +106,9 @@ create_ceilometer_accounts() {
|
|||||||
# cleanup_ceilometer() - Remove residual data files, anything left over from previous
|
# cleanup_ceilometer() - Remove residual data files, anything left over from previous
|
||||||
# runs that a clean run would need to clean up
|
# runs that a clean run would need to clean up
|
||||||
function cleanup_ceilometer {
|
function cleanup_ceilometer {
|
||||||
mongo ceilometer --eval "db.dropDatabase();"
|
if [ "$CEILOMETER_BACKEND" != 'mysql' ] && [ "$CEILOMETER_BACKEND" != 'postgresql' ] ; then
|
||||||
|
mongo ceilometer --eval "db.dropDatabase();"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# configure_ceilometerclient() - Set config files, create data dirs, etc
|
# configure_ceilometerclient() - Set config files, create data dirs, etc
|
||||||
@@ -164,14 +166,27 @@ function configure_ceilometer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function configure_mongodb {
|
function configure_mongodb {
|
||||||
|
# server package is the same on all
|
||||||
|
local packages=mongodb-server
|
||||||
|
|
||||||
|
if is_fedora; then
|
||||||
|
# mongodb client + python bindings
|
||||||
|
packages="${packages} mongodb pymongo"
|
||||||
|
else
|
||||||
|
packages="${packages} python-pymongo"
|
||||||
|
fi
|
||||||
|
|
||||||
|
install_package ${packages}
|
||||||
|
|
||||||
if is_fedora; then
|
if is_fedora; then
|
||||||
# install mongodb client
|
|
||||||
install_package mongodb
|
|
||||||
# ensure smallfiles selected to minimize freespace requirements
|
# ensure smallfiles selected to minimize freespace requirements
|
||||||
sudo sed -i '/--smallfiles/!s/OPTIONS=\"/OPTIONS=\"--smallfiles /' /etc/sysconfig/mongod
|
sudo sed -i '/--smallfiles/!s/OPTIONS=\"/OPTIONS=\"--smallfiles /' /etc/sysconfig/mongod
|
||||||
|
|
||||||
restart_service mongod
|
restart_service mongod
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# give mongodb time to start-up
|
||||||
|
sleep 5
|
||||||
}
|
}
|
||||||
|
|
||||||
# init_ceilometer() - Initialize etc.
|
# init_ceilometer() - Initialize etc.
|
||||||
|
|||||||
Reference in New Issue
Block a user