Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(nvmf/uri): use nvmf:// scheme for tcp #1789

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions io-engine/src/subsys/nvmf/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ impl Display for TransportId {
// trstring for uri scheme to explicitly indicate the tcp support
// also by default when there is rdma available.
let trstring = match self.0.trstring.as_str() {
"RDMA" => "rdma+tcp".to_string(),
_else => _else.to_lowercase(),
"RDMA" => "+rdma+tcp".to_string(),
_else => "".to_string(),
};

write!(
f,
"nvmf+{}://{}:{}",
"nvmf{}://{}:{}",
trstring,
self.0.traddr.as_str(),
self.0.trsvcid.as_str()
Expand Down
2 changes: 1 addition & 1 deletion io-engine/tests/nvmf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ async fn nvmf_set_target_interface() {
.into_inner()
.uri;

let re = Regex::new(r"^nvmf(\+rdma\+tcp|\+tcp)://([0-9.]+):[0-9]+/.*$").unwrap();
let re = Regex::new(r"^nvmf(\+rdma\+tcp|\+tcp)?://([0-9.]+):[0-9]+/.*$").unwrap();
let cap = re.captures(&bdev_uri).unwrap();
let shared_ip = cap.get(2).unwrap().as_str();

Expand Down
2 changes: 1 addition & 1 deletion test/grpc/test_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const CSI_ID = 'test-node-id';
const LOCALHOST = '127.0.0.1';
const NVME_MODEL_ID = 'Mayastor NVMe controller';
const NVME_NQN_PREFIX = 'nqn.2019-05.io.openebs';
const NVMF_URI = /^nvmf\+(tcp|rdma\+tcp):\/\/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}):\d{1,5}\/nqn.2019-05.io.openebs:/;
const NVMF_URI = /^nvmf(\+tcp|\+rdma\+tcp)?:\/\/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}):\d{1,5}\/nqn.2019-05.io.openebs:/;

const testPort = process.env.TEST_PORT || GRPC_PORT;
const myIp = getMyIp() || LOCALHOST;
Expand Down
Loading