• Leigh Stoller's avatar
    Various changes to support storing control network vlans in · f55e466c
    Leigh Stoller authored
    the DB, and eventually elabinelab firewalls.
    
           # Allow arbitrary the names for the ids. Forgot who wanted this.
           alter table elabinelab_vlans change `inner_id`
                    `inner_id` varchar(32) NOT NULL default '';
           alter table elabinelab_vlans change `outer_id`
                    `outer_id` varchar(32) NOT NULL default '';
    
           # Tag elabinelab created vlans with the stack module.
           alter table elabinelab_vlans add `stack`
               enum('Control','Experimental') NOT NULL default 'Experimental';
    
           # Tag vlans softstate table with the stack module.
           alter table vlans add `stack`
               enum('Control','Experimental') NOT NULL default 'Experimental';
    
           # A new table, to store softstate on interfaces. snmpit will
           # modify this table whenever a port is enabled/trunked(tagged)
           # on the command line. Eventually speed/duplex should go here.
           CREATE TABLE `interface_state` (
    	  `node_id` varchar(32) NOT NULL default '',
    	  `card` tinyint(3) unsigned NOT NULL default '0',
    	  `port` tinyint(3) unsigned NOT NULL default '0',
    	  `iface` varchar(32) NOT NULL,
    	  `enabled` tinyint(1) default '1',
    	  `tagged` tinyint(1) default '0',
    	  PRIMARY KEY  (`node_id`,`card`,`port`),
    	  KEY `nodeiface` (`node_id`,`iface`)
    	) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
    	# Initialize the above table.
    	insert into interface_state (node_id,card,port,iface)
    	   select node_id,card,port,iface from interfaces;
    
    	# Cleanup the vlans table which was filling with cruft
    	# cause of a bug in the swapout code. Finally figured
    	# out how to combine delete and join!
    	delete v FROM vlans v LEFT JOIN lans l on l.lanid=v.id
    	       WHERE l.lanid IS NULL;
    
            # Fix an unrelated bug; slot overflow.
            alter table nodelog change `log_id`
                    `log_id` int(10) unsigned NOT NULL auto_increment;
    f55e466c
Name
Last commit
Last update
..
GNUmakefile Loading commit data...
bios_move.pl Loading commit data...
close-projadminlists.pl Loading commit data...
create-projadminlists.pl Loading commit data...
database-create-errorlog.sql Loading commit data...
database-create-old.sql Loading commit data...
database-create.sql Loading commit data...
database-fill-supplemental.sql Loading commit data...
database-fill.sql Loading commit data...
database-migrate.txt Loading commit data...
delvnodes.pl Loading commit data...
emulab_pubs.sql Loading commit data...
errors-migrate.pl Loading commit data...
fixstats-swapin.pl Loading commit data...
fixstats_swapmod.pl Loading commit data...
gentopmaps.pl Loading commit data...
init_newids.pl Loading commit data...
init_nodeattrs.pl Loading commit data...
initcerts.pl Loading commit data...
initkey.pl Loading commit data...
initstats.pl Loading commit data...
initvinterfaces.pl Loading commit data...
ipmember.pl Loading commit data...
knowlbase-create.sql Loading commit data...
libtblog-orig.sql Loading commit data...
libtblog.sql Loading commit data...
logfiles.pl Loading commit data...
mod-userstats.pl Loading commit data...
mustdelay.pl Loading commit data...
newlans.pl Loading commit data...
newstates.pl Loading commit data...
nodeutil.pl Loading commit data...
nsfiles.pl Loading commit data...
opsdb.sql Loading commit data...
resources.pl Loading commit data...
sitevars-create.sql Loading commit data...
step2_newids.pl Loading commit data...
step3_newids.pl Loading commit data...
step4_newids.pl Loading commit data...
step5_newids.pl Loading commit data...
tbreport.sql Loading commit data...
templates.sql Loading commit data...
users-create.sql Loading commit data...