From: Narinder Gupta Date: Wed, 28 Mar 2018 12:29:22 +0000 (-0500) Subject: using the admin bridge on jumphost. X-Git-Tag: opnfv-6.0.0~4 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F59%2F54559%2F1;p=joid.git using the admin bridge on jumphost. Change-Id: Iced282c4024b9ed523e13b3df6b635df1a7af24e Signed-off-by: Narinder Gupta --- diff --git a/ci/03-maasdeploy.sh b/ci/03-maasdeploy.sh index a6b311dc..ab144a5f 100755 --- a/ci/03-maasdeploy.sh +++ b/ci/03-maasdeploy.sh @@ -209,16 +209,12 @@ sudo virsh pool-define-as default --type dir --target /var/lib/libvirt/images/ | sudo virsh pool-start default || true sudo virsh pool-autostart default || true -# In case of virtual install set network -if [ "$virtinstall" -eq 1 ]; then - sudo virsh net-dumpxml default > default-net-org.xml - sed -i '/dhcp/d' default-net-org.xml - sed -i '/range/d' default-net-org.xml - sudo virsh net-destroy default - sudo virsh net-define default-net-org.xml - sudo virsh net-start default - rm -f default-net-org.xml -fi +# As we use kvm so setup network on admin network +ADMIN_BR=`cat labconfig.json | jq '.opnfv.spaces[] | select(.type=="admin")'.bridge | cut -d \" -f 2 ` +sed -i "s@brAdm@$ADMIN_BR@" net.xml +sudo virsh net-destroy default +sudo virsh net-define net.xml +sudo virsh net-start default # # Cleanup, juju init and config backup @@ -465,9 +461,7 @@ addnodes(){ VIRSHIP="" # TODO: parse from $VIRSHURL if needed fi - if [ "$virtinstall" -eq 1 ]; then - netw=" --network bridge=virbr0,model=virtio" - elif ([ "$VIRSHHOST" != "" ]); then + if ([ "$VIRSHHOST" != "" ]); then # Get the bridge hosting the remote virsh brid=$(ssh $VIRSHHOST "ip a l | grep $VIRSHHOST | perl -pe 's/.* (.*)\$/\$1/g'") netw=" --network bridge=$brid,model=virtio" diff --git a/ci/net.xml b/ci/net.xml new file mode 100644 index 00000000..110428f1 --- /dev/null +++ b/ci/net.xml @@ -0,0 +1,5 @@ + + default + + +