Browse code

iniset_rpc_backend default section

iniset_rpc_backend should know what section it needs to set the
config options in better than the callers. The config options
have actually been moved to different sections and the options
in the DEFAULT section are deprecated.

Change-Id: I0e07fe03c7812ef8df49e126bf71c57588635639

Brant Knudson authored on 2015/03/15 02:39:14
Showing 11 changed files
... ...
@@ -169,7 +169,7 @@ function configure_ceilometer {
169 169
     [ ! -d $CEILOMETER_API_LOG_DIR ] &&  sudo mkdir -m 755 -p $CEILOMETER_API_LOG_DIR
170 170
     sudo chown $STACK_USER $CEILOMETER_API_LOG_DIR
171 171
 
172
-    iniset_rpc_backend ceilometer $CEILOMETER_CONF DEFAULT
172
+    iniset_rpc_backend ceilometer $CEILOMETER_CONF
173 173
 
174 174
     iniset $CEILOMETER_CONF DEFAULT notification_topics "$CEILOMETER_NOTIFICATION_TOPICS"
175 175
     iniset $CEILOMETER_CONF DEFAULT verbose True
... ...
@@ -281,7 +281,7 @@ function configure_cinder {
281 281
         iniset $CINDER_CONF DEFAULT use_syslog True
282 282
     fi
283 283
 
284
-    iniset_rpc_backend cinder $CINDER_CONF DEFAULT
284
+    iniset_rpc_backend cinder $CINDER_CONF
285 285
 
286 286
     if [[ "$CINDER_SECURE_DELETE" == "False" ]]; then
287 287
         iniset $CINDER_CONF DEFAULT secure_delete False
... ...
@@ -112,7 +112,7 @@ function configure_glance {
112 112
     if is_service_enabled qpid || [ -n "$RABBIT_HOST" ] && [ -n "$RABBIT_PASSWORD" ]; then
113 113
         iniset $GLANCE_REGISTRY_CONF DEFAULT notification_driver messaging
114 114
     fi
115
-    iniset_rpc_backend glance $GLANCE_REGISTRY_CONF DEFAULT
115
+    iniset_rpc_backend glance $GLANCE_REGISTRY_CONF
116 116
 
117 117
     cp $GLANCE_DIR/etc/glance-api.conf $GLANCE_API_CONF
118 118
     iniset $GLANCE_API_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
... ...
@@ -125,7 +125,7 @@ function configure_glance {
125 125
     if is_service_enabled qpid || [ -n "$RABBIT_HOST" ] && [ -n "$RABBIT_PASSWORD" ]; then
126 126
         iniset $GLANCE_API_CONF DEFAULT notification_driver messaging
127 127
     fi
128
-    iniset_rpc_backend glance $GLANCE_API_CONF DEFAULT
128
+    iniset_rpc_backend glance $GLANCE_API_CONF
129 129
     if [ "$VIRT_DRIVER" = 'xenserver' ]; then
130 130
         iniset $GLANCE_API_CONF DEFAULT container_formats "ami,ari,aki,bare,ovf,tgz"
131 131
         iniset $GLANCE_API_CONF DEFAULT disk_formats "ami,ari,aki,vhd,raw,iso"
... ...
@@ -105,7 +105,7 @@ function configure_heat {
105 105
     cp $HEAT_DIR/etc/heat/policy.json $HEAT_POLICY_FILE
106 106
 
107 107
     # common options
108
-    iniset_rpc_backend heat $HEAT_CONF DEFAULT
108
+    iniset_rpc_backend heat $HEAT_CONF
109 109
     iniset $HEAT_CONF DEFAULT heat_metadata_server_url http://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT
110 110
     iniset $HEAT_CONF DEFAULT heat_waitcondition_server_url http://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT/v1/waitcondition
111 111
     iniset $HEAT_CONF DEFAULT heat_watch_server_url http://$HEAT_API_CW_HOST:$HEAT_API_CW_PORT
... ...
@@ -313,7 +313,7 @@ function configure_ironic_api {
313 313
     iniset $IRONIC_CONF_FILE keystone_authtoken cafile $SSL_BUNDLE_FILE
314 314
     iniset $IRONIC_CONF_FILE keystone_authtoken signing_dir $IRONIC_AUTH_CACHE_DIR/api
315 315
 
316
-    iniset_rpc_backend ironic $IRONIC_CONF_FILE DEFAULT
316
+    iniset_rpc_backend ironic $IRONIC_CONF_FILE
317 317
     iniset $IRONIC_CONF_FILE api port $IRONIC_SERVICE_PORT
318 318
 
319 319
     cp -p $IRONIC_DIR/etc/ironic/policy.json $IRONIC_POLICY_JSON
... ...
@@ -226,7 +226,7 @@ function configure_keystone {
226 226
         iniset $KEYSTONE_CONF assignment driver "keystone.assignment.backends.$KEYSTONE_ASSIGNMENT_BACKEND.Assignment"
227 227
     fi
228 228
 
229
-    iniset_rpc_backend keystone $KEYSTONE_CONF DEFAULT
229
+    iniset_rpc_backend keystone $KEYSTONE_CONF
230 230
 
231 231
     # Set the URL advertised in the ``versions`` structure returned by the '/' route
232 232
     if is_service_enabled tls-proxy; then
... ...
@@ -422,7 +422,7 @@ function is_neutron_enabled {
422 422
 # Set common config for all neutron server and agents.
423 423
 function configure_neutron {
424 424
     _configure_neutron_common
425
-    iniset_rpc_backend neutron $NEUTRON_CONF DEFAULT
425
+    iniset_rpc_backend neutron $NEUTRON_CONF
426 426
 
427 427
     # goes before q-svc to init Q_SERVICE_PLUGIN_CLASSES
428 428
     if is_service_enabled q-lbaas; then
... ...
@@ -537,7 +537,7 @@ function create_nova_conf {
537 537
 
538 538
     iniset $NOVA_CONF DEFAULT ec2_dmz_host "$EC2_DMZ_HOST"
539 539
     iniset $NOVA_CONF DEFAULT keystone_ec2_url $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v2.0/ec2tokens
540
-    iniset_rpc_backend nova $NOVA_CONF DEFAULT
540
+    iniset_rpc_backend nova $NOVA_CONF
541 541
     iniset $NOVA_CONF glance api_servers "${GLANCE_SERVICE_PROTOCOL}://${GLANCE_HOSTPORT}"
542 542
 
543 543
     iniset $NOVA_CONF DEFAULT osapi_compute_workers "$API_WORKERS"
... ...
@@ -237,7 +237,7 @@ function restart_rpc_backend {
237 237
 function iniset_rpc_backend {
238 238
     local package=$1
239 239
     local file=$2
240
-    local section=$3
240
+    local section=${3:-DEFAULT}
241 241
     if is_service_enabled zeromq; then
242 242
         iniset $file $section rpc_backend "zmq"
243 243
         iniset $file $section rpc_zmq_host `hostname`
... ...
@@ -127,7 +127,7 @@ function configure_sahara {
127 127
     if is_service_enabled ceilometer; then
128 128
         iniset $SAHARA_CONF_FILE DEFAULT enable_notifications "true"
129 129
         iniset $SAHARA_CONF_FILE DEFAULT notification_driver "messaging"
130
-        iniset_rpc_backend sahara $SAHARA_CONF_FILE DEFAULT
130
+        iniset_rpc_backend sahara $SAHARA_CONF_FILE
131 131
     fi
132 132
 
133 133
     iniset $SAHARA_CONF_FILE DEFAULT verbose True
... ...
@@ -133,7 +133,7 @@ function configure_zaqar {
133 133
         iniset $ZAQAR_CONF DEFAULT notification_driver messaging
134 134
         iniset $ZAQAR_CONF DEFAULT control_exchange zaqar
135 135
     fi
136
-    iniset_rpc_backend zaqar $ZAQAR_CONF DEFAULT
136
+    iniset_rpc_backend zaqar $ZAQAR_CONF
137 137
 
138 138
     cleanup_zaqar
139 139
 }