Commit 236f7d79 authored by Ryan Jackson's avatar Ryan Jackson

Add subbosses table and 'subboss' erole

parent f135521c
......@@ -3082,7 +3082,7 @@ CREATE TABLE `reserved` (
`exptidx` int(11) NOT NULL default '0',
`rsrv_time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`vname` varchar(32) default NULL,
`erole` enum('node','virthost','delaynode','simhost','sharedhost') NOT NULL default 'node',
`erole` enum('node','virthost','delaynode','simhost','sharedhost', 'subboss') NOT NULL default 'node',
`simhost_violation` tinyint(3) unsigned NOT NULL default '0',
`old_pid` varchar(12) NOT NULL default '',
`old_eid` varchar(32) NOT NULL default '',
......@@ -3194,6 +3194,18 @@ CREATE TABLE `state_triggers` (
PRIMARY KEY (`node_id`,`op_mode`,`state`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `subbosses`
--
DROP TABLE IF EXISTS `subbosses`;
CREATE TABLE `subbosses` (
`node_id` varchar(32) NOT NULL default '',
`service` varchar(20) NOT NULL default '',
`subboss_id` varchar(20) NOT NULL default '',
PRIMARY KEY (`node_id`,`service`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `switch_paths`
--
......
#
# Create the subbosses table so that we can determine which subboss provides
# a particular service to a node.
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBTableExists("subbosses")) {
DBQueryFatal( "CREATE TABLE `subbosses` ("
" `node_id` varchar(32) NOT NULL default '',"
" `service` varchar(20) NOT NULL default '',"
" `subboss_id` varchar(20) NOT NULL default '',"
" PRIMARY KEY (`node_id`,`service`)"
") ENGINE=MyISAM DEFAULT CHARSET=latin1;");
}
DBQueryFatal("alter table reserved change `erole` `erole` ".
" enum('node','virthost','delaynode','simhost', "
" 'sharedhost', 'subboss') NOT NULL default 'node'");
return 0;
}
1;
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