From 0ba5d0e49d828c2269623d5af30a26caddcf8733 Mon Sep 17 00:00:00 2001 From: Chin-Ya Huang Date: Thu, 22 Aug 2024 12:27:05 +0800 Subject: [PATCH] feat(restore): cleanup DM device and endpoint blindly before start initiator longhorn/longhorn-6613 Signed-off-by: Chin-Ya Huang --- pkg/spdk/restore.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/spdk/restore.go b/pkg/spdk/restore.go index 74c8b08e..437208fc 100644 --- a/pkg/spdk/restore.go +++ b/pkg/spdk/restore.go @@ -141,7 +141,7 @@ func (r *Restore) OpenVolumeDev(volDevName string) (*os.File, string, error) { if err != nil { return nil, "", errors.Wrapf(err, "failed to create NVMe initiator for lvol bdev %v", lvolName) } - if _, err := initiator.Start(r.ip, strconv.Itoa(int(r.port)), false); err != nil { + if _, err := initiator.Start(r.ip, strconv.Itoa(int(r.port)), true); err != nil { return nil, "", errors.Wrapf(err, "failed to start NVMe initiator for lvol bdev %v", lvolName) } r.initiator = initiator