Commit a54ab062 authored by Mike Hibler's avatar Mike Hibler

Get the "boss IP" from tmccbossinfo() rather than /var/emulab/boot/bossip.

This makes us (closer to) consistent all around and we were populating that
latter file incorrectly anyway!  (though it only mattered with the new
sub-boss mechanism.)
parent ede943b0
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2008-2009 University of Utah and the Flux Group.
# Copyright (c) 2008-2010 University of Utah and the Flux Group.
# All rights reserved.
#
# Implements the libvnode API for OpenVZ support in Emulab.
......@@ -40,8 +40,6 @@ my $VCNET_NET = "172.16.0.0";
my $VCNET_MASK = "255.240.0.0";
my $VCNET_GW = "172.16.0.1";
my $BOSS_IP_FILE = "/var/emulab/boot/bossip";
my $debug = 0;
sub mysystem($);
......@@ -427,12 +425,11 @@ sub findDNS($)
{
my ($ip) = @_;
my $bossip = (-r $BOSS_IP_FILE) ? `cat $BOSS_IP_FILE` : "0";
chomp($bossip);
my ($bossname,$bossip) = libtmcc::tmccbossinfo();
if ($bossip =~ /^(\d+\.\d+\.\d+\.\d+)$/) {
$bossip = $1;
} else {
die "Could not find boss IP address (no $BOSS_IP_FILE?)";
die "Could not find boss IP address (tmccbossinfo failed?)";
}
return $bossip;
......
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2009 University of Utah and the Flux Group.
# Copyright (c) 2009-2010 University of Utah and the Flux Group.
# All rights reserved.
#
use strict;
......@@ -137,7 +137,7 @@ if ($debug) {
# Need the domain, but no conistent way to do it. Ask tmcc for the
# boss node and parse out the domain.
#
my $DOMAINNAME = tmccbossname();
my ($DOMAINNAME,$BOSSIP) = tmccbossinfo();
die("Could not get bossname from tmcc!")
if (!defined($DOMAINNAME));
......@@ -149,10 +149,8 @@ else {
}
#
# Need the bossip, which we get from virthost emulab boot dir:
# Need the bossip, which was returned above
#
my $BOSSIP = `cat $BOOTDIR/bossip`;
chomp($BOSSIP);
if ($BOSSIP !~ /^\d+\.\d+\.\d+\.\d+$/) {
die "Bad bossip '$BOSSIP' in $BOOTDIR/bossip!";
}
......
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2009 University of Utah and the Flux Group.
# Copyright (c) 2009-2010 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -285,7 +285,7 @@ if ($debug) {
# Need the domain, but no conistent way to do it. Ask tmcc for the
# boss node and parse out the domain.
#
my $DOMAINNAME = tmccbossname();
my ($DOMAINNAME,$BOSSIP) = tmccbossinfo();
die("Could not get bossname from tmcc!")
if (!defined($DOMAINNAME));
......@@ -297,10 +297,8 @@ else {
}
#
# Need the bossip, which we get from virthost emulab boot dir:
# Need the bossip, which was returned above.
#
my $BOSSIP = `cat $BOOTDIR/bossip`;
chomp($BOSSIP);
if ($BOSSIP !~ /^\d+\.\d+\.\d+\.\d+$/) {
die "Bad bossip '$BOSSIP' in $BOOTDIR/bossip!";
}
......
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