Commit 2b095d85 authored by Leigh B Stoller's avatar Leigh B Stoller

Add cnet_mac to node_history table, for recording the control mac

address that is assigned. For ProtoGeni.
parent 738d207c
......@@ -2376,6 +2376,7 @@ CREATE TABLE `node_history` (
`exptidx` int(10) unsigned default NULL,
`stamp` int(10) unsigned default NULL,
`cnet_IP` varchar(15) default NULL,
`cnet_mac` varchar(12) default NULL,
`phys_nodeid` varchar(32) default NULL,
PRIMARY KEY (`history_id`),
KEY `node_id` (`node_id`,`history_id`),
......@@ -2384,7 +2385,9 @@ CREATE TABLE `node_history` (
KEY `cnet_IP` (`cnet_IP`),
KEY `nodestamp` (`node_id`,`stamp`),
KEY `ipstamp` (`cnet_IP`,`stamp`),
KEY `hid_stamp` (`history_id`,`stamp`)
KEY `hid_stamp` (`history_id`,`stamp`),
KEY `cnet_mac` (`cnet_mac`),
KEY `macstamp` (`cnet_mac`,`stamp`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
......
#
# Add more slots to node_history to allow recording dynamic virtual nodes.
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("node_history", "cnet_mac")) {
print " *** Updating a big table ... please be very patient.\n";
DBQueryFatal("alter table node_history ".
" add `cnet_mac` varchar(12) default NULL ".
" after cnet_IP," .
" add KEY `cnet_mac` (`cnet_mac`),".
" add KEY `macstamp` (`cnet_mac`,`stamp`)");
}
return 0;
}
1;
# Local Variables:
# mode:perl
# End:
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