vcl-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arku...@apache.org
Subject svn commit: r1646301 - in /vcl/trunk/mysql: update-vcl.sql vcl.sql
Date Wed, 17 Dec 2014 17:50:46 GMT
Author: arkurth
Date: Wed Dec 17 17:50:46 2014
New Revision: 1646301

URL: http://svn.apache.org/r1646301
Log:
VCL-764
Removed explicit id values for computerloadstate table.

Updated computerloadstate entries:
Removed connected
Changed connecttimeout to reconnecttimeout
Added noinitialconnection, initialconnecttimeout

Changed variable name: connecttimeout --> reconnecttimeout
Added variable: initialconnecttimeout

VCL-763
Added indexes and constraints to computerloadlog for loadstateid and computerloadlog columns.

Modified:
    vcl/trunk/mysql/update-vcl.sql
    vcl/trunk/mysql/vcl.sql

Modified: vcl/trunk/mysql/update-vcl.sql
URL: http://svn.apache.org/viewvc/vcl/trunk/mysql/update-vcl.sql?rev=1646301&r1=1646300&r2=1646301&view=diff
==============================================================================
--- vcl/trunk/mysql/update-vcl.sql (original)
+++ vcl/trunk/mysql/update-vcl.sql Wed Dec 17 17:50:46 2014
@@ -797,6 +797,15 @@ UPDATE computer SET datedeleted = NOW()
 
 -- --------------------------------------------------------
 
+-- 
+--  Table structure for table `computerloadlog`
+--
+
+CALL AddIndexIfNotExists('computerloadlog', 'loadstateid');
+CALL AddIndexIfNotExists('computerloadlog', 'computerid');
+
+-- --------------------------------------------------------
+
 --
 -- Table structure for table `connectmethod`
 --
