Commit 5be4c063 authored by Leigh Stoller's avatar Leigh Stoller

Add state/status timestamp to geni_slivers and geni_aggregates; time to

fix the race condition in event reporting to the Portal.
parent fbb431e8
......@@ -98,6 +98,7 @@ CREATE TABLE `geni_slivers` (
`aggregate_uuid` varchar(40) default NULL,
`status` varchar(16) NOT NULL default 'created',
`state` varchar(16) NOT NULL default 'stopped',
`status_state_timestamp` int(10) unsigned default NULL,
`errorlog` text,
`rspec_string` mediumtext,
PRIMARY KEY (`idx`),
......@@ -124,6 +125,7 @@ CREATE TABLE `geni_aggregates` (
`aggregate_idx` int(10) unsigned default NULL,
`status` varchar(16) NOT NULL default 'created',
`state` varchar(16) NOT NULL default 'stopped',
`status_state_timestamp` int(10) unsigned default NULL,
`errorlog` text,
`boot_failure` tinyint(1) default '0',
PRIMARY KEY (`idx`),
......
#
# Add some timestamps,
#
use strict;
use GeniDB;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
DBSetDefault($dbhandle);
DBQueryFatal("alter table geni_aggregates add ".
" `status_state_timestamp` int(10) unsigned default NULL ".
" after state");
DBQueryFatal("alter table geni_slivers add ".
" `status_state_timestamp` int(10) unsigned default NULL ".
" after state");
return 0;
}
1;
# Local Variables:
# mode:perl
# End:
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