diff --git a/lib/ceilometer b/lib/ceilometer index c04371df56..d90694c513 100644 --- a/lib/ceilometer +++ b/lib/ceilometer @@ -68,7 +68,7 @@ function configure_ceilometer() { iniset $CEILOMETER_CONF DEFAULT notification_topics 'notifications,glance_notifications' iniset $CEILOMETER_CONF DEFAULT verbose True - iniset $CEILOMETER_CONF DEFAULT sql_connection $BASE_SQL_CONN/nova?charset=utf8 + iniset $CEILOMETER_CONF DEFAULT `database_connection_url nova` # Install the policy file for the API server cp $CEILOMETER_DIR/etc/ceilometer/policy.json $CEILOMETER_CONF_DIR diff --git a/lib/cinder b/lib/cinder index d8ad1424d3..b3e1904de0 100644 --- a/lib/cinder +++ b/lib/cinder @@ -186,9 +186,7 @@ function configure_cinder() { iniset $CINDER_CONF DEFAULT volume_name_template ${VOLUME_NAME_PREFIX}%s fi iniset $CINDER_CONF DEFAULT iscsi_helper tgtadm - local dburl - database_connection_url dburl cinder - iniset $CINDER_CONF DEFAULT sql_connection $dburl + iniset $CINDER_CONF DEFAULT sql_connection `database_connection_url cinder` iniset $CINDER_CONF DEFAULT api_paste_config $CINDER_API_PASTE_INI iniset $CINDER_CONF DEFAULT rootwrap_config "$CINDER_CONF_DIR/rootwrap.conf" iniset $CINDER_CONF DEFAULT osapi_volume_extension cinder.api.contrib.standard_extensions diff --git a/lib/databases/mysql b/lib/databases/mysql index 94aedc6409..ec65c36396 100644 --- a/lib/databases/mysql +++ b/lib/databases/mysql @@ -115,9 +115,8 @@ EOF } function database_connection_url_mysql { - local output=$1 - local db=$2 - eval "$output=$BASE_SQL_CONN/$db?charset=utf8" + local db=$1 + echo "$BASE_SQL_CONN/$db?charset=utf8" } # Restore xtrace diff --git a/lib/databases/postgresql b/lib/databases/postgresql index 2c37f49b71..7d4a6c57e1 100644 --- a/lib/databases/postgresql +++ b/lib/databases/postgresql @@ -70,9 +70,8 @@ EOF } function database_connection_url_postgresql { - local output=$1 - local db=$2 - eval "$output=$BASE_SQL_CONN/$db?client_encoding=utf8" + local db=$1 + echo "$BASE_SQL_CONN/$db?client_encoding=utf8" } # Restore xtrace diff --git a/lib/glance b/lib/glance index a6b698fe35..9ec2112962 100644 --- a/lib/glance +++ b/lib/glance @@ -81,8 +81,7 @@ function configure_glance() { cp $GLANCE_DIR/etc/glance-registry.conf $GLANCE_REGISTRY_CONF iniset $GLANCE_REGISTRY_CONF DEFAULT debug True inicomment $GLANCE_REGISTRY_CONF DEFAULT log_file - local dburl - database_connection_url dburl glance + local dburl=`database_connection_url glance` iniset $GLANCE_REGISTRY_CONF DEFAULT sql_connection $dburl iniset $GLANCE_REGISTRY_CONF DEFAULT use_syslog $SYSLOG iniset $GLANCE_REGISTRY_CONF paste_deploy flavor keystone diff --git a/lib/heat b/lib/heat index 5b8b360ae7..56d6f396ff 100644 --- a/lib/heat +++ b/lib/heat @@ -117,9 +117,7 @@ function configure_heat() { iniset $HEAT_ENGINE_CONF DEFAULT heat_metadata_server_url http://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT iniset $HEAT_ENGINE_CONF DEFAULT heat_waitcondition_server_url http://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT/v1/waitcondition iniset $HEAT_ENGINE_CONF DEFAULT heat_watch_server_url http://$HEAT_API_CW_HOST:$HEAT_API_CW_PORT - local dburl - database_connection_url dburl heat - iniset $HEAT_ENGINE_CONF DEFAULT sql_connection $dburl + iniset $HEAT_ENGINE_CONF DEFAULT sql_connection `database_connection_url heat` iniset $HEAT_ENGINE_CONF DEFAULT auth_encryption_key `hexdump -n 16 -v -e '/1 "%02x"' /dev/random` iniset_rpc_backend heat $HEAT_ENGINE_CONF DEFAULT diff --git a/lib/keystone b/lib/keystone index 25803515f0..16b6d6c684 100644 --- a/lib/keystone +++ b/lib/keystone @@ -91,8 +91,6 @@ function configure_keystone() { fi # Rewrite stock ``keystone.conf`` - local dburl - database_connection_url dburl keystone if is_service_enabled ldap; then #Set all needed ldap values @@ -123,7 +121,7 @@ function configure_keystone() { iniset $KEYSTONE_CONF DEFAULT admin_token "$SERVICE_TOKEN" iniset $KEYSTONE_CONF signing token_format "$KEYSTONE_TOKEN_FORMAT" - iniset $KEYSTONE_CONF sql connection $dburl + iniset $KEYSTONE_CONF sql connection `database_connection_url keystone` iniset $KEYSTONE_CONF ec2 driver "keystone.contrib.ec2.backends.sql.Ec2" sed -e " /^pipeline.*ec2_extension crud_/s|ec2_extension crud_extension|ec2_extension s3_extension crud_extension|; diff --git a/lib/nova b/lib/nova index 374979089d..42b61394aa 100644 --- a/lib/nova +++ b/lib/nova @@ -377,12 +377,9 @@ function create_nova_conf() { iniset $NOVA_CONF DEFAULT s3_port "$S3_SERVICE_PORT" iniset $NOVA_CONF DEFAULT osapi_compute_extension "nova.api.openstack.compute.contrib.standard_extensions" iniset $NOVA_CONF DEFAULT my_ip "$HOST_IP" - local dburl - database_connection_url dburl nova - iniset $NOVA_CONF DEFAULT sql_connection "$dburl" + iniset $NOVA_CONF DEFAULT sql_connection `database_connection_url nova` if is_baremetal; then - database_connection_url dburl nova_bm - iniset $NOVA_CONF baremetal sql_connection $dburl + iniset $NOVA_CONF baremetal sql_connection `database_connection_url nova_bm` fi iniset $NOVA_CONF DEFAULT libvirt_type "$LIBVIRT_TYPE" iniset $NOVA_CONF DEFAULT libvirt_cpu_mode "none" diff --git a/lib/quantum b/lib/quantum index eebbabf282..c912f90876 100644 --- a/lib/quantum +++ b/lib/quantum @@ -416,9 +416,7 @@ function _configure_quantum_common() { Q_PLUGIN_CONF_FILE=$Q_PLUGIN_CONF_PATH/$Q_PLUGIN_CONF_FILENAME cp $QUANTUM_DIR/$Q_PLUGIN_CONF_FILE /$Q_PLUGIN_CONF_FILE - database_connection_url dburl $Q_DB_NAME - iniset /$Q_PLUGIN_CONF_FILE DATABASE sql_connection $dburl - unset dburl + iniset /$Q_PLUGIN_CONF_FILE DATABASE sql_connection `database_connection_url $Q_DB_NAME` _quantum_setup_rootwrap }