-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DAOS-16312 control: Always use --force for dmg system stop #15799
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,7 +177,7 @@ func (cmd *systemEraseCmd) Execute(_ []string) error { | |
// systemStopCmd is the struct representing the command to shutdown DAOS system. | ||
type systemStopCmd struct { | ||
baseRankListCmd | ||
Force bool `long:"force" description:"Force stop DAOS system members"` | ||
Force bool `long:"force" description:"Currently ignored"` | ||
} | ||
|
||
// Execute is run when systemStopCmd activates. | ||
|
@@ -191,7 +191,8 @@ func (cmd *systemStopCmd) Execute(_ []string) (errOut error) { | |
if err := cmd.validateHostsRanks(); err != nil { | ||
return err | ||
} | ||
req := &control.SystemStopReq{Force: cmd.Force} | ||
// DAOS-16312: Always use force when stopping ranks. | ||
req := &control.SystemStopReq{Force: true} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not the best place to make this change. It means that only dmg users will benefit from it. Control API users will not. Better to just set it in the SystemStop RPC invoker. As an added benefit, changing it there will minimize the blast radius of this change, so that you don't have to modify the dmg tests. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, done |
||
req.Hosts.Replace(&cmd.Hosts.HostSet) | ||
req.Ranks.Replace(&cmd.Ranks.RankSet) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this changed line isn't helpful. It will have to be changed back, and it doesn't really tell the admin anything useful. "Oh, it's ignored? So then force stop doesn't work? Well then, how do I forcibly stop the system?"
You can see how this change may have the opposite effect to what you intended... I think the description should be the same and the flag should just be a no-op so that everyone doesn't have to change their scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I will revert the change