From 588f2fa381c12e899843a0ab1235bcb0d57b49af Mon Sep 17 00:00:00 2001 From: Harry Huang Date: Mon, 26 Jun 2017 12:22:59 +0800 Subject: 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 --- deploy/compass_vm.sh | 2 ++ 1 file changed, 2 insertions(+) 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/* } -- cgit 1.2.3-korg