diff options
-rwxr-xr-x | deploy.sh | 6 | ||||
-rwxr-xr-x | deploy/launch.sh | 2 | ||||
-rw-r--r-- | deploy/opera_adapter.py | 2 | ||||
-rwxr-xr-x | deploy/prepare.sh | 2 | ||||
-rw-r--r-- | util/check_valid.py | 4 |
5 files changed, 12 insertions, 4 deletions
@@ -39,6 +39,12 @@ if [[ -z $DEPLOY_COMPASS && -z $DEPLOY_HOST && -z $REDEPLOY_HOST ]]; then fi LOG_DIR=$COMPASS_DIR/work/deploy/log +export LOG_DIR + mkdir -p $LOG_DIR $COMPASS_DIR/deploy/launch.sh $* 2>&1 | tee $LOG_DIR/compass-deploy.log + +if [[ $(tail -1 $LOG_DIR/compass-deploy.log) != 'compass deploy success' ]]; then + exit 1 +fi diff --git a/deploy/launch.sh b/deploy/launch.sh index 51b502f2..51094b29 100755 --- a/deploy/launch.sh +++ b/deploy/launch.sh @@ -148,3 +148,5 @@ if [[ ${DHA##*/} =~ "openo" ]]; then exit 1 fi fi + +echo 'compass deploy success' diff --git a/deploy/opera_adapter.py b/deploy/opera_adapter.py index f83638d7..137aba54 100644 --- a/deploy/opera_adapter.py +++ b/deploy/opera_adapter.py @@ -119,7 +119,7 @@ if __name__ == "__main__": dump_file(openo_config, openo_config_file) sync_admin_openrc(network, admin_openrc_file) - p2 = subprocess.Popen("sudo ./opera_launch.sh", cwd=opera_dir, shell=True) + p2 = subprocess.Popen("./opera_launch.sh", cwd=opera_dir, shell=True) p2.communicate() if p2.returncode != 0: print('./opera_launch.sh fail') diff --git a/deploy/prepare.sh b/deploy/prepare.sh index c2023223..b7e5bfa1 100755 --- a/deploy/prepare.sh +++ b/deploy/prepare.sh @@ -74,7 +74,7 @@ function _prepare_python_env() { else sudo apt-get update -y sudo apt-get install -y --force-yes mkisofs bc curl ipmitool openvswitch-switch - sudo apt-get install -y --force-yes git python-dev python-pip figlet + sudo apt-get install -y --force-yes git python-dev python-pip figlet sshpass sudo apt-get install -y --force-yes libxslt-dev libxml2-dev libvirt-dev build-essential qemu-utils qemu-kvm libvirt-bin virtinst libmysqld-dev sudo apt-get install -y --force-yes libffi-dev libssl-dev diff --git a/util/check_valid.py b/util/check_valid.py index 9eaa100d..e3ad6bcd 100644 --- a/util/check_valid.py +++ b/util/check_valid.py @@ -135,7 +135,7 @@ if __name__ == "__main__": _, dha_file, network_file = sys.argv if not os.path.exists(dha_file): - err_print("DHA file doesn't exit") + err_print("DHA file doesn't exist") sys.exit(1) else: dha = load_file(dha_file) @@ -148,7 +148,7 @@ if __name__ == "__main__": has_invalid = True if not os.path.exists(network_file): - err_print("NETWORK file doesn't exit") + err_print("NETWORK file doesn't exist") sys.exit(1) else: network = load_file(network_file) |