Commit 251323a7 authored by Gary Wong's avatar Gary Wong

Pass the routable_control_ip virt node attribute through to CreateVnodes().

parent 02b71fb6
......@@ -2100,7 +2100,7 @@ sub CreateVnodes($$$)
#
DBQueryFatal("lock tables nodes write, reserved write, ".
"node_status write, node_hostkeys write, ".
"virt_node_public_addr write");
"virt_node_public_addr write, virt_node_attributes read");
#
# Reload the reservation status now that tables are locked and confirm
......@@ -2184,8 +2184,16 @@ sub CreateVnodes($$$)
# nodenum=201 and I would like our vnode IPs to align
# at that boundary, so 254 becomes 200.
#
if( 1 ) { # XXX check if public address requested for this node
# (look in virt_node_attributes?)
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'" );
if( $query_result && $query_result->numrows &&
( $query_result->fetchrow_array() )[ 0 ] eq "true" ) {
$query_result =
DBQueryWarn( "SELECT IP, mask FROM virt_node_public_addr ".
"WHERE node_id IS NULL" );
......
......@@ -1720,7 +1720,8 @@ foreach my $pnode (sort(keys(%virtnodes))) {
"nodeid" => $pnode,
"verbose" => $verbose,
"regression" => $regression,
"impotent" => $impotent}) < 0) {
"impotent" => $impotent,
"vlist" => \@vlist }) < 0) {
fatal("Could not allocate vnodes on $pnode");
}
}
......
......@@ -5022,6 +5022,7 @@ sub AllocVirtNodes($)
"sharedokay" => $sharedokay,
"regression" => $self->regression(),
"user" => $self->user(),
"vlist" => \@vlist
})
< 0) {
tberror("Could not allocate vnodes on $physical\n");
......
......@@ -5097,6 +5097,7 @@ sub AllocVirtNodes($)
"sharedokay" => $sharedokay,
"regression" => $self->regression(),
"user" => $self->user(),
"vlist" => \@vlist
})
< 0) {
tberror("Could not allocate vnodes on $physical\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