
We've added a new distributed-cloud process, so update the sample script. Story: 2007267 Task: 42000 Signed-off-by: Chris Friesen <chris.friesen@windriver.com> Change-Id: I16522744c9526e134577bda80cf91a8308eee889
49 lines
1.2 KiB
Bash
49 lines
1.2 KiB
Bash
#!/bin/bash
|
|
#
|
|
# Copyright (c) 2020 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
#
|
|
# This script provides an example in-service distcloud restart
|
|
#
|
|
|
|
#
|
|
# 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
|
|
|
|
|
|
if is_controller
|
|
then
|
|
processes_to_restart="dcmanager-manager dcmanager-api dcmanager-audit-worker \
|
|
dcmanager-audit dcmanager-orchestrator \
|
|
dcorch-engine dcorch-sysinv-api-proxy dcdbsync-api \
|
|
dcorch-patch-api-proxy dcorch-identity-api-proxy"
|
|
/usr/local/sbin/patch-restart-processes ${processes_to_restart}
|
|
if [ $? != 0 ] ; then
|
|
loginfo "patching restart failed"
|
|
loginfo "... process-restart ${processes_to_restart}"
|
|
exit ${PATCH_STATUS_FAILED}
|
|
fi
|
|
fi
|
|
|
|
# Nothing to restart on workers or storage
|
|
|
|
#
|
|
# Exit the script with the overall return code
|
|
#
|
|
exit $GLOBAL_RC
|