Set config file to db sync and other manage operation
Currently, the db sync operation does not specify the config dir or
config file.
If there is a config file in the home path, it will use this one,
but not the right one devstack write.
Set config file to these operations.
Change-Id: Id1fbc3d85280c19596f5ebd301c46bcf018fa2f6
Closes-Bug: #1578098
diff --git a/lib/keystone b/lib/keystone
index bcd5fab..6a202e5 100644
--- a/lib/keystone
+++ b/lib/keystone
@@ -489,16 +489,16 @@
recreate_database keystone
# Initialize keystone database
- $KEYSTONE_BIN_DIR/keystone-manage db_sync
+ $KEYSTONE_BIN_DIR/keystone-manage --config-file $KEYSTONE_CONF db_sync
if [[ "$KEYSTONE_TOKEN_FORMAT" == "pki" || "$KEYSTONE_TOKEN_FORMAT" == "pkiz" ]]; then
# Set up certificates
rm -rf $KEYSTONE_CONF_DIR/ssl
- $KEYSTONE_BIN_DIR/keystone-manage pki_setup
+ $KEYSTONE_BIN_DIR/keystone-manage --config-file $KEYSTONE_CONF pki_setup
fi
if [[ "$KEYSTONE_TOKEN_FORMAT" == "fernet" ]]; then
rm -rf "$KEYSTONE_CONF_DIR/fernet-keys/"
- $KEYSTONE_BIN_DIR/keystone-manage fernet_setup
+ $KEYSTONE_BIN_DIR/keystone-manage --config-file $KEYSTONE_CONF fernet_setup
fi
}