Add verification for uninstall process
In order to avoid removal of files during upgrade Change-Id: Idc02cd704ba44dd51f7691733c36e06dc787a859
This commit is contained in:
parent
666cdb7c09
commit
5e63997de9
|
@ -5,7 +5,7 @@ name: mellanox-plugin
|
||||||
title: Mellanox Openstack features
|
title: Mellanox Openstack features
|
||||||
|
|
||||||
# Plugin version
|
# Plugin version
|
||||||
version: 2.0.19
|
version: 2.0.20
|
||||||
|
|
||||||
# Description
|
# Description
|
||||||
description: Enable features over Mellanox hardware
|
description: Enable features over Mellanox hardware
|
||||||
|
|
|
@ -2,3 +2,5 @@ MELLANOX_PLUGIN_NAME="mellanox-plugin-2.0"
|
||||||
PLUGIN_SCRIPTS_DIR="/var/www/nailgun/plugins/$MELLANOX_PLUGIN_NAME/scripts/"
|
PLUGIN_SCRIPTS_DIR="/var/www/nailgun/plugins/$MELLANOX_PLUGIN_NAME/scripts/"
|
||||||
FUEL_BOOTSTRAP_DIR="/var/www/nailgun/bootstrap/"
|
FUEL_BOOTSTRAP_DIR="/var/www/nailgun/bootstrap/"
|
||||||
ORIG_BOOTSTRAP_VERSION_FILE="/opt/orig_bootstrap.txt"
|
ORIG_BOOTSTRAP_VERSION_FILE="/opt/orig_bootstrap.txt"
|
||||||
|
BOOTSTRAP_CLI_YAML="/etc/fuel-bootstrap-cli/fuel_bootstrap_cli.yaml"
|
||||||
|
ORIG_BOOTSTRAP_CLI_YAML="/etc/fuel-bootstrap-cli/fuel_bootstrap_cli.yaml.orig"
|
||||||
|
|
29
uninstall.sh
29
uninstall.sh
|
@ -1,17 +1,28 @@
|
||||||
source /var/www/nailgun/plugins/mellanox-plugin*/scripts/common
|
|
||||||
|
|
||||||
if [ -d $FUEL_BOOTSTRAP_DIR ]; then
|
# Verify run is over Fuel Master and we are not During upgrade
|
||||||
|
if [ -d $FUEL_BOOTSTRAP_DIR ] && [ $1 -eq 0 ]; then
|
||||||
|
|
||||||
|
source /var/www/nailgun/plugins/mellanox-plugin*/scripts/common
|
||||||
|
|
||||||
# Return orig active bootstrap
|
# Return orig active bootstrap
|
||||||
orig_uid=`cat $ORIG_BOOTSTRAP_VERSION_FILE`
|
if [ -f $ORIG_BOOTSTRAP_VERSION_FILE ]; then
|
||||||
fuel-bootstrap activate $orig_uid
|
orig_uid=`cat $ORIG_BOOTSTRAP_VERSION_FILE`
|
||||||
\rm $ORIG_BOOTSTRAP_VERSION_FILE
|
fuel-bootstrap activate $orig_uid
|
||||||
|
\rm $ORIG_BOOTSTRAP_VERSION_FILE
|
||||||
|
fi
|
||||||
|
|
||||||
# Return orig yaml
|
# Return orig yaml
|
||||||
mv /etc/fuel-bootstrap-cli/fuel_bootstrap_cli.yaml.orig \
|
if [ -f $ORIG_BOOTSTRAP_CLI_YAML ]; then
|
||||||
/etc/fuel-bootstrap-cli/fuel_bootstrap_cli.yaml
|
mv $ORIG_BOOTSTRAP_CLI_YAML $BOOTSTRAP_CLI_YAML
|
||||||
|
fi
|
||||||
|
|
||||||
# Remove extra scripts
|
# Remove extra scripts
|
||||||
\rm /sbin/reboot_bootstrap_nodes \
|
if [ -f "/sbin/reboot_bootstrap_nodes" ]; then
|
||||||
/sbin/create_mellanox_vpi_bootstrap
|
\rm /sbin/reboot_bootstrap_nodes
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "/sbin/create_mellanox_vpi_bootstrap" ]; then
|
||||||
|
\rm /sbin/create_mellanox_vpi_bootstrap
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue