Merge "Pass public_addr to ceph::profile::params instead of ceph::mon"
[apex-tripleo-heat-templates.git] / extraconfig / tasks / major_upgrade_ceph_storage.sh
1 #!/bin/bash
2 #
3 # This delivers the ceph-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 ceph-storage nodes as part of the
13 ### tripleo upgrades workflow
14
15
16 function systemctl_ceph {
17     action=\$1
18     systemctl \$action ceph
19 }
20
21 # "so that mirrors aren't rebalanced as if the OSD died" - gfidente
22 ceph osd set noout
23
24 systemctl_ceph stop
25 yum -y install python-zaqarclient  # needed for os-collect-config
26 yum -y update
27 systemctl_ceph start
28
29 ceph osd unset noout
30
31 ENDOFCAT
32
33 # ensure the permissions are OK
34 chmod 0755 $UPGRADE_SCRIPT
35