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
... | ... |
@@ -82,10 +82,6 @@ function configure_marconi() { |
82 | 82 |
iniset $MARCONI_CONF DEFAULT verbose True |
83 | 83 |
iniset $MARCONI_CONF 'drivers:transport:wsgi' bind '0.0.0.0' |
84 | 84 |
|
85 |
- # Install the policy file for the API server |
|
86 |
- cp $MARCONI_DIR/etc/marconi/policy.json $MARCONI_CONF_DIR |
|
87 |
- iniset $MARCONI_CONF DEFAULT policy_file $MARCONI_CONF_DIR/policy.json |
|
88 |
- |
|
89 | 85 |
iniset $MARCONI_CONF keystone_authtoken auth_protocol http |
90 | 86 |
iniset $MARCONI_CONF keystone_authtoken admin_user marconi |
91 | 87 |
iniset $MARCONI_CONF keystone_authtoken admin_password $SERVICE_PASSWORD |
... | ... |
@@ -102,9 +98,16 @@ function configure_marconi() { |
102 | 102 |
function configure_mongodb() { |
103 | 103 |
# Set nssize to 2GB. This increases the number of namespaces supported |
104 | 104 |
# # per database. |
105 |
- sudo sed -i '/--nssize/!s/OPTIONS=\"/OPTIONS=\"--nssize 2047 /' /etc/sysconfig/mongod |
|
106 |
- |
|
107 |
- restart_service mongod |
|
105 |
+ if is_ubuntu; then |
|
106 |
+ sudo sed -i -e " |
|
107 |
+ s|[^ \t]*#[ \t]*\(nssize[ \t]*=.*\$\)|\1| |
|
108 |
+ s|^\(nssize[ \t]*=[ \t]*\).*\$|\1 2047| |
|
109 |
+ " /etc/mongodb.conf |
|
110 |
+ restart_service mongodb |
|
111 |
+ elif is_fedora; then |
|
112 |
+ sudo sed -i '/--nssize/!s/OPTIONS=\"/OPTIONS=\"--nssize 2047 /' /etc/sysconfig/mongod |
|
113 |
+ restart_service mongod |
|
114 |
+ fi |
|
108 | 115 |
} |
109 | 116 |
|
110 | 117 |
# init_marconi() - Initialize etc. |