Al Bailey 16b393f3ab Cleanup openstack components from patch scripts and tests
There were several example patch templates that demonstrated
how to patch some of the openstack processes.
Most of those openstack processes have been removed from bare
metal, so these scripts have been updated or removed.

Story: 2004764
Task: 30343
Change-Id: Ie6339d9f2dbf12e7d1a2b689676cca866b844a83
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
2019-04-04 09:39:18 -05:00

55 lines
1.3 KiB
Bash

#!/bin/bash
#
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
#
# This script provides an example in-service patching restart for Horizon and Sysinv processes
#
#
# The patching subsystem provides a patch-functions bash source file
# with useful function and variable definitions.
#
. /etc/patching/patch-functions
#
# We can now check to see what type of node we're on, if it's locked, etc,
# and act accordingly
#
#
# Declare an overall script return code
#
declare -i GLOBAL_RC=$PATCH_STATUS_OK
# NOTE: The following restart example code could be implemented in scripts
# owned by the various domains, with a single high-level call in the patch-script.
# This would be the preferred method, in fact, to ensure the patch-scripts
# themselves are simple and clean.
#
# HORIZON
if is_controller
then
bash -x /usr/bin/horizon-patching-restart
if [ $? != 0 ] ; then
loginfo "Horizon patching restart failed"
GLOBAL_RC=$PATCH_STATUS_FAILED
fi
fi
# SYSINV
processes_to_restart="sysinv-conductor sysinv-api sysinv-agent"
bash -x /usr/local/sbin/patch-restart-processes ${processes_to_restart}
if [ $? != 0 ] ; then
loginfo "patching restart failed"
loginfo "... process-restart ${processes_to_restart}"
GLOBAL_RC=$PATCH_STATUS_FAILED
fi
exit $GLOBAL_RC