Commit c1ae4f06 authored by Leigh Stoller's avatar Leigh Stoller

Remove card,port from virt_node_public_addr, does not appear to be used.

parent 5ea29f4b
......@@ -2628,7 +2628,7 @@ sub CreateVnodes($$$)
( $jailip, $jailmask ) = $query_result->fetchrow_array();
DBQueryFatal( "UPDATE virt_node_public_addr SET " .
"node_id='$vnodeid', card='0', port='1' " .
"node_id='$vnodeid' " .
"WHERE IP='$jailip'" )
if (!$impotent);
} else {
......@@ -2856,7 +2856,7 @@ sub CreateVnodes($$$)
}
foreach my $vnodeid (@created) {
DBQueryWarn("update virt_node_public_addr set ".
" node_id=NULL,card='0',port='0' ".
" node_id=NULL ".
"where node_id='$vnodeid'");
DBQueryWarn("delete from reserved where node_id='$vnodeid'");
DBQueryWarn("delete from nodes where node_id='$vnodeid'");
......@@ -2892,7 +2892,7 @@ sub DeleteVnodes(@)
$interface->Delete();
}
DBQueryWarn("update virt_node_public_addr set ".
" node_id=NULL,card='0',port='0' ".
" node_id=NULL ".
"where node_id='$vnodeid'");
DBQueryWarn("delete from node_bootlogs where node_id='$vnodeid'");
......@@ -3793,7 +3793,7 @@ sub GetJailIP($;$)
my $node_id = $self->node_id();
my $query_result =
DBQueryWarn( "SELECT IP, mask FROM virt_node_public_addr WHERE " .
"node_id='$node_id' AND card='0' AND port='1'" );
"node_id='$node_id'" );
if( $query_result && $query_result->numrows ) {
# we've assigned a public address to this one
......
......@@ -5688,8 +5688,6 @@ CREATE TABLE `virt_node_public_addr` (
`IP` varchar(15) NOT NULL default '',
`mask` varchar(15) default NULL,
`node_id` varchar(32) default NULL,
`card` tinyint(3) unsigned default '0',
`port` smallint(5) unsigned default '0',
`pool_id` varchar(32) default NULL,
`pid` varchar(48) default NULL,
`eid` varchar(32) default NULL,
......
use strict;
use libdb;
use emdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (DBSlotExists("virt_node_public_addr", "card")) {
DBQueryFatal("alter table virt_node_public_addr drop card");
}
if (DBSlotExists("virt_node_public_addr", "port")) {
DBQueryFatal("alter table virt_node_public_addr drop port");
}
return 0;
}
# 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