Commit cccd82d9 authored by Mike Hibler's avatar Mike Hibler
Browse files

Include osfeatures in the "physical" topo map.

This way, the linktest instances can know who will be running linktest
and who will not and thus we can run on a subset of nodes.
parent 2fadbfb8
......@@ -345,14 +345,16 @@ foreach my $lan (sort keys(%lans)) {
#
# A node info line looks like:
#
# H vname pname phost ptype OSID OS-name OS-version
# H vname pname phost ptype OSID OS-name OS-version OS-features
#
# where vname is the experimenter given name like in the ltmap,
# pname is the physical node name (e.g., "pc10", "pcvm10-2"),
# phost is the "hosting" physical node for vnodes (or pname for regular nodes),
# OSID is the emulab OS identifier for the OS running (e.g., "FBSD410-STD"),
# OS-name is OS (e.g., "FreeBSD", "Linux"),
# OS-version is the version of that OS (e.g., "4.10", "9.0").
# OS-version is the version of that OS (e.g., "4.10", "9.0"),
# OS-features is a comma separated list of features supported by the OS
# (including "linktest").
#
# A link info line looks like:
#
......@@ -376,7 +378,7 @@ foreach my $lan (sort keys(%lans)) {
my $havepmap = 0;
$query_result =
DBQueryFatal("select v.vname,n.node_id,n.phys_nodeid,n.type,".
" o.osid,o.OS,o.version".
" o.osid,o.OS,o.version,o.osfeatures".
" from virt_nodes as v,reserved as r,nodes as n,os_info as o".
" where v.pid=r.pid and v.eid=r.eid and v.vname=r.vname".
" and r.node_id=n.node_id and n.def_boot_osid=o.osid and".
......@@ -394,12 +396,17 @@ if ($query_result->numrows) {
$LTPOUT = *LTPMAP;
}
print $LTPOUT "V 1\n";
while (my ($vname,$node,$pnode,$ptype,$osid,$os,$osvers) =
#
# Version 2 added osfeatures field
#
print $LTPOUT "V 2\n";
while (my ($vname,$node,$pnode,$ptype,$osid,$os,$osvers,$osfeatures) =
$query_result->fetchrow_array) {
$os = "UNKNOWN" if (!$os);
$osvers = "0" if (!$osvers);
print $LTPOUT "H $vname $node $pnode $ptype $osid $os $osvers\n";
$osfeatures = "UNKNOWN" if (!$osfeatures);
print $LTPOUT
"H $vname $node $pnode $ptype $osid $os $osvers $osfeatures\n";
}
#
......@@ -417,7 +424,7 @@ if ($query_result->numrows) {
#
$query_result =
DBQueryFatal("select v.member,v.vname,i.mac,ve.mac,l.iface".
" from (reserved as r, virt_lans as v)".
" from reserved as r join virt_lans as v".
" left join interfaces as i".
" on v.ip=i.IP and r.node_id=i.node_id".
" left join linkdelays as l".
......
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