diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-03-03 12:48:53 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-03-03 12:48:53 +0000 |
commit | c78ccddb6611a02b5935a3a93bbbf5d54bf154ae (patch) | |
tree | 6d9e9ead4be92b6bb3e31e8e6a8c191564fc4abf | |
parent | f8e58b621244a5873115510fca7ec2f66aac4958 (diff) | |
parent | 31b884a2a8749452ebd2923f6a97c5d2bec5aa9d (diff) |
Merge "Moves the swift start/stop into the common_functions.sh file"
-rwxr-xr-x | extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh | 6 | ||||
-rwxr-xr-x | extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh | 6 | ||||
-rwxr-xr-x | extraconfig/tasks/pacemaker_common_functions.sh | 9 |
3 files changed, 11 insertions, 10 deletions
diff --git a/extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh b/extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh index dcd4be95..bf2ee330 100755 --- a/extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh +++ b/extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh @@ -30,11 +30,7 @@ if [ "$(hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid)" = "$(facter hostname) fi # Swift isn't controled by pacemaker -for S in openstack-swift-account-auditor openstack-swift-account-reaper openstack-swift-account-replicator openstack-swift-account \ -openstack-swift-container-auditor openstack-swift-container-replicator openstack-swift-container-updater openstack-swift-container \ -openstack-swift-object-auditor openstack-swift-object-replicator openstack-swift-object-updater openstack-swift-object openstack-swift-proxy; do - systemctl stop $S -done +systemctl_swift stop tstart=$(date +%s) while systemctl is-active pacemaker; do diff --git a/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh b/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh index 0b92a3bb..10bea573 100755 --- a/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh +++ b/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh @@ -64,8 +64,4 @@ if [ "$(hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid)" = "$(facter hostname) fi # Swift isn't controled by heat -for S in openstack-swift-account-auditor openstack-swift-account-reaper openstack-swift-account-replicator openstack-swift-account \ -openstack-swift-container-auditor openstack-swift-container-replicator openstack-swift-container-updater openstack-swift-container \ -openstack-swift-object-auditor openstack-swift-object-replicator openstack-swift-object-updater openstack-swift-object openstack-swift-proxy; do - systemctl start $S -done +systemctl_swift start diff --git a/extraconfig/tasks/pacemaker_common_functions.sh b/extraconfig/tasks/pacemaker_common_functions.sh index 32d06c4a..ee3216e4 100755 --- a/extraconfig/tasks/pacemaker_common_functions.sh +++ b/extraconfig/tasks/pacemaker_common_functions.sh @@ -37,3 +37,12 @@ function check_resource { function echo_error { echo "$@" | tee /dev/fd2 } + +function systemctl_swift { + action=$1 + for S in openstack-swift-account-auditor openstack-swift-account-reaper openstack-swift-account-replicator openstack-swift-account \ + openstack-swift-container-auditor openstack-swift-container-replicator openstack-swift-container-updater openstack-swift-container \ + openstack-swift-object-auditor openstack-swift-object-replicator openstack-swift-object-updater openstack-swift-object openstack-swift-proxy; do + systemctl $action $S + done +} |