Commit 59da5869 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add -m option which sets the dpdb flag in the experiment. Oh, what

does this flag do? It says to create a per-experiment DB on ops when
the experiment is swapped in.
parent b51ff787
......@@ -58,7 +58,7 @@ sub CheckCopyArgs();
sub CopyInArchive();
sub fatal($);
my $optlist = "iE:g:e:p:S:L:a:l:sfwqt:nzc:bx:y:";
my $optlist = "iE:g:e:p:S:L:a:l:sfwqt:nzc:bx:y:m"; # Enough options?
my $batchmode= 1;
my $frontend = 0;
my $waitmode = 0;
......@@ -70,6 +70,7 @@ my $savestate= 0;
my $template_mode = 0; # New stuff; experiment templates.
my $instance_idx = 0; # New stuff; experiment templates.
my $archive_eid; # New stuff; experiment templates.
my $dpdb = 0; # A per-experiment DB on ops.
# All of these are for experiment dup and branch. Really mucks things up.
# These globals are set when we parse the -c argument, but used later
my $copybranch = 0; # A branch instead of a duplicate
......@@ -348,14 +349,14 @@ if (! DBQueryWarn("INSERT INTO experiments ".
" idleswap, idleswap_timeout, autoswap, autoswap_timeout,".
" idle_ignore, keyhash, expt_locked, eventkey,".
" noswap_reason, noidleswap_reason, batchmode, ".
" batchstate, linktest_level, savedisk, instance_idx) ".
" batchstate, linktest_level, savedisk, instance_idx,dpdb) ".
"VALUES ($exptidx, '$eid', '$pid', '$gid', now(), ".
"$description,'$dbuid', '$dbuid', '$exptstate', $priority, ".
"$swappable, $idleswap, '$swaptime', $autoswap, ".
"'$autoswaptime', $idleignore, '$webkey', ".
"now(), '$eventkey', $noswap_reason, ".
"$noidleswap_reason, $batchmode, '$batchstate', ".
"$linktest, $savestate, $instance_idx)")) {
"$linktest, $savestate, $instance_idx, $dpdb)")) {
DBQueryWarn("unlock tables");
tbdie("DB error inserting experiment record for $pid/$eid!");
}
......@@ -1032,6 +1033,9 @@ sub ParseArgs()
if (defined($options{"q"})) {
$quiet = 1;
}
if (defined($options{"m"})) {
$dpdb = 1;
}
if (defined($options{"z"})) {
$zeemode = 1;
$zeeopt = "-p";
......
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