Commit d1d3373f authored by David Johnson's avatar David Johnson

Fix more Designate bugs; enable the DNS server (bind) on mgmt net.

parent 966a8a97
......@@ -78,7 +78,7 @@ if [ ${DATATUNNELS} -gt 0 ]; then
manila share-network-create --name share-${LAN}-net \
--neutron-net-id $NETID --neutron-subnet-id $SUBNETID
if [ $OSVERSION -ge $OSNEWTON ]; then
neutron net-update $NETID --dns-domain ${mydomain}
neutron net-update $NETID --dns-domain ${mydomain}.
fi
fi
......@@ -131,7 +131,7 @@ for lan in ${DATAFLATLANS} ; do
manila share-network-create --name share-${lan}-net \
--neutron-net-id $NETID --neutron-subnet-id $SUBNETID
if [ $OSVERSION -ge $OSNEWTON ]; then
neutron net-update $NETID --dns-domain ${mydomain}
neutron net-update $NETID --dns-domain ${mydomain}.
fi
fi
done
......@@ -160,7 +160,7 @@ for lan in ${DATAVLANS} ; do
manila share-network-create --name share-${lan}-net \
--neutron-net-id $NETID --neutron-subnet-id $SUBNETID
if [ $OSVERSION -ge $OSNEWTON ]; then
neutron net-update $NETID --dns-domain ${mydomain}
neutron net-update $NETID --dns-domain ${mydomain}.
fi
fi
done
......@@ -190,7 +190,7 @@ if [ ${DATAVXLANS} -gt 0 ]; then
manila share-network-create --name share-${LAN}-net \
--neutron-net-id $NETID --neutron-subnet-id $SUBNETID
if [ $OSVERSION -ge $OSNEWTON ]; then
neutron net-update $NETID --dns-domain ${mydomain}
neutron net-update $NETID --dns-domain ${mydomain}.
fi
fi
......
......@@ -3821,17 +3821,27 @@ if [ $OSVERSION -ge $OSNEWTON -a -z "${DESIGNATE_DBPASS}" ]; then
maybe_install_packages designate bind9 bind9utils bind9-doc
rndc-confgen -a -k designate -c /etc/designate/rndc.key
chgrp bind /etc/designate/rndc.key
chmod g+r /etc/designate/rndc.key
cat <<EOF >>/etc/bind/named.conf.options
mynameserver=`cat /var/emulab/boot/bossip`
cat <<EOF >/etc/bind/named.conf.options
include "/etc/designate/rndc.key";
options {
...
directory "/var/cache/bind";
forwarders {
$mynameserver;
};
dnssec-validation auto;
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
allow-new-zones yes;
request-ixfr no;
listen-on port 53 { 127.0.0.1; };
recursion no;
allow-query { 127.0.0.1; };
listen-on port 53 { 127.0.0.1; ${MGMTIP}; };
recursion yes;
allow-query { 127.0.0.1; ${MGMTIP}/${MGMTPREFIX}; };
};
controls {
......
......@@ -731,6 +731,24 @@ fi
#
maybe_install_packages crudini
netmask2prefix() {
nm=$1
bits=0
IFS=.
read -r i1 i2 i3 i4 <<EOF
$nm
EOF
unset IFS
for n in $i1 $i2 $i3 $i4 ; do
v=128
while [ $v -gt 0 ]; do
bits=`expr $bits + \( \( $n / $v \) % 2 \)`
v=`expr $v / 2`
done
done
echo $bits
}
#
# Create IP addresses for the Management and Data networks, as necessary.
#
......@@ -1067,6 +1085,7 @@ fi
if [ ! -e $OURDIR/info.mgmt ]; then
MGMTIP=`grep -E "$NODEID$" $OURDIR/mgmt-hosts | head -1 | sed -n -e 's/^\\([0-9]*\\.[0-9]*\\.[0-9]*\\.[0-9]*\\).*$/\\1/p'`
MGMTNETMASK=`cat $OURDIR/mgmt-netmask`
MGMTPREFIX=`netmask2prefix $MGMTNETMASK`
if [ -z "$MGMTLAN" ] ; then
MGMTVLAN=0
MVMTVLANDEV=
......@@ -1088,6 +1107,7 @@ if [ ! -e $OURDIR/info.mgmt ]; then
fi
echo "MGMTIP='$MGMTIP'" >> $OURDIR/info.mgmt
echo "MGMTNETMASK='$MGMTNETMASK'" >> $OURDIR/info.mgmt
echo "MGMTPREFIX='$MGMTPREFIX'" >> $OURDIR/info.mgmt
echo "MGMTVLAN=$MGMTVLAN" >> $OURDIR/info.mgmt
echo "MGMTMAC='$MGMTMAC'" >> $OURDIR/info.mgmt
echo "MGMT_NETWORK_INTERFACE='$MGMT_NETWORK_INTERFACE'" >> $OURDIR/info.mgmt
......
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