Browse code

Merge "Marconi fixes for precise"

Jenkins authored on 2014/02/15 10:54:26
Showing 1 changed files
... ...
@@ -89,10 +89,6 @@ function configure_marconi() {
89 89
     iniset $MARCONI_CONF DEFAULT verbose True
90 90
     iniset $MARCONI_CONF 'drivers:transport:wsgi' bind '0.0.0.0'
91 91
 
92
-    # Install the policy file for the API server
93
-    cp $MARCONI_DIR/etc/marconi/policy.json $MARCONI_CONF_DIR
94
-    iniset $MARCONI_CONF DEFAULT policy_file $MARCONI_CONF_DIR/policy.json
95
-
96 92
     iniset $MARCONI_CONF keystone_authtoken auth_protocol http
97 93
     iniset $MARCONI_CONF keystone_authtoken admin_user marconi
98 94
     iniset $MARCONI_CONF keystone_authtoken admin_password $SERVICE_PASSWORD
... ...
@@ -109,9 +105,16 @@ function configure_marconi() {
109 109
 function configure_mongodb() {
110 110
     # Set nssize to 2GB. This increases the number of namespaces supported
111 111
     # # per database.
112
-    sudo sed -i '/--nssize/!s/OPTIONS=\"/OPTIONS=\"--nssize 2047 /' /etc/sysconfig/mongod
113
-
114
-    restart_service mongod
112
+    if is_ubuntu; then
113
+        sudo sed -i -e "
114
+            s|[^ \t]*#[ \t]*\(nssize[ \t]*=.*\$\)|\1|
115
+            s|^\(nssize[ \t]*=[ \t]*\).*\$|\1 2047|
116
+        " /etc/mongodb.conf
117
+        restart_service mongodb
118
+    elif is_fedora; then
119
+        sudo sed -i '/--nssize/!s/OPTIONS=\"/OPTIONS=\"--nssize 2047 /' /etc/sysconfig/mongod
120
+        restart_service mongod
121
+    fi
115 122
 }
116 123
 
117 124
 # init_marconi() - Initialize etc.