working to improve debugability

This commit is contained in:
Anthony Young 2011-11-09 23:36:18 -08:00
parent 792b1165a4
commit 8b47cdf15a
2 changed files with 5 additions and 4 deletions

View file

@ -90,9 +90,10 @@ GUEST_CORES=${GUEST_CORES:-1}
# libvirt.xml configuration # libvirt.xml configuration
NET_XML=$vm_dir/net.xml NET_XML=$vm_dir/net.xml
NET_NAME=${NET_NAME:-devstack-$GUEST_NETWORK}
cat > $NET_XML <<EOF cat > $NET_XML <<EOF
<network> <network>
<name>devstack-$GUEST_NETWORK</name> <name>$NET_NAME</name>
<bridge name="stackbr%d" /> <bridge name="stackbr%d" />
<forward/> <forward/>
<ip address="$GUEST_GATEWAY" netmask="$GUEST_NETMASK"> <ip address="$GUEST_GATEWAY" netmask="$GUEST_NETMASK">
@ -104,9 +105,9 @@ cat > $NET_XML <<EOF
EOF EOF
if [[ "$GUEST_RECREATE_NET" == "yes" ]]; then if [[ "$GUEST_RECREATE_NET" == "yes" ]]; then
virsh net-destroy devstack-$GUEST_NETWORK || true virsh net-destroy $NET_NAME || true
# destroying the network isn't enough to delete the leases # destroying the network isn't enough to delete the leases
rm -f /var/lib/libvirt/dnsmasq/devstack-$GUEST_NETWORK.leases rm -f /var/lib/libvirt/dnsmasq/$NET_NAME.leases
virsh net-create $vm_dir/net.xml virsh net-create $vm_dir/net.xml
fi fi

View file

@ -27,7 +27,6 @@ TOP_DIR=(pwd)
BASE_NAME=executor-`printf "%02d" $EXECUTOR_NUMBER` BASE_NAME=executor-`printf "%02d" $EXECUTOR_NUMBER`
GUEST_NAME=$BASE_NAME.$ADAPTER GUEST_NAME=$BASE_NAME.$ADAPTER
virsh destroy `virsh list | grep $BASE_NAME | cut -d " " -f1` || true virsh destroy `virsh list | grep $BASE_NAME | cut -d " " -f1` || true
rm -f /var/lib/libvirt/dnsmasq/$BASE_NAME*.leases
# Configure localrc # Configure localrc
cat <<EOF >localrc cat <<EOF >localrc
@ -43,6 +42,7 @@ SERVICE_TOKEN=chicken
ADMIN_PASSWORD=chicken ADMIN_PASSWORD=chicken
USERNAME=admin USERNAME=admin
TENANT=admin TENANT=admin
NET_NAME=$GUEST_NAME
EOF EOF
cd tools cd tools
sudo ./build_uec.sh sudo ./build_uec.sh