Commit b369d679 authored by Robert Ricci's avatar Robert Ricci
Browse files

Add a 'useprepass' bit in the experiments table so that we can turn

on and off the assign prepass on a per-experiment basis.

No parser interface yet - for use only with manual tweaking for now.
parent d3496020
...@@ -291,6 +291,7 @@ CREATE TABLE experiments ( ...@@ -291,6 +291,7 @@ CREATE TABLE experiments (
use_ipassign tinyint(4) NOT NULL default '0', use_ipassign tinyint(4) NOT NULL default '0',
ipassign_args varchar(255) default NULL, ipassign_args varchar(255) default NULL,
linktest_level tinyint(4) NOT NULL default '0', linktest_level tinyint(4) NOT NULL default '0',
useprepass tinyint(1) NOT NULL default '0',
PRIMARY KEY (eid,pid), PRIMARY KEY (eid,pid),
KEY idx (idx), KEY idx (idx),
KEY batchmode (batchmode) KEY batchmode (batchmode)
......
...@@ -1547,3 +1547,8 @@ last_net_act,last_cpu_act,last_ext_act); ...@@ -1547,3 +1547,8 @@ last_net_act,last_cpu_act,last_ext_act);
enum('none','ospf','static','manual','static-ddijk') \ enum('none','ospf','static','manual','static-ddijk') \
NOT NULL default 'none', NOT NULL default 'none',
1.247: Add a 'useprepass' column to the experiments table to enable or
disable the assign prepass.
alter table experiments add column useprepass tinyint(1) \
default 0 not null;
...@@ -301,6 +301,7 @@ my $forcelinkdelays; ...@@ -301,6 +301,7 @@ my $forcelinkdelays;
my $usewatunnels; my $usewatunnels;
my $multiplex_factor; my $multiplex_factor;
my $experiment_idx; my $experiment_idx;
my $useprepass;
# For admission control. Not well defined yet. # For admission control. Not well defined yet.
my $cpu_usage; my $cpu_usage;
...@@ -605,15 +606,14 @@ sub RunAssign () ...@@ -605,15 +606,14 @@ sub RunAssign ()
# If doing an experiment with virtnodes, use the prepass wrapper for assign # If doing an experiment with virtnodes, use the prepass wrapper for assign
# Turned off for now, because it needs some work. # Turned off for now, because it needs some work.
#if ($virtcount) { if ($useprepass) {
# $cmd = "assign_prepass"; $cmd = "assign_prepass";
# $cmdargs = "-m $multiplex_factor $cmdargs" $cmdargs = "-m $multiplex_factor $cmdargs"
# if ($multiplex_factor); if ($multiplex_factor);
#} else { } else {
# $cmd = "assign"; $cmd = "assign";
#} }
$cmd = "assign";
print "$cmd $cmdargs\n"; print "$cmd $cmdargs\n";
# #
...@@ -3648,11 +3648,12 @@ sub LoadExperiment() ...@@ -3648,11 +3648,12 @@ sub LoadExperiment()
DBQueryFatal("select uselinkdelays,forcelinkdelays,". DBQueryFatal("select uselinkdelays,forcelinkdelays,".
" multiplex_factor,usewatunnels, ". " multiplex_factor,usewatunnels, ".
" cpu_usage,mem_usage,allowfixnode, ". " cpu_usage,mem_usage,allowfixnode, ".
" jail_osname,delay_osname,idx ". " jail_osname,delay_osname,idx, " .
" useprepass " .
" from experiments ". " from experiments ".
"where pid='$pid' and eid='$eid'"); "where pid='$pid' and eid='$eid'");
my ($o1,$o2,$o3,$o4,$o5,$o6,$o7,$jail_osname,$delay_osname,$idx) = my ($o1,$o2,$o3,$o4,$o5,$o6,$o7,$jail_osname,$delay_osname,$idx,$o8) =
$query_result->fetchrow_array(); $query_result->fetchrow_array();
# Do not override settings if already defined above. # Do not override settings if already defined above.
...@@ -3670,6 +3671,8 @@ sub LoadExperiment() ...@@ -3670,6 +3671,8 @@ sub LoadExperiment()
if (!defined($mem_usage)); if (!defined($mem_usage));
$fix_current_resources = $o7 $fix_current_resources = $o7
if (!defined($fix_current_resources)); if (!defined($fix_current_resources));
$useprepass = $o8
if (!defined($useprepass));
if (!defined($jail_osid) && defined($jail_osname)) { if (!defined($jail_osid) && defined($jail_osname)) {
if (! ($jail_osid = TBOSID($pid, $jail_osname)) && if (! ($jail_osid = TBOSID($pid, $jail_osname)) &&
! ($jail_osid = TBOSID(TB_OPSPID, $jail_osname))) { ! ($jail_osid = TBOSID(TB_OPSPID, $jail_osname))) {
......
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