diff options
author | 2018-01-22 08:06:29 +0000 | |
---|---|---|
committer | 2018-01-22 08:06:29 +0000 | |
commit | 24e25de8fc981e3b33ffaa71e76f27dedcf6b89e (patch) | |
tree | c8b6970841f832ec2c543302a788b607cd70c208 /deploy/compass_vm.sh | |
parent | 057c5a072639c1feb1a7aa6312e9b6c309ea2f8b (diff) | |
parent | 4956657410d57861f9157167a291aefc437d9218 (diff) |
Merge "Support multi-cluster deploy"
Diffstat (limited to 'deploy/compass_vm.sh')
-rwxr-xr-x | deploy/compass_vm.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/deploy/compass_vm.sh b/deploy/compass_vm.sh index 7689f41c..cf215f3b 100755 --- a/deploy/compass_vm.sh +++ b/deploy/compass_vm.sh @@ -10,6 +10,26 @@ compass_vm_dir=$WORK_DIR/vm/compass rsa_file=$compass_vm_dir/boot.rsa ssh_args="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i $rsa_file" + +function check_container_alive() { + docker exec -it compass-deck bash -c "exit" 1>/dev/null 2>&1 + local deck_state=$? + docker exec -it compass-tasks bash -c "exit" 1>/dev/null 2>&1 + local tasks_state=$? + docker exec -it compass-cobbler bash -c "exit" 1>/dev/null 2>&1 + local cobbler_state=$? + docker exec -it compass-db bash -c "exit" 1>/dev/null 2>&1 + local db_state=$? + docker exec -it compass-mq bash -c "exit" 1>/dev/null 2>&1 + local mq_state=$? + + if [ $((deck_state||tasks_state||cobbler_state||db_state||mq-state)) == 0 ]; then + echo "true" + else + echo "false" + fi +} + function tear_down_compass() { sudo virsh destroy compass > /dev/null 2>&1 sudo virsh undefine compass > /dev/null 2>&1 |