Commit 2968a2c2 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Add definitions for new iface role slot of interfaces table, and

modify newwanode to set that for the new wa nodes (control interface).
parent ae5f7a3f
...@@ -162,6 +162,9 @@ use Exporter; ...@@ -162,6 +162,9 @@ use Exporter;
TBActivityReport GatherSwapStats GatherAssignStats TBActivityReport GatherSwapStats GatherAssignStats
TBDB_IFACEROLE_CONTROL TBDB_IFACEROLE_EXPERIMENT
TBDB_IFACEROLE_JAIL TBDB_IFACEROLE_FAKE TBDB_IFACEROLE_OTHER
max min max min
); );
...@@ -507,6 +510,13 @@ sub TBDB_RSRVROLE_VIRTHOST() { "virthost"; } ...@@ -507,6 +510,13 @@ sub TBDB_RSRVROLE_VIRTHOST() { "virthost"; }
sub TBDB_RSRVROLE_DELAYNODE() { "delaynode"; } sub TBDB_RSRVROLE_DELAYNODE() { "delaynode"; }
sub TBDB_RSRVROLE_SIMNODE() { "simnode"; } sub TBDB_RSRVROLE_SIMNODE() { "simnode"; }
# Interfaces roles.
sub TBDB_IFACEROLE_CONTROL() { "ctrl"; }
sub TBDB_IFACEROLE_EXPERIMENT() { "expt"; }
sub TBDB_IFACEROLE_JAIL() { "jail"; }
sub TBDB_IFACEROLE_FAKE() { "fake"; }
sub TBDB_IFACEROLE_OTHER() { "other"; }
# #
# Auth stuff. # Auth stuff.
# #
......
...@@ -247,10 +247,12 @@ else { ...@@ -247,10 +247,12 @@ else {
"(node_id, status, status_timestamp) ". "(node_id, status, status_timestamp) ".
"values ('$nodename', 'down', now()) "); "values ('$nodename', 'down', now()) ");
my $ifacerole = TBDB_IFACEROLE_CONTROL();
DBQueryFatal("insert into interfaces ". DBQueryFatal("insert into interfaces ".
"(node_id, card, port, IP, interface_type, iface) ". "(node_id, card, port, IP, interface_type, iface, role) ".
"values ('$nodename', $control_net, 1, '$nodeip', ". "values ('$nodename', $control_net, 1, '$nodeip', ".
" 'fxp', 'eth0')"); " 'fxp', 'eth0', '$ifacerole')");
DBQueryFatal("insert into reserved ". DBQueryFatal("insert into reserved ".
"(node_id, pid, eid, rsrv_time, vname) ". "(node_id, pid, eid, rsrv_time, vname) ".
......
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