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 Dec 1, 2024
1 parent bbc0d28 commit 1f1a32b
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 @@ -2087,8 +2087,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 @@ -2119,8 +2118,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 1f1a32b

Please sign in to comment.