Commit 24c8192f authored by David Johnson's avatar David Johnson

Minor bugfixes.

parent 52a9c335
......@@ -124,7 +124,7 @@ fi
# If using LVM, create an LV that is 70% of VGTOTAL.
#
if [ $LVM -eq 1 ]; then
LVNAME=k8s
LVNAME=openstack
echo "LVNAME=${LVNAME}" >> $LOCALSETTINGS
vgt=`expr $VGTOTAL - 1`
LV_SIZE=`perl -e "print 0.75 * $vgt;"`
......
......@@ -67,7 +67,7 @@ COMPUTEBASENAME="cp"
#STORAGEHOST=""
#SHAREHOST=""
#OBJECTHOST=""
COMPUTENODES=""
COMPUTE=""
#BAREMETALNODES=""
#BLOCKNODES=""
#OBJECTNODES=""
......@@ -255,7 +255,7 @@ fi
# global labels.
#
if [ ! -e $OURDIR/parameters ]; then
python2 manifest-to-parameters.py $OURDIR/manifests.0.xml > $OURDIR/parameters
python2 $DIRNAME/manifest-to-parameters.py $OURDIR/manifests.0.xml > $OURDIR/parameters
fi
. $OURDIR/parameters
......@@ -282,7 +282,7 @@ if [ ! -f $OURDIR/publicaddrs ]; then
python2 $DIRNAME/manifest-to-publicaddrs.py $OURDIR/manifests.0.xml $CLUSTER > $OURDIR/publicaddrs.raw
PUBLICADDRS=`cat $OURDIR/publicaddrs.raw | sed -e 's|^\([^/]*\)/.*$|\1|' | xargs`
PUBLICADDRCOUNT=`cat $OURDIR/publicaddrs.raw | wc -l`
PUBLICADDRNETMASK=`cat $OURDIR/publicaddrs.raw | sed -e 's|^[^/]*/\(.*\)$|\1|' | xargs`
PUBLICADDRNETMASK=`cat $OURDIR/publicaddrs.raw | sed -e 's|^[^/]*/\(.*\)$|\1|' | head -1`
cat <<EOF > $OURDIR/publicaddrs
PUBLICADDRS="$PUBLICADDRS"
PUBLICADDRCOUNT=$PUBLICADDRCOUNT
......@@ -446,7 +446,7 @@ if [ ! $? = 0 ]; then
echo "CONTROLLER=\"${CONTROLLER}\"" >> $SETTINGS
echo "STORAGEHOST=\"${STORAGEHOST}\"" >> $SETTINGS
echo "OBJECTHOST=\"${OBJECTHOST}\"" >> $SETTINGS
echo "COMPUTENODES=\"${COMPUTENODES}\"" >> $SETTINGS
echo "COMPUTE=\"${COMPUTE}\"" >> $SETTINGS
fi
##
......@@ -544,6 +544,15 @@ if [ ! -f $OURDIR/mgmt-hosts ] ; then
netmask=`cat ${BOOTDIR}/tmcc/ifconfig \
| sed -n -e "s/^.* MASK=\([0-9\.]*\) .* LAN=${lan}.*$/\1/p"`
echo "$netmask" > $OURDIR/data-netmask.$lan
exip=`cat $OURDIR/data-hosts.${lan} | head -1`
IFS=.
read -r i1 i2 i3 i4 <<EOF
$exip
EOF
read -r m1 m2 m3 m4 <<EOF
$netmask
EOF
unset IFS
network=`printf "%d.%d.%d.%d\n" "$((i1 & m1))" "$((i2 & m2))" "$((i3 & m3))" "$((i4 & m4))"`
cidr=`python $DIRNAME/ipcalc.py mask2bits $netmask`
echo "$network/$cidr" > $OURDIR/data-cidr.$lan
......
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