Commit baf986be authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

1.173: Add "role" to interfaces table, to replace the control_net and

       control_iface join with node_types, since new nodes have more
       than just expt and ctrl interfaces (ixps). The control_net slot
       is bogus anyway. Note that 'jail' is a placeholder for later.
       A 'fake' interface is not to be confused with veth interfaces; it
       is a psuedo interface like that found between an ixp and the host.

       alter table interfaces add \
		role enum('ctrl', 'expt', 'jail', 'fake', 'other') \
		NOT NULL default 'other' after iface;
parent 96447e05
......@@ -451,6 +451,7 @@ CREATE TABLE interfaces (
IPaliases text,
interface_type varchar(30) default NULL,
iface text NOT NULL,
role enum('ctrl', 'expt', 'jail', 'virt') NOT NULL default 'expt',
current_speed enum('100','10','1000') NOT NULL default '100',
duplex enum('full','half') NOT NULL default 'full',
PRIMARY KEY (node_id,card,port),
......
......@@ -872,3 +872,27 @@ last_net_act,last_cpu_act,last_ext_act);
PRIMARY KEY (pid,eid)
) TYPE=MyISAM;
1.173: Add "role" to interfaces table, to replace the control_net and
control_iface join with node_types, since new nodes have more
than just expt and ctrl interfaces (ixps). The control_net slot
is bogus anyway. Note that 'jail' is a placeholder for later.
A 'fake' interface is not to be confused with veth interfaces; it
is a psuedo interface like that found between an ixp and the host.
alter table interfaces add \
role enum('ctrl', 'expt', 'jail', 'fake', 'other') \
NOT NULL default 'other' after iface;
Now we have to set them.
update interfaces set role='ctrl' where \
ip like '155.101.%' or ip like '172.17.%' or \
node_id like 'wa%' or node_id like 'ron%';
update interfaces set role='expt' where \
(ip like '192.168.%' or IP='') and \
(node_id like 'pc%' or node_id like 'ixp%');
update interfaces set role='fake' where \
(interface_type='ixp_fake' and node_id like 'pc%');
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