Files
update/patch-scripts/EXAMPLE_DC/scripts/distcloud-restart-example
Raphael 94c2b654e3 Replace dcorch-patch-api-proxy with dcorch-usm-api-proxy
This commit replaces the dcorch-patch-api-proxy service with the
dcorch-usm-api-proxy following its removal in 1.

Test plan:
1. PASS: All tox checks are successfull.

[1] https://review.opendev.org/c/starlingx/distcloud/+/949947

Story: 2011311
Task: 52249

Change-Id: Ic90eacc22852381f9c4c4165a578ce7ca326ca44
Signed-off-by: Raphael <Raphael.Lima@windriver.com>
2025-05-27 08:35:49 -03:00

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-usm-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