From 423159932e287468553364f213c4be84ab1ca704 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 2bada24c..5815273c 100644 --- a/pkg/spdk/engine.go +++ b/pkg/spdk/engine.go @@ -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 { @@ -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 {