summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-16 08:49:35 +0000
committerGerrit Code Review <review@openstack.org>2017-06-16 08:49:35 +0000
commiteed982876f86b891c2c340b2a506817eef9792d1 (patch)
tree6360f461812c25309b60b147e133347f47afebf2
parent40cdd83ef5d0be7dabc0c6ce8c95045c0f7389e5 (diff)
parent9f8ba2c052e04c1ba8db756a48181a54c9cd8f68 (diff)
Merge "Reconfigure interfaces before updating openvswitch" into stable/newton
-rw-r--r--extraconfig/tasks/major_upgrade_block_storage.sh2
-rw-r--r--extraconfig/tasks/major_upgrade_ceph_storage.sh3
-rw-r--r--extraconfig/tasks/major_upgrade_compute.sh3
-rwxr-xr-xextraconfig/tasks/major_upgrade_controller_pacemaker_2.sh2
-rw-r--r--extraconfig/tasks/major_upgrade_object_storage.sh3
-rwxr-xr-xextraconfig/tasks/pacemaker_common_functions.sh23
-rwxr-xr-xextraconfig/tasks/yum_update.sh16
-rw-r--r--releasenotes/notes/update-interfaces-first-f3c214ee9bdc1587.yaml4
8 files changed, 37 insertions, 19 deletions
diff --git a/extraconfig/tasks/major_upgrade_block_storage.sh b/extraconfig/tasks/major_upgrade_block_storage.sh
index 0438a27..bc7b8f9 100644
--- a/extraconfig/tasks/major_upgrade_block_storage.sh
+++ b/extraconfig/tasks/major_upgrade_block_storage.sh
@@ -5,7 +5,7 @@
5set -eu 5set -eu
6 6
7# Special-case OVS for https://bugs.launchpad.net/tripleo/+bug/1669714 7# Special-case OVS for https://bugs.launchpad.net/tripleo/+bug/1669714
8special_case_ovs_upgrade_if_needed 8update_network
9 9
10yum -y install python-zaqarclient # needed for os-collect-config 10yum -y install python-zaqarclient # needed for os-collect-config
11yum -y -q update 11yum -y -q update
diff --git a/extraconfig/tasks/major_upgrade_ceph_storage.sh b/extraconfig/tasks/major_upgrade_ceph_storage.sh
index c327f2a..d597696 100644
--- a/extraconfig/tasks/major_upgrade_ceph_storage.sh
+++ b/extraconfig/tasks/major_upgrade_ceph_storage.sh
@@ -9,6 +9,7 @@ set -o pipefail
9UPGRADE_SCRIPT=/root/tripleo_upgrade_node.sh 9UPGRADE_SCRIPT=/root/tripleo_upgrade_node.sh
10 10
11declare -f special_case_ovs_upgrade_if_needed > $UPGRADE_SCRIPT 11declare -f special_case_ovs_upgrade_if_needed > $UPGRADE_SCRIPT
12declare -f update_network >> $UPGRADE_SCRIPT
12# use >> here so we don't lose the declaration we added above 13# use >> here so we don't lose the declaration we added above
13cat >> $UPGRADE_SCRIPT << 'ENDOFCAT' 14cat >> $UPGRADE_SCRIPT << 'ENDOFCAT'
14#!/bin/bash 15#!/bin/bash
@@ -51,7 +52,7 @@ timeout 60 bash -c "while kill -0 ${OSD_PIDS} 2> /dev/null; do
51 sleep 2; 52 sleep 2;
52done" 53done"
53 54
54special_case_ovs_upgrade_if_needed 55update_network
55 56
56# Update (Ceph to Jewel) 57# Update (Ceph to Jewel)
57yum -y install python-zaqarclient # needed for os-collect-config 58yum -y install python-zaqarclient # needed for os-collect-config
diff --git a/extraconfig/tasks/major_upgrade_compute.sh b/extraconfig/tasks/major_upgrade_compute.sh
index 0409bcf..86b7ffb 100644
--- a/extraconfig/tasks/major_upgrade_compute.sh
+++ b/extraconfig/tasks/major_upgrade_compute.sh
@@ -20,7 +20,8 @@ crudini --set /etc/nova/nova.conf upgrade_levels compute $upgrade_level_nova_co
20 20
21# Special-case OVS for https://bugs.launchpad.net/tripleo/+bug/1669714 21# Special-case OVS for https://bugs.launchpad.net/tripleo/+bug/1669714
22$(declare -f special_case_ovs_upgrade_if_needed) 22$(declare -f special_case_ovs_upgrade_if_needed)
23special_case_ovs_upgrade_if_needed 23$(declare -f update_network)
24update_network
24 25
25yum -y install python-zaqarclient # needed for os-collect-config 26yum -y install python-zaqarclient # needed for os-collect-config
26yum -y update 27yum -y update
diff --git a/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh b/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh
index ae0a0b8..5f1da22 100755
--- a/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh
+++ b/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh
@@ -100,7 +100,7 @@ if [ $DO_MYSQL_UPGRADE -eq 1 ]; then
100fi 100fi
101 101
102# Special-case OVS for https://bugs.launchpad.net/tripleo/+bug/1669714 102# Special-case OVS for https://bugs.launchpad.net/tripleo/+bug/1669714
103special_case_ovs_upgrade_if_needed 103update_network
104 104
105if grep -q '^pipeline = ssl_header_handler faultwrap osvolumeversionapp' /etc/cinder/api-paste.ini; then 105if grep -q '^pipeline = ssl_header_handler faultwrap osvolumeversionapp' /etc/cinder/api-paste.ini; then
106 # Revert back cinder SSL setup as it's going to be handled by wsgi. 106 # Revert back cinder SSL setup as it's going to be handled by wsgi.
diff --git a/extraconfig/tasks/major_upgrade_object_storage.sh b/extraconfig/tasks/major_upgrade_object_storage.sh
index d9d1b4d..9f9aa69 100644
--- a/extraconfig/tasks/major_upgrade_object_storage.sh
+++ b/extraconfig/tasks/major_upgrade_object_storage.sh
@@ -24,7 +24,8 @@ function systemctl_swift {
24} 24}
25 25
26$(declare -f special_case_ovs_upgrade_if_needed) 26$(declare -f special_case_ovs_upgrade_if_needed)
27special_case_ovs_upgrade_if_needed 27$(declare -f update_network)
28update_network
28 29
29systemctl_swift stop 30systemctl_swift stop
30 31
diff --git a/extraconfig/tasks/pacemaker_common_functions.sh b/extraconfig/tasks/pacemaker_common_functions.sh
index 4480f74..37c6516 100755
--- a/extraconfig/tasks/pacemaker_common_functions.sh
+++ b/extraconfig/tasks/pacemaker_common_functions.sh
@@ -322,3 +322,26 @@ function special_case_ovs_upgrade_if_needed {
322 322
323} 323}
324 324
325# update os-net-config before ovs see https://bugs.launchpad.net/tripleo/+bug/1695893
326function update_network() {
327 set +e
328 yum -q -y update os-net-config
329 return_code=$?
330 echo "yum update os-net-config return code: $return_code"
331
332 # Writes any changes caused by alterations to os-net-config and bounces the
333 # interfaces *before* restarting the cluster.
334 os-net-config -c /etc/os-net-config/config.json -v --detailed-exit-codes
335
336 RETVAL=$?
337 if [[ $RETVAL == 2 ]]; then
338 echo "os-net-config: interface configuration files updated successfully"
339 elif [[ $RETVAL != 0 ]]; then
340 echo "ERROR: os-net-config configuration failed"
341 exit $RETVAL
342 fi
343 set -e
344
345 # special case https://bugs.launchpad.net/tripleo/+bug/1635205 +bug/1669714
346 special_case_ovs_upgrade_if_needed
347}
diff --git a/extraconfig/tasks/yum_update.sh b/extraconfig/tasks/yum_update.sh
index b971a13..4a2c6cc 100755
--- a/extraconfig/tasks/yum_update.sh
+++ b/extraconfig/tasks/yum_update.sh
@@ -77,9 +77,6 @@ if [[ "$pacemaker_status" == "active" && \
77 fi 77 fi
78fi 78fi
79 79
80# special case https://bugs.launchpad.net/tripleo/+bug/1635205 +bug/1669714
81special_case_ovs_upgrade_if_needed
82
83if [[ "$pacemaker_status" == "active" ]] ; then 80if [[ "$pacemaker_status" == "active" ]] ; then
84 echo "Pacemaker running, stopping cluster node and doing full package update" 81 echo "Pacemaker running, stopping cluster node and doing full package update"
85 node_count=$(pcs status xml | grep -o "<nodes_configured.*/>" | grep -o 'number="[0-9]*"' | grep -o "[0-9]*") 82 node_count=$(pcs status xml | grep -o "<nodes_configured.*/>" | grep -o 'number="[0-9]*"' | grep -o "[0-9]*")
@@ -89,7 +86,9 @@ if [[ "$pacemaker_status" == "active" ]] ; then
89 else 86 else
90 pcs cluster stop 87 pcs cluster stop
91 fi 88 fi
89 update_network
92else 90else
91 update_network
93 echo "Upgrading openstack-puppet-modules and its dependencies" 92 echo "Upgrading openstack-puppet-modules and its dependencies"
94 yum -q -y update openstack-puppet-modules 93 yum -q -y update openstack-puppet-modules
95 yum deplist openstack-puppet-modules | awk '/dependency/{print $2}' | xargs yum -q -y update 94 yum deplist openstack-puppet-modules | awk '/dependency/{print $2}' | xargs yum -q -y update
@@ -107,17 +106,6 @@ return_code=$?
107echo "$result" 106echo "$result"
108echo "yum return code: $return_code" 107echo "yum return code: $return_code"
109 108
110# Writes any changes caused by alterations to os-net-config and bounces the
111# interfaces *before* restarting the cluster.
112os-net-config -c /etc/os-net-config/config.json -v --detailed-exit-codes
113RETVAL=$?
114if [[ $RETVAL == 2 ]]; then
115 echo "os-net-config: interface configuration files updated successfully"
116elif [[ $RETVAL != 0 ]]; then
117 echo "ERROR: os-net-config configuration failed"
118 exit $RETVAL
119fi
120
121if [[ "$pacemaker_status" == "active" ]] ; then 109if [[ "$pacemaker_status" == "active" ]] ; then
122 echo "Starting cluster node" 110 echo "Starting cluster node"
123 pcs cluster start 111 pcs cluster start
diff --git a/releasenotes/notes/update-interfaces-first-f3c214ee9bdc1587.yaml b/releasenotes/notes/update-interfaces-first-f3c214ee9bdc1587.yaml
new file mode 100644
index 0000000..4b9ab58
--- /dev/null
+++ b/releasenotes/notes/update-interfaces-first-f3c214ee9bdc1587.yaml
@@ -0,0 +1,4 @@
1---
2fixes:
3 - os-net-config is updated and executed before other packages to avoid
4 premature restart of Open vSwitch.