From 6d1ce4a46a9684ac718bfc19dc8a362fbc9a9641 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Mon, 27 Jun 2011 09:02:22 -0700 Subject: [PATCH 1/4] remove extra stuff from clean vlans --- tools/clean-vlans | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/clean-vlans b/tools/clean-vlans index 820a9dbe5b0e..a26ad86ada5f 100755 --- a/tools/clean-vlans +++ b/tools/clean-vlans @@ -17,9 +17,9 @@ # License for the specific language governing permissions and limitations # under the License. -export LC_ALL=C +export LC_ALL=C sudo ifconfig -a | grep br | grep -v bridge | cut -f1 -d" " | xargs -n1 -ifoo ifconfig foo down sudo ifconfig -a | grep br | grep -v bridge | cut -f1 -d" " | xargs -n1 -ifoo brctl delbr foo -sudo ifconfig -a | grep vlan | grep -v vlan124 | grep -v vlan5 | cut -f1 -d" " | xargs -n1 -ifoo ifconfig foo down -sudo ifconfig -a | grep vlan | grep -v vlan124 | grep -v vlan5 | cut -f1 -d" " | xargs -n1 -ifoo vconfig rem foo +sudo ifconfig -a | grep vlan | cut -f1 -d" " | xargs -n1 -ifoo ifconfig foo down +sudo ifconfig -a | grep vlan | cut -f1 -d" " | xargs -n1 -ifoo vconfig rem foo From 7230c384d1373e8718bc7fd2fd86b1e805a0573e Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Mon, 27 Jun 2011 09:05:05 -0700 Subject: [PATCH 2/4] make nova-debug work with new style instances --- tools/nova-debug | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/tools/nova-debug b/tools/nova-debug index 3ff68ca35606..fd9cb054ad19 100755 --- a/tools/nova-debug +++ b/tools/nova-debug @@ -1,4 +1,3 @@ -#!/usr/bin/env bash # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the @@ -30,13 +29,15 @@ cd $INSTANCES_PATH/$1 if [ $CMD != "umount" ] && [ $CMD != "launch" ]; then # destroy the instance virsh destroy $1 +virsh undefine $1 # mount the filesystem mkdir t -DEVICE=`losetup --show -f disk` +DEVICE=/dev/nbd0 echo $DEVICE -kpartx -a $DEVICE -mount /dev/mapper/${DEVICE:4}p1 t +qemu-nbd -c $DEVICE disk +sleep 3 +mount $DEVICE t fi if [ $CMD != "mount" ] && [ $CMD != "umount" ]; then @@ -66,11 +67,13 @@ sed -i "s/.*<\/serial>/ Date: Mon, 27 Jun 2011 09:07:49 -0700 Subject: [PATCH 3/4] update nova.sh --- contrib/nova.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/contrib/nova.sh b/contrib/nova.sh index d7d34dcbda13..eab68058037c 100755 --- a/contrib/nova.sh +++ b/contrib/nova.sh @@ -17,7 +17,7 @@ if [ ! -n "$HOST_IP" ]; then HOST_IP=`LC_ALL=C ifconfig | grep -m 1 'inet addr:'| cut -d: -f2 | awk '{print $1}'` fi -USE_MYSQL=${USE_MYSQL:-0} +USE_MYSQL=${USE_MYSQL:-1} INTERFACE=${INTERFACE:-eth0} FLOATING_RANGE=${FLOATING_RANGE:-10.6.0.0/27} FIXED_RANGE=${FIXED_RANGE:-10.0.0.0/24} @@ -159,10 +159,6 @@ NOVA_CONF_EOF mkdir -p $NOVA_DIR/instances rm -rf $NOVA_DIR/networks mkdir -p $NOVA_DIR/networks - if [ ! -d "$NOVA_DIR/images" ]; then - ln -s $DIR/images $NOVA_DIR/images - fi - if [ "$TEST" == 1 ]; then cd $NOVA_DIR python $NOVA_DIR/run_tests.py @@ -181,8 +177,18 @@ NOVA_CONF_EOF # create some floating ips $NOVA_DIR/bin/nova-manage floating create `hostname` $FLOATING_RANGE - # convert old images - $NOVA_DIR/bin/nova-manage image convert $DIR/images + if [ ! -d "$NOVA_DIR/images" ]; then + if [ ! -d "$DIR/converted-images" ]; then + # convert old images + mkdir $DIR/converted-images + ln -s $DIR/converted-images $NOVA_DIR/images + $NOVA_DIR/bin/nova-manage image convert $DIR/images + else + ln -s $DIR/converted-images $NOVA_DIR/images + fi + + fi + # nova api crashes if we start it with a regular screen command, # so send the start command by forcing text into the window. From b245dfd693107318c90d1af4fdf057ea1a5fc5c2 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Mon, 27 Jun 2011 09:17:37 -0700 Subject: [PATCH 4/4] missed the bin line --- tools/nova-debug | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/nova-debug b/tools/nova-debug index fd9cb054ad19..0a78af16a067 100755 --- a/tools/nova-debug +++ b/tools/nova-debug @@ -1,3 +1,4 @@ +#!/usr/bin/env bash # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the