mirror of https://github.com/chaos-mesh/chaosd.git
fixed stress,process ACTION empty (#15)
Signed-off-by: wuxiaohui <wuxiaohui94@126.com>
This commit is contained in:
parent
6a475cd5fb
commit
fdd2220aa3
|
|
@ -65,11 +65,13 @@ func NewProcessStopCommand() *cobra.Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
func processKillCommandFunc(cmd *cobra.Command, args []string) {
|
func processKillCommandFunc(cmd *cobra.Command, args []string) {
|
||||||
|
pFlag.Action = core.ProcessKillAction
|
||||||
processAttackF(cmd, &pFlag)
|
processAttackF(cmd, &pFlag)
|
||||||
}
|
}
|
||||||
|
|
||||||
func processStopCommandFunc(cmd *cobra.Command, args []string) {
|
func processStopCommandFunc(cmd *cobra.Command, args []string) {
|
||||||
pFlag.Signal = int(syscall.SIGSTOP)
|
pFlag.Signal = int(syscall.SIGSTOP)
|
||||||
|
pFlag.Action = core.ProcessStopAction
|
||||||
processAttackF(cmd, &pFlag)
|
processAttackF(cmd, &pFlag)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ func (s *Server) StressAttack(attack *core.StressCommand) (string, error) {
|
||||||
Uid: uid,
|
Uid: uid,
|
||||||
Status: core.Created,
|
Status: core.Created,
|
||||||
Kind: core.StressAttack,
|
Kind: core.StressAttack,
|
||||||
|
Action: attack.Action,
|
||||||
RecoverCommand: attack.String(),
|
RecoverCommand: attack.String(),
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return "", errors.WithStack(err)
|
return "", errors.WithStack(err)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue