
sw-patch-agent service would cause unwanted reboots and conflicts with the USM patching strategy: sw-patch-agent can interfere with software-agent and incorrectly flag the host as reboot-required after noticing that it's not patch-current by sw-patch standards Logs will typically look like this before each reboot: sw-patch-agent[2049]: patch_agent.py(390): INFO: Active Sysroot Commit:650ace717b24afd2e7283cc6ce8b01f13adce84db95e03685610e120424610b9 does not match active controller's Feed Repo Commit: 028e1fa688afaa27aa7a34d4b5ee9eeb8d188b691ba3e558c409bb58e0e83fe2 sw-patch: Node has been patched, with reboot-required flag set. Rebooting Since sw-patch-agent is no longer needed, it's to be removed. Depends-On: https://review.opendev.org/c/starlingx/stx-puppet/+/935555 Test-Plan: PASS: AIO-SX upgrade using sw-manager strategy PASS: AIO-DX System Controller upgrade using strategy PASS: subcloud upgrade using dcmanager strategy PASS: DC patch orchestration for n-1 subclouds Story: 2010676 Task: 51387 Change-Id: I2af7dfab9da89eeba4ffef3fa0d884ae6f2c354f Signed-off-by: mmachado <mmachado@windriver.com>
43 lines
765 B
Bash
43 lines
765 B
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,
|
|
# triggering a restart of the patching daemons themselves
|
|
#
|
|
|
|
#
|
|
# 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
|
|
|
|
#
|
|
# Next, handle restarting the patch-controller.
|
|
#
|
|
if is_controller
|
|
then
|
|
/usr/sbin/sw-patch-controller-daemon-restart
|
|
fi
|
|
|
|
|
|
#
|
|
# Exit the script with the overall return code
|
|
#
|
|
exit $GLOBAL_RC
|
|
|