better ipv6 iscsi support
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
parent
3a5d73ee2c
commit
153bce2833
|
|
@ -1,8 +1,9 @@
|
||||||
# v1.7.3
|
# v1.7.3
|
||||||
|
|
||||||
Released 2022-07-17
|
Released 2022-07-28
|
||||||
|
|
||||||
- more stringent block device lookup logic (see #215)
|
- more stringent block device lookup logic (see #215)
|
||||||
|
- ipv6 iscsi support
|
||||||
- dependency bumps
|
- dependency bumps
|
||||||
- minor fixes throughout
|
- minor fixes throughout
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -781,6 +781,13 @@ class CsiBaseDriver {
|
||||||
iscsiConnection.portal
|
iscsiConnection.portal
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!session) {
|
||||||
|
throw new GrpcError(
|
||||||
|
grpc.status.UNKNOWN,
|
||||||
|
`unable to find iscsi session for iqn: ${iscsiConnection.iqn}, portal: ${iscsiConnection.portal}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// rescan in scenarios when login previously occurred but volumes never appeared
|
// rescan in scenarios when login previously occurred but volumes never appeared
|
||||||
await iscsi.iscsiadm.rescanSession(session);
|
await iscsi.iscsiadm.rescanSession(session);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -214,6 +214,7 @@ class ISCSI {
|
||||||
}
|
}
|
||||||
|
|
||||||
// protocol: [id] ip:port,target_portal_group_tag targetname
|
// protocol: [id] ip:port,target_portal_group_tag targetname
|
||||||
|
// tcp: [111] [2001:123:456::1]:3260,1 iqn.2005-10.org.freenas.ctl:default-aptcacher-iscsi-claim (non-flash)
|
||||||
const entries = result.stdout.trim().split("\n");
|
const entries = result.stdout.trim().split("\n");
|
||||||
const sessions = [];
|
const sessions = [];
|
||||||
let fields;
|
let fields;
|
||||||
|
|
@ -222,7 +223,7 @@ class ISCSI {
|
||||||
sessions.push({
|
sessions.push({
|
||||||
protocol: entry.split(":")[0],
|
protocol: entry.split(":")[0],
|
||||||
id: Number(fields[1].replace("[", "").replace("]", "")),
|
id: Number(fields[1].replace("[", "").replace("]", "")),
|
||||||
portal: fields[2].replace("[", "").replace("]", "").split(",")[0],
|
portal: fields[2].split(",")[0],
|
||||||
target_portal_group_tag: fields[2].split(",")[1],
|
target_portal_group_tag: fields[2].split(",")[1],
|
||||||
iqn: fields[3].trim(),
|
iqn: fields[3].trim(),
|
||||||
//iqn: fields[3].split(":")[0],
|
//iqn: fields[3].split(":")[0],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue