Skip to content

Commit

Permalink
CA-401404: Only check previous active service status (#6100)
Browse files Browse the repository at this point in the history
`systemctl list-dependencies --plain --no-pager` list uncessary
xapi-clusterd service when xapi-clusterd-shutdown is started.

Here instead of checking the status of all dependencies, we only check
the status of previous acitve dependencies. This also complies with the
behavior before toolstack.target
  • Loading branch information
robhoes authored Nov 4, 2024
2 parents b6619b5 + e376e96 commit 61e655d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/xe-toolstack-restart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ set -e
systemctl restart $MPATHALERT toolstack.target

# Check the status of toolstack services
for service in $(systemctl list-dependencies --plain --no-pager toolstack.target); do
for service in $(systemctl list-dependencies --plain --no-pager toolstack.target) $MPATHALERT; do

# Skip check if the service is not enabled
systemctl is-enabled "$service" >/dev/null 2>&1 || continue

# During system bootup, xcp-rrdd-dcmi.service often fail as
# `ipmitool dcmi discover` discover nothing, just ignore it for now
if [ "$service" == "xcp-rrdd-dcmi.service" ]; then
Expand Down

0 comments on commit 61e655d

Please sign in to comment.