Commit 14e30daa authored by Mike Hibler's avatar Mike Hibler

New site variables to record IP/mac info for servers.

This is likely temporary until boss, ops, and fs have nodes and interfaces
table entries in the DB. Needed for ARP lockdown code.
parent f57631d1
......@@ -76,7 +76,14 @@ INSERT INTO sitevariables VALUES ('general/open_showexplist',NULL,'','Allow memb
INSERT INTO sitevariables VALUES ('general/linux_endnodeshaping',NULL,'1','Use this sitevar to disable endnodeshaping on linux globally on your testbed',0);
INSERT INTO sitevariables VALUES ('swap/swapout_command','/usr/local/bin/create-swapimage -s','','Command to run in admin MFS on each node of an experiment at swapout time. Runs as swapout user.',0);
INSERT INTO sitevariables VALUES ('swap/swapout_command_timeout','360','120','Time (in seconds) to allow for command completion',0);
INSERT INTO sitevariables VALUES ('node/gw_mac','00:b0:8e:84:69:34','','MAC address of the control net router',0);
INSERT INTO sitevariables VALUES ('node/gw_mac','','','MAC address of the control net router (NULL if none)',0);
INSERT INTO sitevariables VALUES ('node/gw_ip','','','IP address of the control net router (NULL if none)',0);
INSERT INTO sitevariables VALUES ('node/boss_mac','','','MAC address of the boss node (NULL if behind GW)',0);
INSERT INTO sitevariables VALUES ('node/boss_ip','','','IP address of the boss node',0);
INSERT INTO sitevariables VALUES ('node/ops_mac','','','MAC address of the ops node (NULL if behind GW)',0);
INSERT INTO sitevariables VALUES ('node/ops_ip','','','IP address of the ops node',0);
INSERT INTO sitevariables VALUES ('node/fs_mac','','','MAC address of the fs node (NULL if behind GW, same as ops if same node)',0);
INSERT INTO sitevariables VALUES ('node/fs_ip','','','IP address of the fs node (same as ops if same node)',0);
INSERT INTO sitevariables VALUES ('general/default_imagename','FBSD410+RHL90-STD','','Name of the default image for new nodes, assumed to be in the emulab-ops project.',0);
INSERT INTO sitevariables VALUES ('general/joinproject/admincheck','1','0','When set, a project may not have a mix of admin and non-admin users',0);
INSERT INTO sitevariables VALUES ('protogeni/allow_externalusers','1','1','When set, external users may allocate slivers on your testbed.',0);
......
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
# this one has been around for awhile, just fix up the description
if (TBSiteVarExists("node/gw_mac")) {
DBQueryFatal("UPDATE sitevariables SET ".
"description='MAC address of the control net router' ".
"WHERE name='node/gw_mac'");
} else {
DBQueryFatal("INSERT INTO sitevariables VALUES ".
"('node/gw_mac','','',".
"'MAC address of the control net router',0)");
}
# the rest are all new
if (!TBSiteVarExists("node/gw_ip")) {
DBQueryFatal("INSERT INTO sitevariables VALUES ".
"('node/gw_ip','','',".
"'IP address of the control net router (NULL if none)',0)");
}
if (!TBSiteVarExists("node/boss_mac")) {
DBQueryFatal("INSERT INTO sitevariables VALUES ".
"('node/boss_mac','','',".
"'MAC address of the boss node (NULL if behind GW)',0)");
}
if (!TBSiteVarExists("node/boss_ip")) {
DBQueryFatal("INSERT INTO sitevariables VALUES ".
"('node/boss_ip','','',".
"'IP address of the boss node',0)");
}
if (!TBSiteVarExists("node/ops_mac")) {
DBQueryFatal("INSERT INTO sitevariables VALUES ".
"('node/ops_mac','','',".
"'MAC address of the ops node (NULL if behind GW)',0)");
}
if (!TBSiteVarExists("node/ops_ip")) {
DBQueryFatal("INSERT INTO sitevariables VALUES ".
"('node/ops_ip','','',".
"'IP address of the ops node',0)");
}
if (!TBSiteVarExists("node/fs_mac")) {
DBQueryFatal("INSERT INTO sitevariables VALUES ".
"('node/fs_mac','','',".
"'MAC address of the fs node (NULL if behind GW, same as ops if same node)',0)");
}
if (!TBSiteVarExists("node/fs_ip")) {
DBQueryFatal("INSERT INTO sitevariables VALUES ".
"('node/fs_ip','','',".
"'IP address of the fs node (same as ops if same node)',0)");
}
return 0;
}
1;
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