Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
80556619
Commit
80556619
authored
Jul 03, 2012
by
Leigh B Stoller
Browse files
Minor fix to previous revision; $i vs $n confusion.
parent
583aed31
Changes
1
Hide whitespace changes
Inline
Side-by-side
db/Node.pm.in
View file @
80556619
...
...
@@ -2152,7 +2152,7 @@ sub CreateVnodes($$$)
if (!$query_result);
if (!$query_result->numrows) {
push(@tocreate, $n);
push(@tocreate,
[
$n
, $options->{'
vlist
'}->[$i]]
);
$i++;
}
$n++;
...
...
@@ -2168,25 +2168,19 @@ sub CreateVnodes($$$)
#
# Create a bunch.
#
foreach my $n (@tocreate) {
foreach my $ref (@tocreate) {
my ($n, $vname) = @{ $ref };
my $vpriority = 10000000 + ($ipbase * 1000) + $n;
my $vnodeid = $nodeprefix . "vm" . $nodenum . "-" . $n;
my ( $jailip, $jailmask );
if ($isjailed) {
if( defined( $options->{'
vlist
'} ) &&
defined( $options->{'
vlist
'}->[ $n - 1 ] ) ) {
my $vname = $options->{'
vlist
'}->[ $n - 1 ];
$query_result =
DBQueryWarn( "SELECT attrvalue FROM virt_node_attributes " .
"WHERE pid='
$
pid
' AND eid='
$
eid
' AND " .
"vname='
$
vname
' AND " .
"attrkey='
routable_control_ip
'" );
} else {
$query_result = undef;
}
$query_result =
DBQueryWarn( "SELECT attrvalue FROM virt_node_attributes " .
"WHERE pid='
$
pid
' AND eid='
$
eid
' AND " .
"vname='
$
vname
' AND " .
"attrkey='
routable_control_ip
'" );
if( $query_result && $query_result->numrows &&
( $query_result->fetchrow_array() )[ 0 ] eq "true" ) {
#
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment