Browse Source

Add upgrade-horizon

Upgrade horizon along with the rest of devstack before running new
devstack tests and tempest.

upgrade-horizon is based off of upgrade-keystone.

Change-Id: I6a6e4da06806cb840d7af673673e06f34eb297e0
Related-Bug: #1265057
(cherry picked from commit e9546e66e6)
tags/havana-eol^2
Joe Gordon 7 years ago
committed by Joshua Hesketh
parent
commit
97fea9b267
4 changed files with 106 additions and 0 deletions
  1. +10
    -0
      from-grizzly/upgrade-horizon
  2. +11
    -0
      functions
  3. +5
    -0
      grenade.sh
  4. +80
    -0
      upgrade-horizon

+ 10
- 0
from-grizzly/upgrade-horizon View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash

# ``upgrade-horizon``

configure_horizon_upgrade(){
set -o xtrace
# nothing to see here yet
set +o xtrace
}


+ 11
- 0
functions View File

@@ -1675,6 +1675,17 @@ function policy_add() {
}


# Returns openstack release name for a given branch name
function get_release_name_from_branch(){
local branch=$1
if [[ $branch =~ "stable/" ]]; then
echo ${branch#*/}
else
echo "master"
fi
}


# Restore xtrace
$XTRACE



+ 5
- 0
grenade.sh View File

@@ -280,6 +280,11 @@ if [[ "$RUN_TARGET" == "True" ]]; then
stop $STOP upgrade-tempest 290
fi

# Upgrade Horizon
echo_summary "Running upgrade-horizon"
$GRENADE_DIR/upgrade-horizon || die $LINENO "Failure in upgrade-horizon"
stop $STOP upgrade-horizon 240

# Upgrade Checks
echo_summary "Running upgrade sanity check"
$GRENADE_DIR/check-sanity || die $LINENO "Failure in check-sanity"


+ 80
- 0
upgrade-horizon View File

@@ -0,0 +1,80 @@
#!/usr/bin/env bash

# ``upgrade-horizon``

echo "*********************************************************************"
echo "Begin $0"
echo "*********************************************************************"

# 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 $$
}

trap cleanup SIGHUP SIGINT SIGTERM

# Keep track of the grenade directory
GRENADE_DIR=$(cd $(dirname "$0") && pwd)

# 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

# Source params
source $GRENADE_DIR/grenaderc

# This script exits on an error so that errors don't compound and you see
# only the first error that occurred.
set -o errexit

# Print the commands being run so that we can see the command that triggers
# an error. It is also useful for following allowing as the install occurs.
set -o xtrace

# Set for DevStack compatibility
TOP_DIR=$TARGET_DEVSTACK_DIR


# Upgrade Horizon
# ================

# Get functions from current DevStack
source $TARGET_DEVSTACK_DIR/stackrc
source $TARGET_DEVSTACK_DIR/lib/horizon
source $TARGET_DEVSTACK_DIR/lib/apache


# stop horizon apache server
stop_horizon
# Kill horizon screen session
screen -S $SCREEN_NAME -p horizon -X kill

# Save current config files for posterity
#TODO

# install_horizon()
install_horizon

# calls upgrade-horizon for specific release
upgrade_dir=$(get_release_name_from_branch $BASE_DEVSTACK_BRANCH)
source $GRENADE_DIR/"from-"$upgrade_dir/${0##*/}
configure_horizon_upgrade

# Start Horizon
start_horizon

set +o xtrace
echo "*********************************************************************"
echo "SUCCESS: End $0"
echo "*********************************************************************"

Loading…
Cancel
Save