Commit 4a94c6e4 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Another fix for oddly named nodes.

parent ab7efe7a
...@@ -78,7 +78,7 @@ sub Lookup($$) ...@@ -78,7 +78,7 @@ sub Lookup($$)
my ($class, $token) = @_; my ($class, $token) = @_;
my $nodeid; my $nodeid;
if ($token =~ /^\w+\-\w+\-\w+\-\w+\-\w+$/) { if ($token =~ /^\w{8}\-\w{4}\-\w{4}\-\w{4}\-\w{12}$/) {
my $query_result = my $query_result =
DBQueryWarn("select node_id from nodes ". DBQueryWarn("select node_id from nodes ".
"where uuid='$token'"); "where uuid='$token'");
...@@ -410,7 +410,7 @@ sub AccessCheck($$$) ...@@ -410,7 +410,7 @@ sub AccessCheck($$$)
if ($access_type < TB_NODEACCESS_MIN || if ($access_type < TB_NODEACCESS_MIN ||
$access_type > TB_NODEACCESS_MAX) { $access_type > TB_NODEACCESS_MAX) {
print "*** Invalid access type: $access_type!\n"; print STDERR "*** Invalid access type: $access_type!\n";
return 0; return 0;
} }
# Admins do whatever they want. # Admins do whatever they want.
...@@ -1386,7 +1386,7 @@ sub CreateVnodes($$) ...@@ -1386,7 +1386,7 @@ sub CreateVnodes($$)
my $uuid = NewUUID(); my $uuid = NewUUID();
if (!defined($uuid)) { if (!defined($uuid)) {
print "Could not generate a UUID!\n"; print STDERR "Could not generate a UUID!\n";
next NODE; next NODE;
} }
...@@ -1464,12 +1464,14 @@ sub CreateVnodes($$) ...@@ -1464,12 +1464,14 @@ sub CreateVnodes($$)
my $jailip = "${IPBASE1}.${pnet}.${pnode2}.${i}"; my $jailip = "${IPBASE1}.${pnet}.${pnode2}.${i}";
if ($verbose) { if ($verbose) {
print "Jail IP for $vnodeid is $jailip\n"; print STDERR "Jail IP for $vnodeid is $jailip\n";
if ($impotent) { if ($impotent) {
print "Would allocate $vnodeid on $pnode ($vtype, $osid)\n"; print STDERR
"Would allocate $vnodeid on $pnode ($vtype, $osid)\n";
} }
else { else {
print "Allocating $vnodeid on $pnode ($vtype, $osid)\n"; print STDERR
"Allocating $vnodeid on $pnode ($vtype, $osid)\n";
} }
} }
......
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