From 1f1a32bb5cee63041a3d365863a44d64a72c6812 Mon Sep 17 00:00:00 2001 From: Derek Su Date: Tue, 26 Nov 2024 11:38:36 +0800 Subject: [PATCH] fix(engine): no need to mark engine as error after failing to suspend 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 --- pkg/spdk/engine.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/spdk/engine.go b/pkg/spdk/engine.go index a8e5fdc8..39c40837 100644 --- a/pkg/spdk/engine.go +++ b/pkg/spdk/engine.go @@ -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 { @@ -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 {