Skip to content

Commit

Permalink
nvme: explicitly configure the timeouts
Browse files Browse the repository at this point in the history
Longhorn 6001

Signed-off-by: Derek Su <derek.su@suse.com>
  • Loading branch information
derekbit committed Apr 23, 2024
1 parent eaadc8c commit f156891
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/nvme/nvmecli.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ const (
DefaultTransportType = "tcp"

// Set short ctrlLossTimeoutSec for quick response to the controller loss.
defaultCtrlLossTimeoutSec = 30
defaultCtrlLossTmo = 30
defaultKeepAliveTmo = 5
defaultReconnectDelay = 10
)

type Device struct {
Expand Down Expand Up @@ -306,7 +308,9 @@ func connect(hostID, hostNQN, nqn, transpotType, ip, port string, executor *comm
"connect",
"-t", transpotType,
"--nqn", nqn,
"--ctrl-loss-tmo", strconv.Itoa(defaultCtrlLossTimeoutSec),
"--ctrl-loss-tmo", strconv.Itoa(defaultCtrlLossTmo),
"--keep-alive-tmo", strconv.Itoa(defaultKeepAliveTmo),
"--reconnect-delay", strconv.Itoa(defaultReconnectDelay),
"-o", "json",
}

Expand Down

0 comments on commit f156891

Please sign in to comment.