Skip to content

Commit

Permalink
CA-401404: Only check previous active service status
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 enabled dependencies. This also
complies with the behavior before toolstack.target

Signed-off-by: Lin Liu <[email protected]>
  • Loading branch information
liulinC committed Nov 4, 2024
1 parent 07aeb76 commit e376e96
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 e376e96

Please sign in to comment.