Fixes neutron patch to only apply when ODL + FDIO 83/30883/2
authorTim Rozet <trozet@redhat.com>
Fri, 17 Mar 2017 19:20:10 +0000 (15:20 -0400)
committerTim Rozet <trozet@redhat.com>
Fri, 17 Mar 2017 19:34:53 +0000 (15:34 -0400)
We don't want the neutorn patch which hardcodes router external
interface to OVS and adds generic NS linux interface driver to be
applied for every scenario.

JIRA: APEX-406

Change-Id: I0fd7ed07a5ff58f9e1565831f4f469c11b501385
Signed-off-by: Tim Rozet <trozet@redhat.com>
build/overcloud-full.sh
build/overcloud-opendaylight.sh
lib/overcloud-deploy-functions.sh

index 59544d7..811249b 100755 (executable)
@@ -145,8 +145,6 @@ LIBGUESTFS_BACKEND=direct virt-customize \
     --install /root/$tackerclient_pkg \
     --run-command "pip install python-senlinclient" \
     --run-command "sed -i -E 's/timeout=[0-9]+/timeout=60/g' /usr/share/openstack-puppet/modules/rabbitmq/lib/puppet/provider/rabbitmqctl.rb" \
-    --upload ${BUILD_ROOT}/patches/neutron-patch-NSDriver.patch:/usr/lib/python2.7/site-packages/ \
-    --run-command "cd /usr/lib/python2.7/site-packages/ && patch -p1 < neutron-patch-NSDriver.patch" \
     --upload ${BUILD_ROOT}/patches/puppet-neutron-add-odl-settings.patch:/usr/share/openstack-puppet/modules/neutron/ \
     --run-command "cd /usr/share/openstack-puppet/modules/neutron && patch -p1 <  puppet-neutron-add-odl-settings.patch" \
     --upload ${CACHE_DIR}/$kvmfornfv_kernel_rpm:/root/ \
index f892c71..498154d 100755 (executable)
@@ -80,6 +80,7 @@ populate_cache http://artifacts.opnfv.org/apex/danube/quagga/quagga.tar.gz
 # Patch in OPNFV custom puppet-tripleO
 # install Honeycomb
 # install quagga/zrpc
+# upload neutron patch for generic NS linux interface driver + OVS for external networks
 LIBGUESTFS_BACKEND=direct virt-customize \
     --upload ${BUILD_DIR}/opendaylight_boron.repo:/etc/yum.repos.d/opendaylight.repo \
     --run-command "yum install --downloadonly --downloaddir=/root/boron/ opendaylight" \
@@ -109,6 +110,7 @@ LIBGUESTFS_BACKEND=direct virt-customize \
     --run-command "yum downgrade -y python-zmq-14.3.1" \
     --install zeromq-4.1.4,zeromq-devel-4.1.4 \
     --install capnproto-devel,capnproto-libs,capnproto \
+    --upload ${BUILD_ROOT}/patches/neutron-patch-NSDriver.patch:/usr/lib/python2.7/site-packages/ \
     -a overcloud-full-opendaylight_build.qcow2
 
 LIBGUESTFS_BACKEND=direct virt-sparsify --compress overcloud-full-opendaylight_build.qcow2 overcloud-full-opendaylight.qcow2
index 36346d8..de7263f 100755 (executable)
@@ -149,11 +149,18 @@ EOI
 EOI
   fi
 
-  #Configure routing node for odl_l3-fdio
-  if [[ "${deploy_options_array['sdn_controller']}" == 'opendaylight' && "${deploy_options_array['dataplane']}" == 'fdio' && "${deploy_options_array['sdn_l3']}" == 'True' ]]; then
+  # Patch neutron with using OVS external interface for router and add generic linux NS interface driver
+  if [[ "${deploy_options_array['sdn_controller']}" == 'opendaylight' && "${deploy_options_array['dataplane']}" == 'fdio' ]]; then
     ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
-       sed -i "/opendaylight::vpp_routing_node:/c\    opendaylight::vpp_routing_node: ${deploy_options_array['odl_vpp_routing_node']}.${domain_name}" ${ENV_FILE}
+      LIBGUESTFS_BACKEND=direct virt-customize --run-command "cd /usr/lib/python2.7/site-packages/ && patch -p1 < neutron-patch-NSDriver.patch" \
+                                               -a overcloud-full.qcow2
+EOI
+    # Configure routing node for odl_l3-fdio
+    if [[ "${deploy_options_array['sdn_l3']}" == 'True' ]]; then
+      ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+        sed -i "/opendaylight::vpp_routing_node:/c\    opendaylight::vpp_routing_node: ${deploy_options_array['odl_vpp_routing_node']}.${domain_name}" ${ENV_FILE}
 EOI
+    fi
   fi
 
   if [ -n "${deploy_options_array['performance']}" ]; then