From 262e3ba3cd74b8aeb9ae2e4511bfa9cd1388b42a Mon Sep 17 00:00:00 2001 From: Gregory Haynes Date: Wed, 17 Dec 2014 11:46:46 -0800 Subject: [PATCH] Disable set -x for passwords When we are interacting with passwords we should disable logging. Closes-Bug: #1298205 Change-Id: I101db98c4be9d8c865b7457474a483fedebf281c --- .../os-refresh-config/migration.d/10-bootstrap-mysql | 6 ++++++ elements/tempest/bin/run-tempest | 3 +++ 2 files changed, 9 insertions(+) diff --git a/elements/mysql-migration/os-refresh-config/migration.d/10-bootstrap-mysql b/elements/mysql-migration/os-refresh-config/migration.d/10-bootstrap-mysql index 12b2ba102..6ebf811f8 100755 --- a/elements/mysql-migration/os-refresh-config/migration.d/10-bootstrap-mysql +++ b/elements/mysql-migration/os-refresh-config/migration.d/10-bootstrap-mysql @@ -57,7 +57,10 @@ if [ -n "$MIGRATION_HOST" ] ; then # If we are planning on setting up a full slave SLAVE_OPTS="" if [ -n "$MIGRATION_USER" ] && [ -n "$MIGRATION_PASSWORD" ] ; then + # Dont output passwords + set +x local_mysql -e "CHANGE MASTER TO master_host='${MIGRATION_HOST}', master_user='${MIGRATION_USER}', master_password='${MIGRATION_PASSWORD}'" + set -x SLAVE_OPTS="--master-data" fi mysqldump --defaults-extra-file=/root/metadata.my.cnf \ @@ -73,8 +76,11 @@ if [ -n "$MIGRATION_HOST" ] ; then # Now that database has been loaded, use creds that should match cp -f /root/metadata.my.cnf /root/.my.cnf # Now get the slave going if creds were provided + # Dont output passwords + set +x if [ -n "$MIGRATION_USER" ] && [ -n "$MIGRATION_PASSWORD" ] ; then local_mysql -e "START SLAVE" fi + set -x touch $DONE_FILE fi diff --git a/elements/tempest/bin/run-tempest b/elements/tempest/bin/run-tempest index acd1de076..3ba056d42 100755 --- a/elements/tempest/bin/run-tempest +++ b/elements/tempest/bin/run-tempest @@ -70,6 +70,8 @@ OS_V3_AUTH_URL=${OS_AUTH_URL%/*}/v3 # TODO : see what other defaults can be used # cp the tempest config file and edit the settings cp etc/tempest.conf.sample etc/tempest.conf +# We dont want to output passwords +set +x cat - <