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
|
||||
|
||||
# Plugin version
|
||||
version: 2.0.19
|
||||
version: 2.0.20
|
||||
|
||||
# Description
|
||||
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/"
|
||||
FUEL_BOOTSTRAP_DIR="/var/www/nailgun/bootstrap/"
|
||||
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
|
||||
orig_uid=`cat $ORIG_BOOTSTRAP_VERSION_FILE`
|
||||
fuel-bootstrap activate $orig_uid
|
||||
\rm $ORIG_BOOTSTRAP_VERSION_FILE
|
||||
if [ -f $ORIG_BOOTSTRAP_VERSION_FILE ]; then
|
||||
orig_uid=`cat $ORIG_BOOTSTRAP_VERSION_FILE`
|
||||
fuel-bootstrap activate $orig_uid
|
||||
\rm $ORIG_BOOTSTRAP_VERSION_FILE
|
||||
fi
|
||||
|
||||
# Return orig yaml
|
||||
mv /etc/fuel-bootstrap-cli/fuel_bootstrap_cli.yaml.orig \
|
||||
/etc/fuel-bootstrap-cli/fuel_bootstrap_cli.yaml
|
||||
if [ -f $ORIG_BOOTSTRAP_CLI_YAML ]; then
|
||||
mv $ORIG_BOOTSTRAP_CLI_YAML $BOOTSTRAP_CLI_YAML
|
||||
fi
|
||||
|
||||
# Remove extra scripts
|
||||
\rm /sbin/reboot_bootstrap_nodes \
|
||||
/sbin/create_mellanox_vpi_bootstrap
|
||||
if [ -f "/sbin/reboot_bootstrap_nodes" ]; then
|
||||
\rm /sbin/reboot_bootstrap_nodes
|
||||
fi
|
||||
|
||||
if [ -f "/sbin/create_mellanox_vpi_bootstrap" ]; then
|
||||
\rm /sbin/create_mellanox_vpi_bootstrap
|
||||
fi
|
||||
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user