Commit 06494f5d authored by David Johnson's avatar David Johnson

Add some simple profiling code... openstack is slowing down swapins!

parent 172a87de
......@@ -21,6 +21,8 @@ if [ "$HOSTNAME" != "$CONTROLLER" ]; then
exit 0;
fi
logtstart "basic-networks"
if [ -f $SETTINGS ]; then
. $SETTINGS
fi
......@@ -160,4 +162,6 @@ if [ ${DATAVXLANS} -gt 0 ]; then
done
fi
logtend "basic-networks"
exit 0
......@@ -21,6 +21,8 @@ if [ "$HOSTNAME" != "$CONTROLLER" ]; then
exit 0;
fi
logtstart "basic-quotas"
if [ -f $SETTINGS ]; then
. $SETTINGS
fi
......@@ -86,3 +88,5 @@ if [ $QUOTASOFF -eq 1 ]; then
openstack quota set --class --snapshots -1 admin
openstack quota set --class --volume-type -1 admin
fi
logtend "basic-quotas"
......@@ -21,6 +21,8 @@ if [ "$HOSTNAME" != "$CONTROLLER" ]; then
exit 0;
fi
logtstart "basic-users"
if [ -f $SETTINGS ]; then
. $SETTINGS
fi
......@@ -50,4 +52,6 @@ if [ $GENIUSER -eq 1 ] ; then
$DIRNAME/setup-user-info.py
fi
logtend "basic-users"
exit 0
......@@ -21,6 +21,8 @@ if [ "$HOSTNAME" != "$CONTROLLER" ]; then
exit 0;
fi
logtstart "basic"
if [ -f $SETTINGS ]; then
. $SETTINGS
fi
......@@ -69,4 +71,6 @@ for pid in "$quotaspid $networkspid $userspid" ; do
wait $pid
done
logtend "basic"
exit 0
......@@ -23,6 +23,8 @@ if [ -f $OURDIR/setup-compute-network-done ]; then
exit 0
fi
logtstart "compute-network"
if [ -f $SETTINGS ]; then
. $SETTINGS
fi
......@@ -75,4 +77,6 @@ fi
touch $OURDIR/setup-compute-network-done
logtend "compute-network"
exit 0
......@@ -23,6 +23,8 @@ if [ -f $OURDIR/setup-compute-telemetry-done ]; then
exit 0
fi
logtstart "compute-telemetry"
if [ -f $SETTINGS ]; then
. $SETTINGS
fi
......@@ -165,4 +167,6 @@ service_restart ceilometer-agent-compute
touch $OURDIR/setup-compute-telemetry-done
logtend "compute-telemetry"
exit 0
......@@ -25,6 +25,8 @@ if [ -f $OURDIR/setup-compute-done ]; then
exit 0
fi
logtstart "compute"
if [ -f $SETTINGS ]; then
. $SETTINGS
fi
......@@ -192,4 +194,6 @@ service_enable libvirt-bin
touch $OURDIR/setup-compute-done
logtend "compute"
exit 0
This diff is collapsed.
......@@ -12,6 +12,7 @@ fi
# Grab our libs
. "$DIRNAME/setup-lib.sh"
logtstart "driver"
# Copy our source code into $OURDIR for future use:
echo "*** Copying source code into $OURDIR/bin ..."
......@@ -113,13 +114,17 @@ if [ "$HOSTNAME" = "$CONTROLLER" ]; then
sleep 1
done
logtend "driver"
echo "*** Building an Openstack!"
exec /bin/sh -c "$DIRNAME/setup-controller.sh 1> $OURDIR/setup-controller.log 2>&1 </dev/null"
exit 1
elif [ "$HOSTNAME" != "$NETWORKMANAGER" ]; then
logtend "driver"
exit 0;
fi
logtend "driver"
exit 0
......@@ -21,6 +21,8 @@ if [ "$HOSTNAME" != "$CONTROLLER" ]; then
exit 0;
fi
logtstart "images-aarch64"
if [ -f $SETTINGS ]; then
. $SETTINGS
fi
......@@ -46,3 +48,4 @@ fi
# NB: do not exit; we are included!
#
logtend "images-aarch64"
......@@ -21,6 +21,8 @@ if [ "$HOSTNAME" != "$CONTROLLER" ]; then
exit 0;
fi
logtstart "images-x86_64"
if [ -f $SETTINGS ]; then
. $SETTINGS
fi
......@@ -77,3 +79,5 @@ fi
#
# NB: do not exit; we are included!
#
logtend "images-x86_64"
......@@ -28,6 +28,8 @@ if [ "$HOSTNAME" != "$CONTROLLER" ]; then
exit 0;
fi
logtstart "images"
if [ -f $SETTINGS ]; then
. $SETTINGS
fi
......@@ -99,4 +101,6 @@ fi
#
lockfile-remove $IMAGESETUPLOCKFILE
logtend "images"
exit 0
......@@ -12,6 +12,40 @@ TOPOMAP=$OURDIR/topomap
BOOTDIR=/var/emulab/boot
TMCC=/usr/local/etc/emulab/tmcc
# Setup time logging stuff early
TIMELOGFILE=$OURDIR/setup-time.log
FIRSTTIME=0
if [ ! -f $OURDIR/setup-lib-first ]; then
touch $OURDIR/setup-lib-first
FIRSTTIME=`date +%s`
fi
logtstart() {
area=$1
varea=`echo $area | sed -e 's/[^a-zA-Z_0-9]/_/g'`
stamp=`date +%s`
date=`date`
eval "LOGTIMESTART_$varea=$stamp"
echo "START $area $stamp $date" >> $TIMELOGFILE
}
logtend() {
area=$1
#varea=${area//-/_}
varea=`echo $area | sed -e 's/[^a-zA-Z_0-9]/_/g'`
stamp=`date +%s`
date=`date`
eval "tss=\$LOGTIMESTART_$varea"
tsres=`expr $stamp - $tss`
resmin=`perl -e 'print '"$tsres"' / 60.0 . "\n"'`
echo "END $area $stamp $date" >> $TIMELOGFILE
echo "TOTAL $area $tsres $resmin" >> $TIMELOGFILE
}
if [ $FIRSTTIME -ne 0 ]; then
logtstart "libfirsttime"
fi
mkdir -p $OURDIR
touch $SETTINGS
touch $LOCALSETTINGS
......@@ -1316,3 +1350,8 @@ get_url() {
/bin/false
fi
}
# Time logging
if [ $FIRSTTIME -ne 0 ]; then
logtend "libfirsttime"
fi
......@@ -22,6 +22,8 @@ fi
# Grab our libs
. "`dirname $0`/setup-lib.sh"
logtstart "linuxbridge-node"
#
# Figure out which interfaces need to go where. We already have
# $EXTERNAL_NETWORK_INTERFACE from setup-lib.sh , and it and its configuration
......@@ -182,6 +184,8 @@ if [ ! ${HAVE_SYSTEMD} -eq 0 ] ; then
systemctl daemon-reload
fi
logtend "linuxbridge-node"
exit 0
#
......
......@@ -24,6 +24,8 @@ if [ "$HOSTNAME" != "$NETWORKMANAGER" ]; then
exit 0;
fi
logtstart "linuxbridge"
maybe_install_packages pssh
PSSH='/usr/bin/parallel-ssh -t 0 -O StrictHostKeyChecking=no '
PHOSTS=""
......@@ -45,4 +47,6 @@ echo "*** Setting up LinuxBridge via pssh: $PHOSTS"
$PSSH -o $OURDIR/pssh.setup-linuxbridge-node.stdout -e $OURDIR/pssh.setup-linuxbridge-node.stderr \
$PHOSTS $DIRNAME/setup-linuxbridge-node.sh
logtend "linuxbridge"
exit 0
......@@ -19,6 +19,8 @@ if [ -f $OURDIR/setup-network-plugin-linuxbridge-done ]; then
exit 0
fi
logtstart "network-plugin-linuxbridge"
if [ -f $SETTINGS ]; then
. $SETTINGS
fi
......@@ -220,4 +222,6 @@ fi
touch $OURDIR/setup-network-plugin-linuxbridge-done
logtend "network-plugin-linuxbridge"
exit 0
......@@ -19,6 +19,8 @@ if [ -f $OURDIR/setup-network-plugin-openvswitch-done ]; then
exit 0
fi
logtstart "network-plugin-openvswitch"
if [ -f $SETTINGS ]; then
. $SETTINGS
fi
......@@ -203,4 +205,6 @@ fi
touch $OURDIR/setup-network-plugin-openvswitch-done
logtend "network-plugin-openvswitch"
exit 0
......@@ -19,6 +19,8 @@ if [ -f $OURDIR/setup-network-plugin-done ]; then
exit 0
fi
logtstart "network-plugin"
if [ -f $SETTINGS ]; then
. $SETTINGS
fi
......@@ -34,8 +36,10 @@ fi
if [ $? -eq 0 ]; then
touch $OURDIR/setup-network-plugin-done
logtend "network-plugin"
exit 0
else
err=$?
logtend "network-plugin"
exit $err
fi
......@@ -23,6 +23,8 @@ if [ -f $OURDIR/setup-networkmanager-done ]; then
exit 0
fi
logtstart "networkmanager"
if [ -f $SETTINGS ]; then
. $SETTINGS
fi
......@@ -161,4 +163,6 @@ service_enable neutron-metering-agent
touch $OURDIR/setup-networkmanager-done
logtend "networkmanager"
exit 0
......@@ -23,6 +23,8 @@ if [ -f $OURDIR/setup-object-host-done ]; then
exit 0
fi
logtstart "object-storage"
if [ -f $SETTINGS ]; then
. $SETTINGS
fi
......@@ -337,4 +339,6 @@ fi
touch $OURDIR/setup-object-host-done
logtend "object-storage"
exit 0
......@@ -22,6 +22,8 @@ fi
# Grab our libs
. "`dirname $0`/setup-lib.sh"
logtstart "ovs-node"
#
# Figure out which interfaces need to go where. We already have
# $EXTERNAL_NETWORK_INTERFACE from setup-lib.sh , and it and its configuration
......@@ -334,4 +336,6 @@ FLOW="dl_type=0x0806,nw_proto=0x2,arp_spa=172.16.0.0/12,actions=drop"
ovs-ofctl add-flow br-ex "$FLOW"
echo "$FLOW" >> $FF
logtend "ovs-node"
exit 0
......@@ -24,6 +24,8 @@ if [ "$HOSTNAME" != "$NETWORKMANAGER" ]; then
exit 0;
fi
logtstart "ovs"
maybe_install_packages pssh
PSSH='/usr/bin/parallel-ssh -t 0 -O StrictHostKeyChecking=no '
PHOSTS=""
......@@ -45,4 +47,6 @@ echo "*** Setting up OpenVSwitch via pssh: $PHOSTS"
$PSSH -o $OURDIR/pssh.setup-ovs-node.stdout -e $OURDIR/pssh.setup-ovs-node.stderr \
$PHOSTS $DIRNAME/setup-ovs-node.sh
logtend "ovs"
exit 0
......@@ -16,6 +16,8 @@ fi
# Grab our libs
. "`dirname $0`/setup-lib.sh"
logtstart "root-ssh"
KEYNAME=id_rsa
# Remove it if it exists...
......@@ -36,6 +38,7 @@ if [ -s $OURDIR/${KEYNAME} ] ; then
ps axwww > $OURDIR/ps.txt
cat $OURDIR/${KEYNAME}.pub >> /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
logtend "root-ssh"
exit 0
fi
......@@ -77,4 +80,6 @@ else
done
fi
logtend "root-ssh"
exit 0
......@@ -25,6 +25,8 @@ if [ -f $OURDIR/setup-share-host-done ]; then
exit 0
fi
logtstart "share-node"
if [ -f $SETTINGS ]; then
. $SETTINGS
fi
......@@ -277,4 +279,6 @@ service_enable manila-share
touch $OURDIR/setup-share-host-done
logtstart "share-node"
exit 0
......@@ -23,6 +23,8 @@ if [ -f $OURDIR/setup-storage-telemetry-done ]; then
exit 0
fi
logtstart "storage-telemetry"
if [ -f $SETTINGS ]; then
. $SETTINGS
fi
......@@ -37,4 +39,6 @@ service_enable cinder-volume
touch $OURDIR/setup-storage-telemetry-done
logtend "storage-telemetry"
exit 0
......@@ -23,6 +23,8 @@ if [ -f $OURDIR/setup-storage-host-done ]; then
exit 0
fi
logtstart "storage"
if [ -f $SETTINGS ]; then
. $SETTINGS
fi
......@@ -173,4 +175,6 @@ echo "VGNAME=${VGNAME}" >> $LOCALSETTINGS
touch $OURDIR/setup-storage-host-done
logtend "storage"
exit 0
......@@ -16,6 +16,8 @@ fi
# Grab our libs
. "`dirname $0`/setup-lib.sh"
logtstart "vpn-client"
maybe_install_packages openvpn
cp -p $OURDIR/$HOSTNAME.crt $OURDIR/$HOSTNAME.key /etc/openvpn/
......@@ -50,4 +52,6 @@ else
service openvpn restart
fi
logtend "vpn-client"
exit 0
......@@ -22,6 +22,8 @@ if [ "$HOSTNAME" != "$NETWORKMANAGER" ]; then
exit 0;
fi
logtstart "vpn"
if [ ! -f $OURDIR/vpn-server-done ]; then
maybe_install_packages openvpn easy-rsa
fi
......@@ -209,4 +211,6 @@ done
$PSSH -o $OURDIR/pssh.setup-vpn.stdout -e $OURDIR/pssh.setup-vpn.stderr \
$PHOSTS $DIRNAME/setup-vpn-client.sh
logtend "vpn"
exit 0
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