@@ -844,7 +853,7 @@ CREATE TABLE IF NOT EXISTS `connectmetho
   `id` tinyint(3) unsigned NOT NULL auto_increment,
   `connectmethodid` tinyint(3) unsigned NOT NULL,
   `port` mediumint(8) unsigned NOT NULL,
-  `protocol` enum('TCP','UDP') NOT NULL,
+  `protocol` enum('TCP','UDP') NOT NULL default 'TCP',
   PRIMARY KEY  (`id`),
   UNIQUE KEY `connectmethodid_2` (`connectmethodid`,`port`,`protocol`),
   KEY `connectmethodid` (`connectmethodid`)
@@ -1361,10 +1370,13 @@ UPDATE `computer` SET `imagerevisionid`
 -- Inserts for table `computerloadstate`
 -- 
 
-INSERT IGNORE INTO `computerloadstate` (`loadstatename`,`prettyname`) VALUES ('connecttimeout','Start
Connect Timeout');
-INSERT IGNORE INTO `computerloadstate` (`loadstatename`,`prettyname`) VALUES ('beginacknowledgetimeout','Start
Acknowledge Timeout');
-INSERT IGNORE INTO `computerloadstate` (`loadstatename`,`prettyname`,`est`) VALUES ('copyfrompartnerMN','Copy
Image from Partner Management node','20');
-INSERT IGNORE INTO `computerloadstate` (`loadstatename`,`prettyname`) VALUES ('postreserve','Post
reserve completed');
+INSERT IGNORE INTO `computerloadstate` (`loadstatename`,`prettyname`) VALUES ('acknowledgetimeout','start
acknowledge timeout');
+
+INSERT IGNORE INTO `computerloadstate` (`loadstatename`,`prettyname`) VALUES ('noinitialconnection','initial
user connection not detected');
+INSERT IGNORE INTO `computerloadstate` (`loadstatename`,`prettyname`) VALUES ('initialconnecttimeout','initial
user connection timeout');
+INSERT IGNORE INTO `computerloadstate` (`loadstatename`,`prettyname`) VALUES ('reconnecttimeout','user
reconnection timeout');
+INSERT IGNORE INTO `computerloadstate` (`loadstatename`,`prettyname`,`est`) VALUES ('copyfrompartnerMN','copy
image from partner management node','20');
+INSERT IGNORE INTO `computerloadstate` (`loadstatename`,`prettyname`) VALUES ('postreserve','post
reserve completed');
 
 UPDATE `computerloadstate` SET loadstatename = 'machinebooted' WHERE loadstatename = 'vmstage4';
 UPDATE `computerloadstate` SET prettyname = 'confirming image exists locally' WHERE loadstatename
= 'doesimageexists';
@@ -1707,7 +1719,8 @@ INSERT IGNORE userpriv (usergroupid, pri
 INSERT IGNORE INTO `variable` (`name`, `serialization`, `value`) VALUES ('schema-version',
'none', '1');
 INSERT IGNORE INTO `variable` (`name`, `serialization`, `value`) VALUES ('timesource|global',
'none','time.nist.gov,time-a.nist.gov,time-b.nist.gov,time.windows.com');
 INSERT IGNORE INTO `variable` (`name`, `serialization`, `value`) VALUES ('acknowledgetimeout',
'none', '900');
-INSERT IGNORE INTO `variable` (`name`, `serialization`, `value`) VALUES ('connecttimeout',
'none', '900');
+INSERT IGNORE INTO `variable` (`name`, `serialization`, `value`) VALUES ('initialconnecttimeout',
'none', '900');
+INSERT IGNORE INTO `variable` (`name`, `serialization`, `value`) VALUES ('reconnecttimeout',
'none', '900');
 INSERT IGNORE INTO `variable` (`name`, `serialization`, `value`) VALUES ('general_inuse_check',
'none', '300');
 INSERT IGNORE INTO `variable` (`name`, `serialization`, `value`) VALUES ('server_inuse_check',
'none', '900');
 INSERT IGNORE INTO `variable` (`name`, `serialization`, `value`) VALUES ('general_end_notice_first',
'none', '600');
@@ -1738,6 +1751,15 @@ CALL AddConstraintIfNotExists('computer'
 
 -- --------------------------------------------------------
 
+--
+-- Constraints for table `computerloadlog`
+--
+
+CALL AddConstraintIfNotExists('computerloadlog', 'computerid', 'computer', 'id', 'both',
'RESTRICT');
+CALL AddConstraintIfNotExists('computerloadlog', 'loadstateid', 'computerloadstate', 'id',
'both', 'RESTRICT');
+
+-- --------------------------------------------------------
+
 --
 -- Constraints for table `connectmethodmap`
 --

Modified: vcl/trunk/mysql/vcl.sql
URL: http://svn.apache.org/viewvc/vcl/trunk/mysql/vcl.sql?rev=1646301&r1=1646300&r2=1646301&view=diff
==============================================================================
--- vcl/trunk/mysql/vcl.sql (original)
+++ vcl/trunk/mysql/vcl.sql Wed Dec 17 17:50:46 2014
@@ -283,7 +283,8 @@ CREATE TABLE IF NOT EXISTS `computerload
   `additionalinfo` text,
   PRIMARY KEY  (`id`),
   KEY `reservationid` (`reservationid`),
-  KEY `loadstateid` (`loadstateid`)
+  KEY `loadstateid` (`loadstateid`),
+  KEY `computerid` (`computerid`)
 ) ENGINE=InnoDB  DEFAULT CHARSET=latin1;
 
 -- --------------------------------------------------------
