Skip to content

Commit

Permalink
ignore process not found while recovering the stress (#145)
Browse files Browse the repository at this point in the history
* fix stress recover

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

* fix error assert

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
  • Loading branch information
YangKeao committed Mar 28, 2022
1 parent d93fc1f commit 83893b4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/server/chaosd/stress.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ package chaosd

import (
"errors"
"io/fs"
"strings"
"syscall"

Expand Down Expand Up @@ -91,6 +92,10 @@ func (stressAttack) Recover(exp core.Experiment, _ Environment) error {
attack := config.(*core.StressCommand)
proc, err := process.NewProcess(attack.StressngPid)
if err != nil {
if errors.Is(err, fs.ErrNotExist) {
return nil
}

return err
}

Expand Down

0 comments on commit 83893b4

Please sign in to comment.