Merge "Set /64 cidr_netmask for pcmk VIPs when IPv6"
[apex-tripleo-heat-templates.git] / extraconfig / tasks / major_upgrade_object_storage.sh
1 #!/bin/bash
2 #
3 # This delivers the swift-storage upgrade script to be invoked as part of the tripleo
4 # major upgrade workflow.
5 #
6 set -eu
7
8 UPGRADE_SCRIPT=/root/tripleo_upgrade_node.sh
9
10 cat > $UPGRADE_SCRIPT << ENDOFCAT
11 ### DO NOT MODIFY THIS FILE
12 ### This file is automatically delivered to the swift-storage nodes as part of the
13 ### tripleo upgrades workflow
14
15
16 function systemctl_swift {
17     action=$1
18     for S in openstack-swift-account-auditor openstack-swift-account-reaper openstack-swift-account-replicator openstack-swift-account \
19              openstack-swift-container-auditor openstack-swift-container-replicator openstack-swift-container-updater openstack-swift-container \
20              openstack-swift-object-auditor openstack-swift-object-replicator openstack-swift-object-updater openstack-swift-object openstack-swift-proxy; do
21                 systemctl $action $S
22     done
23 }
24
25
26 systemctl_swift stop
27
28 yum -y update
29
30 systemctl_swift start
31
32
33
34 ENDOFCAT
35
36 # ensure the permissions are OK
37 chmod 0755 $UPGRADE_SCRIPT
38