Commit 3e824190 authored by Leigh Stoller's avatar Leigh Stoller

Add isbridge and vlan0,vlan1 to the delays table, for use with bridge

mode, which connects two different links; we need to be able to find
the virt_lans entries for both links. In the normal delay case, there
is just one link.
parent 9e171891
......@@ -444,11 +444,14 @@ CREATE TABLE `delays` (
`eid` varchar(32) default NULL,
`pid` varchar(32) default NULL,
`vname` varchar(32) default NULL,
`vlan0` varchar(32) default NULL,
`vlan1` varchar(32) default NULL,
`vnode0` varchar(32) default NULL,
`vnode1` varchar(32) default NULL,
`card0` tinyint(3) unsigned default NULL,
`card1` tinyint(3) unsigned default NULL,
`noshaping` tinyint(1) default '0',
`isbridge` tinyint(1) default '0',
PRIMARY KEY (`node_id`,`iface0`,`iface1`),
KEY `pid` (`pid`,`eid`),
KEY `exptidx` (`exptidx`)
......
......@@ -31,6 +31,24 @@ sub DoUpdate($$$)
" KEY `pideid` (`pid`,`eid`,`vname`) ".
") ENGINE=MyISAM DEFAULT CHARSET=latin1");
}
if (!DBSlotExists("delays", "isbridge")) {
DBQueryFatal("alter table delays add ".
" `isbridge` tinyint(1) default '0'");
}
#
# The existing vname slot becomes the name of the bridge, while
# vlan0 and vlan1 are the two sides of the delay getting connected
# together.
#
if (!DBSlotExists("delays", "vlan0")) {
DBQueryFatal("alter table delays add ".
" `vlan0` varchar(32) default NULL after vname");
}
if (!DBSlotExists("delays", "vlan1")) {
DBQueryFatal("alter table delays add ".
" `vlan1` varchar(32) default NULL after vlan0");
DBQueryFatal("update delays set vlan0=vname, vlan1=vname");
}
DBQueryFatal("replace into table_regex VALUES ".
" ('virt_nodes','role','text','regex', ".
" '^(node|bridge)\$',0,0,NULL)");
......
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