Adds the PostgreSQL case for a Ceilometer backend and
initializes Ceilometer accordingly.
Closes-Bug: #1244381
Change-Id: Iefc5bb7eea6e9efa1f2ad04f1f8dc714e3404c9c
| ... | ... |
@@ -91,7 +91,7 @@ function configure_ceilometer() {
|
| 91 | 91 |
iniset $CEILOMETER_CONF keystone_authtoken admin_tenant_name $SERVICE_TENANT_NAME |
| 92 | 92 |
iniset $CEILOMETER_CONF keystone_authtoken signing_dir $CEILOMETER_AUTH_CACHE_DIR |
| 93 | 93 |
|
| 94 |
- if [[ "$CEILOMETER_BACKEND" = 'mysql' ]]; then |
|
| 94 |
+ if [ "$CEILOMETER_BACKEND" = 'mysql' ] || [ "$CEILOMETER_BACKEND" = 'postgresql' ] ; then |
|
| 95 | 95 |
iniset $CEILOMETER_CONF database connection `database_connection_url ceilometer` |
| 96 | 96 |
else |
| 97 | 97 |
iniset $CEILOMETER_CONF database connection mongodb://localhost:27017/ceilometer |
| ... | ... |
@@ -116,7 +116,7 @@ function init_ceilometer() {
|
| 116 | 116 |
sudo chown $STACK_USER $CEILOMETER_AUTH_CACHE_DIR |
| 117 | 117 |
rm -f $CEILOMETER_AUTH_CACHE_DIR/* |
| 118 | 118 |
|
| 119 |
- if [[ "$CEILOMETER_BACKEND" = 'mysql' ]]; then |
|
| 119 |
+ if [ "$CEILOMETER_BACKEND" = 'mysql' ] || [ "$CEILOMETER_BACKEND" = 'postgresql' ] ; then |
|
| 120 | 120 |
recreate_database ceilometer utf8 |
| 121 | 121 |
$CEILOMETER_BIN_DIR/ceilometer-dbsync |
| 122 | 122 |
fi |