@@ -1463,61 +1464,63 @@ INSERT IGNORE INTO `affiliation` (`id`,
 -- Dumping data for table `computerloadstate`
 -- 
 
-INSERT IGNORE INTO `computerloadstate` (`id`, `loadstatename`, `prettyname`, `est`) VALUES

-(1, 'info', 'info', 2),
-(2, 'loadimageblade', 'must reload computer', 0),
-(3, 'loadimagevmware', 'loadimagevmware', 1),
-(4, 'statuscheck', 'computer status check', 10),
-(5, 'assign2project', 'changing VLAN setting ', 0),
-(6, 'rinstall', 'starting install process', 1),
-(7, 'dynamicDHCPaddress', 'detecting dynamic IP address', 2),
-(8, 'staticIPaddress', 'setting static IP address', 2),
-(9, 'loadimagecomplete', 'running post configuration', 0),
-(10, 'loadimagefailed', 'preparing computer failed', 2),
-(11, 'failed', 'reservation failed', 2),
-(12, 'bootstate', 'image loading', 175),
-(13, 'editnodetype', 'edit config file to load requested image', 1),
-(14, 'xcatstage1', 'detected dhcp request from node', 2),
-(15, 'xcatstage2', 'rebooting node for reinstall', 100),
-(16, 'WARNING', 'WARNING', 2),
-(17, 'xcatREADY', 'computer reported READY starting post configs', 2),
-(18, 'reserved', 'ready for Connect', 0),
-(19, 'xcatstage3', 'node starting to received install instructions', 93),
-(20, 'xcatstage4', 'node received install instructions', 0),
-(21, 'xcatstage5', 'starting reload process', 27),
-(22, 'doesimageexists', 'confirming image exists locally', 4),
-(23, 'vmround1', 'vmround1', 1),
-(26, 'vmround2', 'vmround2', 186),
-(27, 'transfervm', 'transferring image files to host server', 255),
-(28, 'vmsetupconfig', 'creating configuration file', 2),
-(29, 'vmstage1', 'detected stage 1 of 5 loading process', 22),
-(30, 'vmstage2', 'detected stage 2 of 5 loading process', 120),
-(31, 'vmstage3', 'detected stage 3 of 4 loading process', 0),
-(33, 'xcatround2', 'waiting for image loading to complete', 0),
-(34, 'xcatround3', 'loaded - start post configuration', 0),
-(35, 'xcatround1', 'xcatround1', 2),
-(38, 'timeout', 'timeout', 2),
-(39, 'vmwareready', 'machine online', 3),
-(40, 'startload', 'starting load process', 6),
-(41, 'addinguser', 'adding user account', 18),
-(42, 'connected', 'detected user connection', 2),
-(43, 'nodeready', 'resource ready', 0),
-(44, 'inuseend10', '10 minute warning ', 2),
-(45, 'inuseend5', '5 minute warning', 2),
-(46, 'machinebooted', 'machine booting', 68),
-(47, 'checklabstatus', 'checking computer status', 2),
-(48, 'startvm', 'starting virtual machine', 3),
-(49, 'vmstage5', 'detected stage 5 of 5 loading process', 1),
-(50, 'vmconfigcopy', 'copying vm config file', NULL),
-(51, 'imageloadcomplete', 'node ready to add user', 0),
-(52, 'repeat', 'repeat', 0),
-(53, 'deleted', 'deleted', NULL),
-(54, 'begin', 'beginning to process reservation', 0),
-(55, 'exited', 'vcld process exited', 0),
-(56, 'connecttimeout', 'Start Connect Timeout', 0),
-(57, 'beginacknowledgetimeout', 'Start Acknowledge Timeout', 0),
-(59, 'copyfrompartnerMN', 'Copy Image from Partner Management node', 0),
-(60, 'postreserve', 'Post reserve completed', 0);
+INSERT IGNORE INTO `computerloadstate` (`loadstatename`, `prettyname`, `est`) VALUES 
+'info', 'info', 2),
+'loadimageblade', 'must reload computer', 0),
+'loadimagevmware', 'loadimagevmware', 1),
+'statuscheck', 'computer status check', 10),
+'assign2project', 'changing VLAN setting ', 0),
+'rinstall', 'starting install process', 1),
+'dynamicDHCPaddress', 'detecting dynamic IP address', 2),
+'staticIPaddress', 'setting static IP address', 2),
+'loadimagecomplete', 'running post configuration', 0),
+'loadimagefailed', 'preparing computer failed', 2),
+'failed', 'reservation failed', 2),
+'bootstate', 'image loading', 175),
+'editnodetype', 'edit config file to load requested image', 1),
+'xcatstage1', 'detected dhcp request from node', 2),
+'xcatstage2', 'rebooting node for reinstall', 100),
+'WARNING', 'WARNING', 2),
+'xcatREADY', 'computer reported READY starting post configs', 2),
+'reserved', 'ready for Connect', 0),
+'xcatstage3', 'node starting to received install instructions', 93),
+'xcatstage4', 'node received install instructions', 0),
+'xcatstage5', 'starting reload process', 27),
+'doesimageexists', 'confirming image exists locally', 4),
+'vmround1', 'vmround1', 1),
+'vmround2', 'vmround2', 186),
+'transfervm', 'transferring image files to host server', 255),
+'vmsetupconfig', 'creating configuration file', 2),
+'vmstage1', 'detected stage 1 of 5 loading process', 22),
+'vmstage2', 'detected stage 2 of 5 loading process', 120),
+'vmstage3', 'detected stage 3 of 4 loading process', 0),
+'xcatround2', 'waiting for image loading to complete', 0),
+'xcatround3', 'loaded - start post configuration', 0),
+'xcatround1', 'xcatround1', 2),
+'timeout', 'timeout', 2),
+'vmwareready', 'machine online', 3),
+'startload', 'starting load process', 6),
+'addinguser', 'adding user account', 18),
+'connected', 'detected user connection', 2),
+'nodeready', 'resource ready', 0),
+'inuseend10', '10 minute warning ', 2),
+'inuseend5', '5 minute warning', 2),
+'machinebooted', 'machine booting', 68),
+'checklabstatus', 'checking computer status', 2),
+'startvm', 'starting virtual machine', 3),
+'vmstage5', 'detected stage 5 of 5 loading process', 1),
+'vmconfigcopy', 'copying vm config file', NULL),
+'imageloadcomplete', 'node ready to add user', 0),
+'repeat', 'repeat', 0),
+'deleted', 'deleted', NULL),
+'begin', 'beginning to process reservation', 0),
+'exited', 'vcld process exited', 0),
+'acknowledgetimeout', 'start acknowledge timeout', 0),
+'noinitialconnection', 'initial user connection not detected', 0),
+'initialconnecttimeout', 'initial user connection timeout', 0),
+'reconnecttimeout', 'user reconnection timeout', 0),
+'copyfrompartnerMN', 'copy image from partner management node', 0),
+'postreserve', 'post reserve completed', 0);
 
 -- 
 -- Dumping data for table `computerloadflow`
