Commit d6ccb654 authored by Leigh Stoller's avatar Leigh Stoller

Add another shared key for the event system. There is a new script in

this directory called initkey.pl to generate them for existing
experiments. I will run this script when the rest of the work is done.
parent d12f9b61
......@@ -280,6 +280,7 @@ CREATE TABLE experiments (
cpu_usage tinyint(4) unsigned NOT NULL default '0',
mem_usage tinyint(4) unsigned NOT NULL default '0',
keyhash varchar(64) default NULL,
eventkey varchar(64) default NULL,
idx int(10) unsigned NOT NULL auto_increment,
PRIMARY KEY (eid,pid),
KEY idx (idx),
......
......@@ -1015,20 +1015,33 @@ last_net_act,last_cpu_act,last_ext_act);
alter table interfaces modify role enum('ctrl','expt','jail','fake', \
'other','gw');
1.193: Add sfshostid to nodes table. We store that in the filesystem
1.192: Add sfshostid to nodes table. We store that in the filesystem
on ops, but its nice to have it in the DB too so that we do not
have to read that file!
alter table nodes add sfshostid varchar(128) default NULL;
1.194: Add a range of VLANs to be used, per switch stack. NULL values will
1.193: Add a range of VLANs to be used, per switch stack. NULL values will
default to the old VLAN range.
alter table switch_stack_types add column min_vlan int default NULL;
alter table switch_stack_types add column max_vlan int default NULL;
1.195: Add a label to the state and mode transitions table. After
1.194: Add a label to the state and mode transitions table. After
running the two statements below, reload a current version of db-fill.
alter table state_transitions add label varchar(255) not null;
alter table mode_transitions add label varchar(255) not null;
1.195: Add secret key for the event system.
alter table experiments add eventkey varchar(64) default NULL \
after keyhash;
To initialize run the initkey.pl script in this directory:
./initstats.pl | mysql tbdb
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
use lib "/usr/testbed/lib";
use libdb;
use libtestbed;
#
# Untaint the path
#
$ENV{'PATH'} = '/bin:/usr/bin:/usr/sbin';
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
$query_result =
DBQueryFatal("select pid,eid from experiments");
while (($pid,$eid) = $query_result->fetchrow_array()) {
my $secretkey = TBGenSecretKey();
print "update experiments set eventkey='$secretkey' ".
"where pid='$pid' and eid='$eid';\n";
}
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