Commit 7a668c3f authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

When uploading v2pmap to the DB, make that virtnodes get the right

pnode (this was causing tmcd hostnames to break cause it uses the
v2pmap table).
parent bd3386ff
......@@ -2070,10 +2070,23 @@ if ($query_result->numrows) {
# Adding to the v2pmap table
foreach my $vnode (keys(%v2pmap)) {
my $pnode = $v2pmap{$vnode};
my $pnode;
DBQueryFatal("insert into v2pmap (pid,eid,vname,node_id) values " .
# If a virtual node, the pnode is the virtual node, not the underlying
# physical node. The only place I know that cares about this table is
# dohosts() in tmcd.c, which gets the host table wrong inside a jail
# cause the pnode is not set properly.
if ($isvirtnode{$vnode}) {
$pnode = $v2vmap{$vnode};
else {
$pnode = $v2pmap{$vnode};
DBQueryFatal("insert into v2pmap (pid,eid,vname,node_id) values " .
TBDebugTimeStamp("uploading finished");
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