Commit 8a7a353f authored by Mac Newbold's avatar Mac Newbold
Browse files

Fix the comments table so that rerunning db-fill doesn't bloat things. (If

a null field is part of a primary key, there are no collisions. So
table_name "foo" and column_name NULL can have multiple rows, which is
bad.)

Also updated some state timeouts.
parent e988689a
......@@ -25,8 +25,8 @@ CREATE TABLE cdroms (
CREATE TABLE comments (
table_name varchar(64) NOT NULL default '',
column_name varchar(64) default NULL,
description text,
column_name varchar(64) NOT NULL default '',
description text NOT NULL,
UNIQUE KEY table_name (table_name,column_name)
) TYPE=MyISAM;
......
......@@ -9,103 +9,55 @@
--
REPLACE INTO comments VALUES ('users',NULL,'testbed user accounts');
REPLACE INTO comments VALUES ('experiments',NULL,'user experiments');
REPLACE INTO comments VALUES ('images',NULL,'available disk images');
REPLACE INTO comments VALUES ('current_reloads',NULL,'currently pending disk reloads');
REPLACE INTO comments VALUES ('delays',NULL,'delay nodes');
REPLACE INTO comments VALUES ('loginmessage',NULL,'appears under login button in web interface');
REPLACE INTO comments VALUES ('nodes',NULL,'hardware, software, and status of testbed machines');
REPLACE INTO comments VALUES ('projects',NULL,'projects using the testbed');
REPLACE INTO comments VALUES ('partitions',NULL,'loaded operating systems on node partitions');
REPLACE INTO comments VALUES ('os_info',NULL,'available operating system features and information');
REPLACE INTO comments VALUES ('reserved',NULL,'node reservation');
REPLACE INTO comments VALUES ('wires',NULL,'physical wire types and connections');
REPLACE INTO comments VALUES ('nologins',NULL,'presence of a row will disallow non-admin web logins');
REPLACE INTO comments VALUES ('nsfiles',NULL,'NS simulator files used to configure experiments');
REPLACE INTO comments VALUES ('tiplines',NULL,'serial control \'TIP\' lines');
REPLACE INTO comments VALUES ('proj_memb',NULL,'project membership');
REPLACE INTO comments VALUES ('group_membership',NULL,'group membership');
REPLACE INTO comments VALUES ('node_types',NULL,'specifications regarding types of node hardware available');
REPLACE INTO comments VALUES ('last_reservation',NULL,'the last project to have reserved listed nodes');
REPLACE INTO comments VALUES ('groups',NULL,'groups information');
REPLACE INTO comments VALUES ('vlans',NULL,'configured router VLANs');
REPLACE INTO comments VALUES ('tipservers',NULL,'machines driving serial control \'TIP\' lines');
REPLACE INTO comments VALUES ('uidnodelastlogin',NULL,'last node logged into by users');
REPLACE INTO comments VALUES ('nodeuidlastlogin',NULL,'last user logged in to nodes');
REPLACE INTO comments VALUES ('scheduled_reloads',NULL,'pending disk reloads');
REPLACE INTO comments VALUES ('tmcd_redirect',NULL,'used to redirect node configuration client (TMCC) to \'fake\' database for testing purposes');
REPLACE INTO comments VALUES ('deltas',NULL,'user filesystem deltas');
REPLACE INTO comments VALUES ('delta_compat',NULL,'delta/OS compatibilities');
REPLACE INTO comments VALUES ('delta_inst',NULL,'nodes on which listed deltas are installed');
REPLACE INTO comments VALUES ('delta_proj',NULL,'projects which own listed deltas');
REPLACE INTO comments VALUES ('next_reserve',NULL,'scheduled reservations (e.g. by sched_reserve)');
REPLACE INTO comments VALUES ('outlets',NULL,'power controller and outlet connections for nodes');
REPLACE INTO comments VALUES ('exppid_access',NULL,'allows access to one project\'s experiment by another project');
REPLACE INTO comments VALUES ('lastlogin',NULL,'list of recently logged in web interface users');
REPLACE INTO comments VALUES ('switch_stacks',NULL,'switch stack membership');
REPLACE INTO comments VALUES ('switch_stack_types',NULL,'types of each switch stack');
REPLACE INTO comments VALUES ('nodelog',NULL,'log entries for nodes');
REPLACE INTO comments VALUES ('unixgroup_membership',NULL,'Unix group memberships for control (non-experiment) nodes');
REPLACE INTO comments VALUES ('interface_types',NULL,'network interface types');
REPLACE INTO comments VALUES ('users','','testbed user accounts');
REPLACE INTO comments VALUES ('experiments','','user experiments');
REPLACE INTO comments VALUES ('images','','available disk images');
REPLACE INTO comments VALUES ('current_reloads','','currently pending disk reloads');
REPLACE INTO comments VALUES ('delays','','delay nodes');
REPLACE INTO comments VALUES ('loginmessage','','appears under login button in web interface');
REPLACE INTO comments VALUES ('nodes','','hardware, software, and status of testbed machines');
REPLACE INTO comments VALUES ('projects','','projects using the testbed');
REPLACE INTO comments VALUES ('partitions','','loaded operating systems on node partitions');
REPLACE INTO comments VALUES ('os_info','','available operating system features and information');
REPLACE INTO comments VALUES ('reserved','','node reservation');
REPLACE INTO comments VALUES ('wires','','physical wire types and connections');
REPLACE INTO comments VALUES ('nologins','','presence of a row will disallow non-admin web logins');
REPLACE INTO comments VALUES ('nsfiles','','NS simulator files used to configure experiments');
REPLACE INTO comments VALUES ('tiplines','','serial control \'TIP\' lines');
REPLACE INTO comments VALUES ('proj_memb','','project membership');
REPLACE INTO comments VALUES ('group_membership','','group membership');
REPLACE INTO comments VALUES ('node_types','','specifications regarding types of node hardware available');
REPLACE INTO comments VALUES ('last_reservation','','the last project to have reserved listed nodes');
REPLACE INTO comments VALUES ('groups','','groups information');
REPLACE INTO comments VALUES ('vlans','','configured router VLANs');
REPLACE INTO comments VALUES ('tipservers','','machines driving serial control \'TIP\' lines');
REPLACE INTO comments VALUES ('uidnodelastlogin','','last node logged into by users');
REPLACE INTO comments VALUES ('nodeuidlastlogin','','last user logged in to nodes');
REPLACE INTO comments VALUES ('scheduled_reloads','','pending disk reloads');
REPLACE INTO comments VALUES ('tmcd_redirect','','used to redirect node configuration client (TMCC) to \'fake\' database for testing purposes');
REPLACE INTO comments VALUES ('deltas','','user filesystem deltas');
REPLACE INTO comments VALUES ('delta_compat','','delta/OS compatibilities');
REPLACE INTO comments VALUES ('delta_inst','','nodes on which listed deltas are installed');
REPLACE INTO comments VALUES ('delta_proj','','projects which own listed deltas');
REPLACE INTO comments VALUES ('next_reserve','','scheduled reservations (e.g. by sched_reserve)');
REPLACE INTO comments VALUES ('outlets','','power controller and outlet connections for nodes');
REPLACE INTO comments VALUES ('exppid_access','','allows access to one project\'s experiment by another project');
REPLACE INTO comments VALUES ('lastlogin','','list of recently logged in web interface users');
REPLACE INTO comments VALUES ('switch_stacks','','switch stack membership');
REPLACE INTO comments VALUES ('switch_stack_types','','types of each switch stack');
REPLACE INTO comments VALUES ('nodelog','','log entries for nodes');
REPLACE INTO comments VALUES ('unixgroup_membership','','Unix group memberships for control (non-experiment) nodes');
REPLACE INTO comments VALUES ('interface_types','','network interface types');
REPLACE INTO comments VALUES ('foo','bar','baz');
REPLACE INTO comments VALUES ('login',NULL,'currently active web logins');
REPLACE INTO comments VALUES ('portmap',NULL,'provides consistency of ports across swaps');
REPLACE INTO comments VALUES ('webdb_table_permissions',NULL,'table access permissions for WebDB interface ');
REPLACE INTO comments VALUES ('comments',NULL,'database table and row descriptions (such as this)');
REPLACE INTO comments VALUES ('interfaces',NULL,'node network interfaces');
REPLACE INTO comments VALUES ('foreign_keys',NULL,'foreign key constraints for use by the dbcheck script');
REPLACE INTO comments VALUES ('nseconfigs',NULL,'Table for storing NSE configurations');
REPLACE INTO comments VALUES ('widearea_delays',NULL,'Delay and bandwidth metrics between WAN nodes');
REPLACE INTO comments VALUES ('virt_nodes',NULL,'Experiment virtual nodes');
REPLACE INTO comments VALUES ('users',NULL,'testbed user accounts');
REPLACE INTO comments VALUES ('experiments',NULL,'user experiments');
REPLACE INTO comments VALUES ('images',NULL,'available disk images');
REPLACE INTO comments VALUES ('current_reloads',NULL,'currently pending disk reloads');
REPLACE INTO comments VALUES ('delays',NULL,'delay nodes');
REPLACE INTO comments VALUES ('loginmessage',NULL,'appears under login button in web interface');
REPLACE INTO comments VALUES ('nodes',NULL,'hardware, software, and status of testbed machines');
REPLACE INTO comments VALUES ('projects',NULL,'projects using the testbed');
REPLACE INTO comments VALUES ('partitions',NULL,'loaded operating systems on node partitions');
REPLACE INTO comments VALUES ('os_info',NULL,'available operating system features and information');
REPLACE INTO comments VALUES ('reserved',NULL,'node reservation');
REPLACE INTO comments VALUES ('wires',NULL,'physical wire types and connections');
REPLACE INTO comments VALUES ('nologins',NULL,'presence of a row will disallow non-admin web logins');
REPLACE INTO comments VALUES ('nsfiles',NULL,'NS simulator files used to configure experiments');
REPLACE INTO comments VALUES ('tiplines',NULL,'serial control \'TIP\' lines');
REPLACE INTO comments VALUES ('proj_memb',NULL,'project membership');
REPLACE INTO comments VALUES ('group_membership',NULL,'group membership');
REPLACE INTO comments VALUES ('node_types',NULL,'specifications regarding types of node hardware available');
REPLACE INTO comments VALUES ('last_reservation',NULL,'the last project to have reserved listed nodes');
REPLACE INTO comments VALUES ('groups',NULL,'groups information');
REPLACE INTO comments VALUES ('vlans',NULL,'configured router VLANs');
REPLACE INTO comments VALUES ('tipservers',NULL,'machines driving serial control \'TIP\' lines');
REPLACE INTO comments VALUES ('uidnodelastlogin',NULL,'last node logged into by users');
REPLACE INTO comments VALUES ('nodeuidlastlogin',NULL,'last user logged in to nodes');
REPLACE INTO comments VALUES ('scheduled_reloads',NULL,'pending disk reloads');
REPLACE INTO comments VALUES ('tmcd_redirect',NULL,'used to redirect node configuration client (TMCC) to \'fake\' database for testing purposes');
REPLACE INTO comments VALUES ('deltas',NULL,'user filesystem deltas');
REPLACE INTO comments VALUES ('delta_compat',NULL,'delta/OS compatibilities');
REPLACE INTO comments VALUES ('delta_inst',NULL,'nodes on which listed deltas are installed');
REPLACE INTO comments VALUES ('delta_proj',NULL,'projects which own listed deltas');
REPLACE INTO comments VALUES ('next_reserve',NULL,'scheduled reservations (e.g. by sched_reserve)');
REPLACE INTO comments VALUES ('outlets',NULL,'power controller and outlet connections for nodes');
REPLACE INTO comments VALUES ('exppid_access',NULL,'allows access to one project\'s experiment by another project');
REPLACE INTO comments VALUES ('lastlogin',NULL,'list of recently logged in web interface users');
REPLACE INTO comments VALUES ('switch_stacks',NULL,'switch stack membership');
REPLACE INTO comments VALUES ('switch_stack_types',NULL,'types of each switch stack');
REPLACE INTO comments VALUES ('nodelog',NULL,'log entries for nodes');
REPLACE INTO comments VALUES ('unixgroup_membership',NULL,'Unix group memberships for control (non-experiment) nodes');
REPLACE INTO comments VALUES ('interface_types',NULL,'network interface types');
REPLACE INTO comments VALUES ('login',NULL,'currently active web logins');
REPLACE INTO comments VALUES ('portmap',NULL,'provides consistency of ports across swaps');
REPLACE INTO comments VALUES ('webdb_table_permissions',NULL,'table access permissions for WebDB interface ');
REPLACE INTO comments VALUES ('comments',NULL,'database table and row descriptions (such as this)');
REPLACE INTO comments VALUES ('interfaces',NULL,'node network interfaces');
REPLACE INTO comments VALUES ('foreign_keys',NULL,'foreign key constraints for use by the dbcheck script');
REPLACE INTO comments VALUES ('nseconfigs',NULL,'Table for storing NSE configurations');
REPLACE INTO comments VALUES ('widearea_delays',NULL,'Delay and bandwidth metrics between WAN nodes');
REPLACE INTO comments VALUES ('virt_nodes',NULL,'Experiment virtual nodes');
REPLACE INTO comments VALUES ('login','','currently active web logins');
REPLACE INTO comments VALUES ('portmap','','provides consistency of ports across swaps');
REPLACE INTO comments VALUES ('webdb_table_permissions','','table access permissions for WebDB interface ');
REPLACE INTO comments VALUES ('comments','','database table and row descriptions (such as this)');
REPLACE INTO comments VALUES ('interfaces','','node network interfaces');
REPLACE INTO comments VALUES ('foreign_keys','','foreign key constraints for use by the dbcheck script');
REPLACE INTO comments VALUES ('nseconfigs','','Table for storing NSE configurations');
REPLACE INTO comments VALUES ('widearea_delays','','Delay and bandwidth metrics between WAN nodes');
REPLACE INTO comments VALUES ('virt_nodes','','Experiment virtual nodes');
--
-- Dumping data for table 'event_eventtypes'
......@@ -257,7 +209,7 @@ REPLACE INTO mode_transitions VALUES ('RELOAD','SHUTDOWN','NORMALv1','SHUTDOWN')
REPLACE INTO state_timeouts VALUES ('NORMAL','REBOOTING',120,'REBOOT');
REPLACE INTO state_timeouts VALUES ('NORMAL','REBOOTED',60,'NOTIFY');
REPLACE INTO state_timeouts VALUES ('NORMAL','REBOOTED',120,'REBOOT');
REPLACE INTO state_timeouts VALUES ('NORMAL','ISUP',0,'');
REPLACE INTO state_timeouts VALUES ('MINIMAL','SHUTDOWN',120,'REBOOT');
REPLACE INTO state_timeouts VALUES ('NORMALv1','SHUTDOWN',120,'REBOOT');
......@@ -280,7 +232,7 @@ REPLACE INTO state_timeouts VALUES ('NODEALLOC','RESERVED',0,'');
REPLACE INTO state_timeouts VALUES ('NORMAL','BOOTING',180,'REBOOT');
REPLACE INTO state_timeouts VALUES ('NORMALv1','BOOTING',180,'REBOOT');
REPLACE INTO state_timeouts VALUES ('NORMALv1','ISUP',0,'');
REPLACE INTO state_timeouts VALUES ('NORMALv1','TBSETUP',600,'NOTIFY');
REPLACE INTO state_timeouts VALUES ('NORMALv1','TBSETUP',15,'REBOOT');
REPLACE INTO state_timeouts VALUES ('RELOAD','BOOTING',180,'REBOOT');
REPLACE INTO state_timeouts VALUES ('RELOAD','RELOADING',600,'NOTIFY');
REPLACE INTO state_timeouts VALUES ('RELOAD','RELOADSETUP',60,'NOTIFY');
......@@ -289,14 +241,14 @@ REPLACE INTO state_timeouts VALUES ('USERSTATUS','ACTIVE',0,'');
REPLACE INTO state_timeouts VALUES ('USERSTATUS','FROZEN',0,'');
REPLACE INTO state_timeouts VALUES ('USERSTATUS','NEWUSER',0,'');
REPLACE INTO state_timeouts VALUES ('USERSTATUS','UNAPPROVED',0,'');
REPLACE INTO state_timeouts VALUES ('TBCOMMAND','REBOOT',15,'CMDRETRY');
REPLACE INTO state_timeouts VALUES ('TBCOMMAND','POWEROFF',0,'CMDRETRY');
REPLACE INTO state_timeouts VALUES ('TBCOMMAND','POWERON',0,'CMDRETRY');
REPLACE INTO state_timeouts VALUES ('TBCOMMAND','POWERCYCLE',0,'CMDRETRY');
REPLACE INTO state_timeouts VALUES ('PCVM','BOOTING',180,'NOTIFY');
REPLACE INTO state_timeouts VALUES ('PCVM','SHUTDOWN',0,'');
REPLACE INTO state_timeouts VALUES ('PCVM','ISUP',0,'');
REPLACE INTO state_timeouts VALUES ('PCVM','TBSETUP',600,'NOTIFY');
REPLACE INTO state_timeouts VALUES ('TBCOMMAND','REBOOT',60,'CMDRETRY');
REPLACE INTO state_timeouts VALUES ('TBCOMMAND','POWEROFF',0,'CMDRETRY');
REPLACE INTO state_timeouts VALUES ('TBCOMMAND','POWERON',0,'CMDRETRY');
REPLACE INTO state_timeouts VALUES ('TBCOMMAND','POWERCYCLE',0,'CMDRETRY');
--
-- Dumping data for table 'state_transitions'
......
......@@ -686,3 +686,10 @@ last_net_act,last_cpu_act,last_ext_act);
while (($idx,$creator) = $query_result->fetchrow_array()) {
print "update testbed_stats set uid='$creator' where idx=$idx;\n";
}
1.157 Take nulls out of comments table, so primary key works right.
alter ignore table comments modify description text not null;
alter ignore table comments modify
column_name varchar(64) not null default "";
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