From 41d96d7b4837c6bafc2622954a3c6c1fdcc13a82 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Tue, 11 Feb 2014 09:08:35 -0600 Subject: [PATCH] Marconi fixes for precise Fix a couple of problems found on Ubuntu: * $MARCONI_DIR/etc/marconi/policy.json doesn't exist; removed the copy to /etc/marconi * added a seting of nssize in /etc/mongodb.conf for Ubuntu * restart the correct serice name on Ubuntu Change-Id: I9bd2ab1aa4fb94ff96559e069e5b62138c358fb5 --- lib/marconi | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/marconi b/lib/marconi index 1eaebbdf16..3d5ef82471 100644 --- a/lib/marconi +++ b/lib/marconi @@ -82,10 +82,6 @@ function configure_marconi() { iniset $MARCONI_CONF DEFAULT verbose True iniset $MARCONI_CONF 'drivers:transport:wsgi' bind '0.0.0.0' - # Install the policy file for the API server - cp $MARCONI_DIR/etc/marconi/policy.json $MARCONI_CONF_DIR - iniset $MARCONI_CONF DEFAULT policy_file $MARCONI_CONF_DIR/policy.json - iniset $MARCONI_CONF keystone_authtoken auth_protocol http iniset $MARCONI_CONF keystone_authtoken admin_user marconi iniset $MARCONI_CONF keystone_authtoken admin_password $SERVICE_PASSWORD @@ -102,9 +98,16 @@ function configure_marconi() { function configure_mongodb() { # Set nssize to 2GB. This increases the number of namespaces supported # # per database. - sudo sed -i '/--nssize/!s/OPTIONS=\"/OPTIONS=\"--nssize 2047 /' /etc/sysconfig/mongod - - restart_service mongod + if is_ubuntu; then + sudo sed -i -e " + s|[^ \t]*#[ \t]*\(nssize[ \t]*=.*\$\)|\1| + s|^\(nssize[ \t]*=[ \t]*\).*\$|\1 2047| + " /etc/mongodb.conf + restart_service mongodb + elif is_fedora; then + sudo sed -i '/--nssize/!s/OPTIONS=\"/OPTIONS=\"--nssize 2047 /' /etc/sysconfig/mongod + restart_service mongod + fi } # init_marconi() - Initialize etc.