
Victoria only supports focal, so the upgrade from victoria (starting from victoria+1) should use focal. This patch should not be backported to victoria, because the upgrades from ussuri still need to use bionic. In order to make it work on focal: - do not fail if ebtables does not contain the broute table (which happens when it is based on nft); - when the swift loopback image is remounted on upgrade, do not use the nobarrier option, which was removed with the 4.19 kernel. See also the corresponding change in devstack: I6871a7765e3e04122d8d546f43d36bb8415383fc Change-Id: If57c54828baf4e250ad08fdd95351490010e1b41
73 lines
2.1 KiB
Bash
Executable File
73 lines
2.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# ``save-state``
|
|
|
|
echo "*********************************************************************"
|
|
echo "Begin $0"
|
|
echo "*********************************************************************"
|
|
|
|
set -o errexit
|
|
|
|
# Clean up any resources that may be in use
|
|
cleanup() {
|
|
set +o errexit
|
|
|
|
echo "*********************************************************************"
|
|
echo "ERROR: Abort $0"
|
|
echo "*********************************************************************"
|
|
|
|
# Kill ourselves to signal any calling process
|
|
trap 2; kill -2 $$
|
|
}
|
|
|
|
# Keep track of the grenade directory
|
|
GRENADE_DIR=$(cd $(dirname "$0") && pwd)
|
|
|
|
# Source params
|
|
source $GRENADE_DIR/grenaderc
|
|
|
|
# Import common functions
|
|
source $GRENADE_DIR/functions
|
|
|
|
# Determine what system we are running on. This provides ``os_VENDOR``,
|
|
# ``os_RELEASE``, ``os_UPDATE``, ``os_PACKAGE``, ``os_CODENAME``
|
|
# and ``DISTRO``
|
|
GetDistro
|
|
|
|
|
|
# For debugging
|
|
set -o xtrace
|
|
|
|
|
|
# Save databases
|
|
# --------------
|
|
|
|
save_data $BASE_RELEASE $BASE_DEVSTACK_DIR
|
|
|
|
# Save ebtables/iptables
|
|
# ----------------------
|
|
|
|
# NOTE(sileht): If nova is not installed these tools are not present
|
|
if [[ $(type -P iptables-save) != "" ]]; then
|
|
sudo iptables-save >$SAVE_DIR/iptables.$BASE_RELEASE
|
|
fi
|
|
if [[ $(type -P ebtables) != "" ]]; then
|
|
# FIXME: ebtables may be available, but based on nft, and broute
|
|
# is not available -> do not end the script because of this
|
|
sudo ebtables -t broute -L >$SAVE_DIR/ebtables-broute.$BASE_RELEASE || true
|
|
sudo ebtables -t filter -L >$SAVE_DIR/ebtables-filter.$BASE_RELEASE
|
|
sudo ebtables -t nat -L >$SAVE_DIR/ebtables-nat.$BASE_RELEASE
|
|
fi
|
|
|
|
# Log RabbitMQ state
|
|
# ------------------
|
|
if $(source $BASE_DEVSTACK_DIR/stackrc; is_service_enabled rabbit); then
|
|
sudo rabbitmqctl list_queues messages consumers arguments name >$SAVE_DIR/rabbitmq-queues.txt
|
|
sudo rabbitmqctl report >$SAVE_DIR/rabbitmq-report.txt
|
|
fi
|
|
|
|
set +o xtrace
|
|
echo "*********************************************************************"
|
|
echo "SUCCESS: End $0"
|
|
echo "*********************************************************************"
|