Merge "os-net-config not run when conf is empty and re-introduce exception." into stable/newton
This commit is contained in:
commit
78c72a9e7f
|
@ -8,6 +8,7 @@ set -o pipefail
|
|||
|
||||
UPGRADE_SCRIPT=/root/tripleo_upgrade_node.sh
|
||||
|
||||
declare -f update_os_net_config > $UPGRADE_SCRIPT
|
||||
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
|
||||
|
|
|
@ -19,6 +19,7 @@ set -eu
|
|||
crudini --set /etc/nova/nova.conf upgrade_levels compute $upgrade_level_nova_compute
|
||||
|
||||
# Special-case OVS for https://bugs.launchpad.net/tripleo/+bug/1669714
|
||||
$(declare -f update_os_net_config)
|
||||
$(declare -f special_case_ovs_upgrade_if_needed)
|
||||
$(declare -f update_network)
|
||||
update_network
|
||||
|
|
|
@ -111,8 +111,7 @@ if [ $DO_MYSQL_UPGRADE -eq 1 ]; then
|
|||
mv /var/lib/mysql $MYSQL_TEMP_UPGRADE_BACKUP_DIR
|
||||
fi
|
||||
|
||||
update_os_net_config
|
||||
# Special-case OVS for https://bugs.launchpad.net/tripleo/+bug/1669714
|
||||
# Special-case for network.
|
||||
update_network
|
||||
|
||||
if grep -q '^pipeline = ssl_header_handler faultwrap osvolumeversionapp' /etc/cinder/api-paste.ini; then
|
||||
|
|
|
@ -23,6 +23,7 @@ function systemctl_swift {
|
|||
done
|
||||
}
|
||||
|
||||
$(declare -f update_os_net_config)
|
||||
$(declare -f special_case_ovs_upgrade_if_needed)
|
||||
$(declare -f update_network)
|
||||
update_network
|
||||
|
|
|
@ -353,8 +353,8 @@ function update_os_net_config() {
|
|||
if [ -n "${need_update}" ]; then
|
||||
yum -q -y update os-net-config
|
||||
local return_code=$?
|
||||
log_debug "yum update os-net-config return code: $return_code"
|
||||
|
||||
echo "`date` yum update os-net-config return code: $return_code"
|
||||
if [ -s "/etc/os-net-config/config.json" ]; then
|
||||
# We're just make sure that os-net-config won't ifdown/ifup
|
||||
# network interfaces. The current set of changes (Tue Oct 3
|
||||
# 17:38:37 CEST 2017) doesn't require the os-net-config change
|
||||
|
@ -363,16 +363,20 @@ function update_os_net_config() {
|
|||
--detailed-exit-codes
|
||||
local os_net_retval=$?
|
||||
if [[ $os_net_retval == 2 ]]; then
|
||||
log_debug "os-net-config: interface configuration files updated successfully"
|
||||
echo "`date` os-net-config: interface configuration files updated successfully"
|
||||
elif [[ $os_net_retval != 0 ]]; then
|
||||
log_debug "ERROR: os-net-config configuration failed"
|
||||
echo "`date` ERROR: os-net-config configuration failed"
|
||||
exit $os_net_retval
|
||||
fi
|
||||
else
|
||||
echo "`date` /etc/os-net-config/config.json doesn't exist or is empty. No need to run os-net-config."
|
||||
fi
|
||||
fi
|
||||
set -e
|
||||
}
|
||||
|
||||
function update_network() {
|
||||
update_os_net_config
|
||||
# special case https://bugs.launchpad.net/tripleo/+bug/1635205 +bug/1669714
|
||||
special_case_ovs_upgrade_if_needed
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue