Commit 076cdf0b authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add jailip to nodes table. This is the control network IP for the

jail, to be added as an alias on the control network interface on the
phys node. There is no need for this to be in another table at this
point. Eventually, vnodes will be dynamic anyway, and a number of
things will change, including this.
parent b91e0d7b
......@@ -783,6 +783,7 @@ CREATE TABLE nodes (
ipport_high int(11) NOT NULL default '20000',
sshdport int(11) NOT NULL default '11000',
jailflag tinyint(3) unsigned NOT NULL default '0',
jailip varchar(15) default NULL,
PRIMARY KEY (node_id),
KEY phys_nodeid (phys_nodeid),
KEY node_id (node_id,phys_nodeid),
......
......@@ -619,3 +619,23 @@ last_net_act,last_cpu_act,last_ext_act);
alter table veth_interfaces change iface iface varchar(10)
default NULL;
1.152: Add jailip to nodes table. This is the control network IP for
the jail, to be added as an alias on the control network
interface on the phys node. There is no need for this to be in
another table at this point. Eventually, vnodes will be dynamic
anyway, and a number of things will change, including this.
alter table nodes add jailip varchar(15) default NULL after jailflag;
my $query_result =
DBQueryFatal("select node_id from nodes as n ".
"left join node_types as nt on nt.type=n.type ".
"where nt.class='pcvm'");
while (($node_id) = $query_result->fetchrow_array()) {
my ($p,$v) = ($node_id =~ /pcvm(\d*)-(\d*)/);
DBQueryFatal("update nodes set ".
"jailip='172.16.${p}.${v}' where node_id='$node_id'");
}
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