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 29, 2024
1 parent 6c66321 commit 8fd6c25
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")

Check warning on line 2090 in pkg/spdk/engine.go

View check run for this annotation

Codecov / codecov/patch

pkg/spdk/engine.go#L2090

Added line #L2090 was not covered by tests
}
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")

Check warning on line 2121 in pkg/spdk/engine.go

View check run for this annotation

Codecov / codecov/patch

pkg/spdk/engine.go#L2121

Added line #L2121 was not covered by tests
}
e.ErrorMsg = err.Error()
} else {
Expand Down

0 comments on commit 8fd6c25

Please sign in to comment.