Commit 7d835f94 authored by David Johnson's avatar David Johnson

Fix tmcc problem; cannot have first nameserver not be boss.

So create /etc/emulab/bossnode, and pscp it around.  Also fix some pssh
output dir bogons.
parent c3fb72f6
......@@ -4157,21 +4157,31 @@ if [ -n "$DESIGNATE_PASS" -a "${USE_DESIGNATE_AS_RESOLVER}" = "1" ]; then
echo "reverting back to non-Designate phys host configuration!"
cp -p /etc/resolv.conf.orig /etc/resolv.conf
else
mkdir -p $OURDIR/pssh.setup-designate-resolv-conf.stdout
mkdir -p $OURDIR/pssh.setup-designate-resolv-conf.stderr
# tmcc finds the bossip via first server in
# /etc/resolv.conf, ugh. So force it to find the bossip
# via this file instead.
echo $mynameserver > /etc/emulab/bossnode
mkdir -p $OURDIR/pssh.setup-designate.stdout
mkdir -p $OURDIR/pssh.setup-designate.stderr
cat $OURDIR/fqdn.map | cut -f1 | grep -v ^$CONTROLLER$ > /tmp/pssh.hosts
echo "*** Saving original /etc/resolv.conf on all hosts..."
$PSSH -h /tmp/pssh.hosts \
-o $OURDIR/pssh.setup-compute.stdout \
-e $OURDIR/pssh.setup-compute.stderr \
-o $OURDIR/pssh.setup-designate.stdout \
-e $OURDIR/pssh.setup-designate.stderr \
/bin/cp -p /etc/resolv.conf /etc/resolv.conf.pre-designate
echo "*** Copying Designate /etc/resolv.conf on all hosts..."
$PSCP -h /tmp/pssh.hosts \
-o $OURDIR/pssh.setup-compute.stdout \
-e $OURDIR/pssh.setup-compute.stderr \
-o $OURDIR/pssh.setup-designate.stdout \
-e $OURDIR/pssh.setup-designate.stderr \
/etc/resolv.conf /etc/resolv.conf
echo "*** Copying /etc/emulab/bossnode to all hosts..."
$PSCP -h /tmp/pssh.hosts \
-o $OURDIR/pssh.setup-designate.stdout \
-e $OURDIR/pssh.setup-designate.stderr \
/etc/emulab/bossnode /etc/emulab/bossnode
fi
else
echo "WARNING: could not redirect phys host DNS to Designate;"
......
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