Skip to content

Commit

Permalink
feat(restore): cleanup DM device and endpoint blindly before start in…
Browse files Browse the repository at this point in the history
…itiator

longhorn/longhorn-6613

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
  • Loading branch information
c3y1huang committed Aug 23, 2024
1 parent ba2b956 commit 0ba5d0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/spdk/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0ba5d0e

Please sign in to comment.