Skip to content

Commit

Permalink
[NEXARL-306] Update prerm script to not disabling and stopping agents…
Browse files Browse the repository at this point in the history
… if (#557)

it's an upgrade process

This PR updates the prerm script to prevent them from disabling and
stopping if it's an upgrade process.

Signed-off-by: yengliong <[email protected]>
Co-authored-by: Gavin Lewis <[email protected]>
  • Loading branch information
yengliong93 and gblewis1 authored Oct 2, 2024
1 parent 1108280 commit ac66a99
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions inbm/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
its status with INBS.
- (NEXMANAGE- 610) Add functionality to INBM Cloudadapter-agent to support OOB AMT RPC command requests from INBS

### Changed
- (NEXARL-306) Update agents' prerm script to prevent them from disabling and stopping if it's an upgrade process

### Fixed
- (NEXMANAGE-746) Add extra sleeptime in INBM tpm script to resolve ARL platform issue
Expand Down
6 changes: 6 additions & 0 deletions inbm/cloudadapter-agent/scripts/before-remove.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ AGENT=inbm-cloudadapter

echo "Running pre-remove steps for ${AGENT} agent..."

# If it is an upgrade, don't stop and disable the agent.
if [ "$1" = "upgrade" ]; then
echo "Upgrade in progress, not stopping or disabling ${AGENT} service."
exit 0
fi

# Stop service
if systemctl is-active ${AGENT} ; then
echo "Stopping ${AGENT} agent."
Expand Down
6 changes: 6 additions & 0 deletions inbm/configuration-agent/scripts/before-remove.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ AGENT=inbm-configuration

echo "Running pre-remove steps for ${AGENT} agent..."

# If it is an upgrade, don't stop and disable the agent.
if [ "$1" = "upgrade" ]; then
echo "Upgrade in progress, not stopping or disabling ${AGENT} service."
exit 0
fi

# Stop service
if systemctl is-active ${AGENT} ; then
echo "Stopping ${AGENT} agent."
Expand Down
6 changes: 6 additions & 0 deletions inbm/diagnostic-agent/scripts/before-remove.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ AGENT=inbm-diagnostic

echo "Running pre-remove steps for ${AGENT} agent..."

# If it is an upgrade, don't stop and disable the agent.
if [ "$1" = "upgrade" ]; then
echo "Upgrade in progress, not stopping or disabling ${AGENT} service."
exit 0
fi

# Stop service
if systemctl is-active ${AGENT} ; then
echo "Stopping ${AGENT} agent."
Expand Down
6 changes: 6 additions & 0 deletions inbm/dispatcher-agent/scripts/before-remove.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ AGENT=inbm-dispatcher

echo "Running pre-remove steps for ${AGENT} agent..."

# If it is an upgrade, don't stop and disable the agent.
if [ "$1" = "upgrade" ]; then
echo "Upgrade in progress, not stopping or disabling ${AGENT} service."
exit 0
fi

# Stop service
if systemctl is-active ${AGENT} ; then
echo "Stopping ${AGENT} agent."
Expand Down
6 changes: 6 additions & 0 deletions inbm/telemetry-agent/scripts/before-remove.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ AGENT=inbm-telemetry

echo "Running pre-remove steps for ${AGENT} agent..."

# If it is an upgrade, don't stop and disable the agent.
if [ "$1" = "upgrade" ]; then
echo "Upgrade in progress, not stopping or disabling ${AGENT} service."
exit 0
fi

# Stop service
if systemctl is-active ${AGENT} ; then
echo "Stopping ${AGENT} agent."
Expand Down

0 comments on commit ac66a99

Please sign in to comment.