From a8f12bed43703261d23bcd11d650ceffcf4fe5c3 Mon Sep 17 00:00:00 2001 From: David Blaisonneau Date: Fri, 8 Jan 2016 16:47:23 +0100 Subject: Go back to previous password changing method to avoid nounset error Change-Id: I552f4fe7451561f7031ce3814cbd0fa2d0feb250 Signed-off-by: David Blaisonneau --- jjb/joid/joid-deploy.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/jjb/joid/joid-deploy.sh b/jjb/joid/joid-deploy.sh index 59c66e418..53255a3ff 100644 --- a/jjb/joid/joid-deploy.sh +++ b/jjb/joid/joid-deploy.sh @@ -16,6 +16,10 @@ mkdir -p $LAB_CONFIG if [ -e "$LAB_CONFIG/$PWD_FILENAME" ]; then echo "------ Load local passwords ------" source $LAB_CONFIG/$PWD_FILENAME +else + export MAAS_USER=ubuntu + export MAAS_PASSWORD=ubuntu + export OS_ADMIN_PASSWORD=openstack fi ## @@ -41,12 +45,8 @@ if [ -e "$LAB_CONFIG/environments.yaml" ] && [ "$MAAS_REINSTALL" == "false" ]; t else MAASCONFIG=$WORKSPACE/ci/maas/${POD/-*}/${POD/*-}/deployment.yaml echo "------ Set MAAS password ------" - if [ -n "$MAAS_USER" ]; then - sed -i -- "s/user: ubuntu/user: $MAAS_USER/" $MAASCONFIG - fi - if [ -n "$MAAS_PASSWORD" ]; then - sed -i -- "s/password: ubuntu/password: $MAAS_PASSWORD/" $MAASCONFIG - fi + sed -i -- "s/user: ubuntu/user: $MAAS_USER/" $MAASCONFIG + sed -i -- "s/password: ubuntu/password: $MAAS_PASSWORD/" $MAASCONFIG echo "------ Redeploy MAAS ------" ./02-maasdeploy.sh $POD_NAME RES=$? @@ -70,9 +70,7 @@ fi # Modify files echo "------ Set openstack password ------" -if [ -n "$OS_ADMIN_PASSWORD" ]; then - sed -i -- "s/\"admin-password\": openstack/\"admin-password\": $OS_ADMIN_PASSWORD/" $SRCBUNDLE -fi +sed -i -- "s/\"admin-password\": openstack/\"admin-password\": $OS_ADMIN_PASSWORD/" $SRCBUNDLE echo "------ Set ceph disks ------" if [ -z "$CEPH_DISKS_CONTROLLERS" ]; then -- cgit 1.2.3-korg