Commit 9d887325 authored by Mike Hibler's avatar Mike Hibler
Browse files

Fix an ambiguous RE.

If one blockstore name was a subset of another (e.g., "foo" vs. "foo2")
then the check code could get confused and not mount some iSCSI blockstores.
parent af157790
...@@ -994,7 +994,7 @@ sub os_check_storage_element($$) ...@@ -994,7 +994,7 @@ sub os_check_storage_element($$)
my $session; my $session;
@lines = `$ISCSI -m session 2>&1`; @lines = `$ISCSI -m session 2>&1`;
foreach (@lines) { foreach (@lines) {
if (/^tcp: \[(\d+)\].*$uuid */) { if (/^tcp: \[(\d+)\].*$uuid *$/) {
$session = $1; $session = $1;
last; last;
} }
...@@ -1507,7 +1507,7 @@ sub os_create_storage_element($$$) ...@@ -1507,7 +1507,7 @@ sub os_create_storage_element($$$)
# #
@lines = `$ISCSI -m session 2>&1`; @lines = `$ISCSI -m session 2>&1`;
foreach (@lines) { foreach (@lines) {
if (/^tcp: \[(\d+)\].*$uuid */) { if (/^tcp: \[(\d+)\].*$uuid *$/) {
$session = $1; $session = $1;
last; last;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment