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 (
use_ipassign tinyint(4) NOT NULL default '0',
ipassign_args varchar(255) default NULL,
linktest_level tinyint(4) NOT NULL default '0',
useprepass tinyint(1) NOT NULL default '0',
PRIMARY KEY (eid,pid),
KEY idx (idx),
KEY batchmode (batchmode)
......
......@@ -1547,3 +1547,8 @@ last_net_act,last_cpu_act,last_ext_act);
enum('none','ospf','static','manual','static-ddijk') \
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;
my $usewatunnels;
my $multiplex_factor;
my $experiment_idx;
my $useprepass;
# For admission control. Not well defined yet.
my $cpu_usage;
......@@ -605,15 +606,14 @@ sub RunAssign ()
# If doing an experiment with virtnodes, use the prepass wrapper for assign
# Turned off for now, because it needs some work.
#if ($virtcount) {
# $cmd = "assign_prepass";
# $cmdargs = "-m $multiplex_factor $cmdargs"
# if ($multiplex_factor);
#} else {
# $cmd = "assign";
#}
if ($useprepass) {
$cmd = "assign_prepass";
$cmdargs = "-m $multiplex_factor $cmdargs"
if ($multiplex_factor);
} else {
$cmd = "assign";
}
print "$cmd $cmdargs\n";
#
......@@ -3648,11 +3648,12 @@ sub LoadExperiment()
DBQueryFatal("select uselinkdelays,forcelinkdelays,".
" multiplex_factor,usewatunnels, ".
" cpu_usage,mem_usage,allowfixnode, ".
" jail_osname,delay_osname,idx ".
" jail_osname,delay_osname,idx, " .
" useprepass " .
" from experiments ".
"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();
# Do not override settings if already defined above.
......@@ -3670,6 +3671,8 @@ sub LoadExperiment()
if (!defined($mem_usage));
$fix_current_resources = $o7
if (!defined($fix_current_resources));
$useprepass = $o8
if (!defined($useprepass));
if (!defined($jail_osid) && defined($jail_osname)) {
if (! ($jail_osid = TBOSID($pid, $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