summaryrefslogtreecommitdiffstats
path: root/deploy/compass_vm.sh
diff options
context:
space:
mode:
authorHarry Huang <huangxiangyu5@huawei.com>2017-06-26 12:22:59 +0800
committerJustin chi <chigang@huawei.com>2017-07-15 06:18:53 +0000
commit588f2fa381c12e899843a0ab1235bcb0d57b49af (patch)
tree7423915494ae02c78b6907eb9c4c8665763b59e3 /deploy/compass_vm.sh
parent37d0565a0277263d11023b62562d130bdd9ee997 (diff)
Adjust redeploy
When deployment is interrupted (e.g. ctrl+c kill deploy.sh), ansible processes in compass-tasks are still running. Redeploy at this situation new ansible process will be affacted by remained ones which cause errors. Change-Id: I821445bd53397c7030145bf6dc925032cb42519c Signed-off-by: Harry Huang <huangxiangyu5@huawei.com>
Diffstat (limited to 'deploy/compass_vm.sh')
-rwxr-xr-xdeploy/compass_vm.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/deploy/compass_vm.sh b/deploy/compass_vm.sh
index 42fca803..971db056 100755
--- a/deploy/compass_vm.sh
+++ b/deploy/compass_vm.sh
@@ -93,6 +93,8 @@ function inject_compass_conf() {
function refresh_compass_core () {
sudo docker exec compass-deck bash -c "/opt/compass/bin/manage_db.py createdb"
sudo docker exec compass-deck bash -c "/root/compass-deck/bin/clean_installers.py"
+ sudo docker exec compass-tasks bash -c \
+ "ps aux | grep -E '[a]nsible-playbook|[o]penstack-ansible' | awk '{print \$2}' | xargs kill -9"
sudo rm -rf $WORK_DIR/docker/ansible/run/*
}