Merge "Reconfigure interfaces before updating openvswitch" into stable/newton
This commit is contained in:
commit
eed982876f
|
@ -5,7 +5,7 @@
|
|||
set -eu
|
||||
|
||||
# Special-case OVS for https://bugs.launchpad.net/tripleo/+bug/1669714
|
||||
special_case_ovs_upgrade_if_needed
|
||||
update_network
|
||||
|
||||
yum -y install python-zaqarclient # needed for os-collect-config
|
||||
yum -y -q update
|
||||
|
|
|
@ -9,6 +9,7 @@ set -o pipefail
|
|||
UPGRADE_SCRIPT=/root/tripleo_upgrade_node.sh
|
||||
|
||||
declare -f special_case_ovs_upgrade_if_needed > $UPGRADE_SCRIPT
|
||||
declare -f update_network >> $UPGRADE_SCRIPT
|
||||
# use >> here so we don't lose the declaration we added above
|
||||
cat >> $UPGRADE_SCRIPT << 'ENDOFCAT'
|
||||
#!/bin/bash
|
||||
|
@ -51,7 +52,7 @@ timeout 60 bash -c "while kill -0 ${OSD_PIDS} 2> /dev/null; do
|
|||
sleep 2;
|
||||
done"
|
||||
|
||||
special_case_ovs_upgrade_if_needed
|
||||
update_network
|
||||
|
||||
# Update (Ceph to Jewel)
|
||||
yum -y install python-zaqarclient # needed for os-collect-config
|
||||
|
|
|
@ -20,7 +20,8 @@ crudini --set /etc/nova/nova.conf upgrade_levels compute $upgrade_level_nova_co
|
|||
|
||||
# Special-case OVS for https://bugs.launchpad.net/tripleo/+bug/1669714
|
||||
$(declare -f special_case_ovs_upgrade_if_needed)
|
||||
special_case_ovs_upgrade_if_needed
|
||||
$(declare -f update_network)
|
||||
update_network
|
||||
|
||||
yum -y install python-zaqarclient # needed for os-collect-config
|
||||
yum -y update
|
||||
|
|
|
@ -100,7 +100,7 @@ if [ $DO_MYSQL_UPGRADE -eq 1 ]; then
|
|||
fi
|
||||
|
||||
# Special-case OVS for https://bugs.launchpad.net/tripleo/+bug/1669714
|
||||
special_case_ovs_upgrade_if_needed
|
||||
update_network
|
||||
|
||||
if grep -q '^pipeline = ssl_header_handler faultwrap osvolumeversionapp' /etc/cinder/api-paste.ini; then
|
||||
# Revert back cinder SSL setup as it's going to be handled by wsgi.
|
||||
|
|
|
@ -24,7 +24,8 @@ function systemctl_swift {
|
|||
}
|
||||
|
||||
$(declare -f special_case_ovs_upgrade_if_needed)
|
||||
special_case_ovs_upgrade_if_needed
|
||||
$(declare -f update_network)
|
||||
update_network
|
||||
|
||||
systemctl_swift stop
|
||||
|
||||
|
|
|
@ -322,3 +322,26 @@ function special_case_ovs_upgrade_if_needed {
|
|||
|
||||
}
|
||||
|
||||
# update os-net-config before ovs see https://bugs.launchpad.net/tripleo/+bug/1695893
|
||||
function update_network() {
|
||||
set +e
|
||||
yum -q -y update os-net-config
|
||||
return_code=$?
|
||||
echo "yum update os-net-config return code: $return_code"
|
||||
|
||||
# Writes any changes caused by alterations to os-net-config and bounces the
|
||||
# interfaces *before* restarting the cluster.
|
||||
os-net-config -c /etc/os-net-config/config.json -v --detailed-exit-codes
|
||||
|
||||
RETVAL=$?
|
||||
if [[ $RETVAL == 2 ]]; then
|
||||
echo "os-net-config: interface configuration files updated successfully"
|
||||
elif [[ $RETVAL != 0 ]]; then
|
||||
echo "ERROR: os-net-config configuration failed"
|
||||
exit $RETVAL
|
||||
fi
|
||||
set -e
|
||||
|
||||
# special case https://bugs.launchpad.net/tripleo/+bug/1635205 +bug/1669714
|
||||
special_case_ovs_upgrade_if_needed
|
||||
}
|
||||
|
|
|
@ -77,9 +77,6 @@ if [[ "$pacemaker_status" == "active" && \
|
|||
fi
|
||||
fi
|
||||
|
||||
# special case https://bugs.launchpad.net/tripleo/+bug/1635205 +bug/1669714
|
||||
special_case_ovs_upgrade_if_needed
|
||||
|
||||
if [[ "$pacemaker_status" == "active" ]] ; then
|
||||
echo "Pacemaker running, stopping cluster node and doing full package update"
|
||||
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
|
|||
else
|
||||
pcs cluster stop
|
||||
fi
|
||||
update_network
|
||||
else
|
||||
update_network
|
||||
echo "Upgrading openstack-puppet-modules and its dependencies"
|
||||
yum -q -y update openstack-puppet-modules
|
||||
yum deplist openstack-puppet-modules | awk '/dependency/{print $2}' | xargs yum -q -y update
|
||||
|
@ -107,17 +106,6 @@ return_code=$?
|
|||
echo "$result"
|
||||
echo "yum return code: $return_code"
|
||||
|
||||
# Writes any changes caused by alterations to os-net-config and bounces the
|
||||
# interfaces *before* restarting the cluster.
|
||||
os-net-config -c /etc/os-net-config/config.json -v --detailed-exit-codes
|
||||
RETVAL=$?
|
||||
if [[ $RETVAL == 2 ]]; then
|
||||
echo "os-net-config: interface configuration files updated successfully"
|
||||
elif [[ $RETVAL != 0 ]]; then
|
||||
echo "ERROR: os-net-config configuration failed"
|
||||
exit $RETVAL
|
||||
fi
|
||||
|
||||
if [[ "$pacemaker_status" == "active" ]] ; then
|
||||
echo "Starting cluster node"
|
||||
pcs cluster start
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
fixes:
|
||||
- os-net-config is updated and executed before other packages to avoid
|
||||
premature restart of Open vSwitch.
|
Loading…
Reference in New Issue