Commit 595295bf authored by Leigh B Stoller's avatar Leigh B Stoller

Bug fix to blockstores; watch for duplicate local BS names and return

error gracefully instead of silent failure.
parent 23fc7a1e
......@@ -957,6 +957,7 @@ sub GetTicketAuxAux($$$$$$$$$$$)
my @nodeids = ();
my %lannodes = ();
my %allnodes = ();
my %bsnames = ();
# Extra nodes (like XEN vhosts).
my %internal_nodemap = ();
# For stitching, keep track of external nodes and links.
......@@ -7871,6 +7872,14 @@ sub HandleBlockstore($$$$$$$@)
$message = "Illegal blockstore name: $bsname";
goto bad;
}
#
# Check the tables for an existing blockstore with this name, they
# have to be experiment unique.
#
if ($virtexperiment->Find("virt_blockstores", $bsname)) {
$message = "Already have a blockstore with name: $bsname";
goto bad;
}
}
if (defined($mount) &&
!TBcheck_dbslot($mount, "os_info", "path",
......
Markdown is supported
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