Skip to content

Commit

Permalink
DAOS-16312 control: Always use --force for dmg system stop
Browse files Browse the repository at this point in the history
Allow-unstable-test: true
Features: control
Signed-off-by: Tom Nabarro <[email protected]>
  • Loading branch information
tanabarr committed Jan 28, 2025
1 parent 6a1c698 commit 28ddd5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/control/lib/control/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,8 @@ func SystemStop(ctx context.Context, rpcClient UnaryInvoker, req *SystemStopReq)
Hosts: req.Hosts.String(),
Ranks: req.Ranks.String(),
Sys: req.getSystem(rpcClient),
Force: req.Force,
// DAOS-16312: Always force stop engine processes.
Force: true,
}
req.setRPC(func(ctx context.Context, conn *grpc.ClientConn) (proto.Message, error) {
return mgmtpb.NewMgmtSvcClient(conn).SystemStop(ctx, pbReq)
Expand Down
6 changes: 4 additions & 2 deletions src/control/server/mgmt_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -902,8 +902,10 @@ func (svc *mgmtSvc) SystemStop(ctx context.Context, req *mgmtpb.SystemStopReq) (
return nil, err
}

// First phase: Prepare the ranks for shutdown, but only if the request
// is for an unforced full system stop.
// First phase: Prepare the ranks for shutdown, but only if the request is for an unforced
// full system stop.
// DAOS-16312: Note that if force is always specified in request, PrepShutdown will never
// be called.
if fReq.FullSystem && !fReq.Force {
fReq.Method = control.PrepShutdownRanks
fResp, _, err = svc.rpcFanout(ctx, fReq, fResp, true)
Expand Down

0 comments on commit 28ddd5c

Please sign in to comment.