@@ -2056,7 +2059,8 @@ INSERT IGNORE INTO `variable` (`name`, `
 ('schema-version', 'none', '1'),
 ('timesource|global', 'none','time.nist.gov,time-a.nist.gov,time-b.nist.gov,time.windows.com'),
 ('acknowledgetimeout', 'none', '900'),
-('connecttimeout', 'none', '900'),
+('initialconnecttimeout', 'none', '900'),
+('reconnecttimeout', 'none', '900'),
 ('general_inuse_check', 'none', '300'),
 ('server_inuse_check', 'none', '900'),
 ('general_end_notice_first', 'none', '600'),
@@ -2147,7 +2151,9 @@ ALTER TABLE `computer`
 -- Constraints for table `computerloadlog`
 -- 
 ALTER TABLE `computerloadlog`
-  ADD CONSTRAINT `computerloadlog_ibfk_1` FOREIGN KEY (`reservationid`) REFERENCES `reservation`
(`id`) ON DELETE CASCADE;
+  ADD CONSTRAINT `computerloadlog_ibfk_1` FOREIGN KEY (`reservationid`) REFERENCES `reservation`
(`id`) ON DELETE CASCADE,
+  ADD CONSTRAINT `computerloadlog_ibfk_2` FOREIGN KEY (`loadstateid`) REFERENCES `computerloadstate`
(`id`),
+  ADD CONSTRAINT `computerloadlog_ibfk_3` FOREIGN KEY (`computerid`) REFERENCES `computer`
(`id`);
 
 --
 -- Constraints for table `connectmethodmap`



Mime
View raw message