Skip to content

Commit

Permalink
fix(engine): no need to mark engine as error after failing to suspend…
Browse files Browse the repository at this point in the history
… or resume engine

No need to mark engine as error after failing to suspend or resume engine.
Longhorn manager will retry the operation later.

Longhorn 9104

Signed-off-by: Derek Su <[email protected]>
  • Loading branch information
derekbit committed Nov 26, 2024
1 parent ed6c172 commit 4231599
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/spdk/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -2077,8 +2077,7 @@ func (e *Engine) Suspend(spdkClient *spdkclient.Client) (err error) {

if err != nil {
if e.State != types.InstanceStateError {
e.State = types.InstanceStateError
e.log.WithError(err).Info("Failed to suspend engine, will mark the engine as error")
e.log.WithError(err).Warn("Failed to suspend engine")
}
e.ErrorMsg = err.Error()
} else {
Expand Down Expand Up @@ -2109,8 +2108,7 @@ func (e *Engine) Resume(spdkClient *spdkclient.Client) (err error) {

if err != nil {
if e.State != types.InstanceStateError {
e.State = types.InstanceStateError
e.log.WithError(err).Info("Failed to resume engine, will mark the engine as error")
e.log.WithError(err).Warn("Failed to resume engine")
}
e.ErrorMsg = err.Error()
} else {
Expand Down

0 comments on commit 4231599

Please sign in to comment.