summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorricolin <rico.l@inwinstack.com>2015-11-27 09:23:13 +0800
committerRico Lin <rico.l@inwinstack.com>2016-01-17 05:20:40 +0000
commitbb9d34c33f9f16e792f7ff60d7d3ae890ab626b2 (patch)
tree352eeff823f19b3784e93b1fd210259faadc35b4 /bin
parentb445f42ff0396221c1de5abb88884e20c4213b0f (diff)
downloadheat-bb9d34c33f9f16e792f7ff60d7d3ae890ab626b2.tar.gz
use stderr for error echo message
Some echo message contain error or warning message which better be contain in stderr. And futher more some error message already contain in stderr, but for error message reader, the following information for that echo should be contained as well. Change-Id: I2aac631df19829218d446150c91cf6d50aa5e7e7
Diffstat (limited to 'bin')
-rwxr-xr-xbin/heat-db-setup12
-rwxr-xr-xbin/heat-keystone-setup6
2 files changed, 9 insertions, 9 deletions
diff --git a/bin/heat-db-setup b/bin/heat-db-setup
index 76d859e31..b0e39ac74 100755
--- a/bin/heat-db-setup
+++ b/bin/heat-db-setup
@@ -152,7 +152,7 @@ then
exit 0
;;
*)
- echo "Invalid response."
+ echo "Invalid response." >&2
exit 1
esac
fi
@@ -177,7 +177,7 @@ then
exit 0
;;
*)
- echo "Invalid response."
+ echo "Invalid response." >&2
exit 1
esac
fi
@@ -208,14 +208,14 @@ then
if [ "${MYSQL_ROOT_PW}" = "${PW2}" ] ; then
PW_MATCH=1
else
- echo "Passwords did not match."
+ echo "Passwords did not match." >&2
fi
done
fi
echo "UPDATE mysql.user SET password = password('${MYSQL_ROOT_PW}') WHERE user = 'root'; DELETE FROM mysql.user WHERE user = ''; flush privileges;" | mysql -u root
if ! [ $? -eq 0 ] ; then
- echo "Failed to set password for 'root' MySQL user."
+ echo "Failed to set password for 'root' MySQL user." >&2
exit 1
fi
elif [ ! "${MYSQL_ROOT_PW+defined}" ] ; then
@@ -235,7 +235,7 @@ fi
echo "SELECT 1;" | mysql -u root ${MYSQL_ROOT_PW_ARG} > /dev/null
if ! [ $? -eq 0 ]
then
- echo "Failed to connect to the MySQL server. Please check your root user credentials."
+ echo "Failed to connect to the MySQL server. Please check your root user credentials." >&2
exit 1
fi
echo "Verified connectivity to MySQL."
@@ -292,7 +292,7 @@ rm $log_conf
echo "SELECT * FROM migrate_version;" | mysql -u heat --password=${MYSQL_HEAT_PW} heat > /dev/null
if ! [ $? -eq 0 ]
then
- echo "Final sanity check failed."
+ echo "Final sanity check failed." >&2
exit 1
fi
diff --git a/bin/heat-keystone-setup b/bin/heat-keystone-setup
index f74ae7df4..2ded3b24a 100755
--- a/bin/heat-keystone-setup
+++ b/bin/heat-keystone-setup
@@ -122,7 +122,7 @@ get_user() {
if [ -n "$user_id" ]; then
echo "Found existing $username user" >&2
- echo $user_id
+ echo $user_id >&2
else
echo "Creating $username user..." >&2
get_id openstack user create $username \
@@ -249,8 +249,8 @@ keystone_setup() {
fi
if [[ "$SERVICE_HOST" == "localhost" ]]; then
- echo "Warning: Endpoints will be registered as localhost, but this usually won't work."
- echo "Set SERVICE_HOST to a publicly accessible hostname/IP instead."
+ echo "Warning: Endpoints will be registered as localhost, but this usually won't work." >&2
+ echo "Set SERVICE_HOST to a publicly accessible hostname/IP instead." >&2
fi
echo ADMIN_ROLE $ADMIN_ROLE