Enable OpenDaylight clustering mode for FDIO scenarios 01/34301/1
authorFeng Pan <fpan@redhat.com>
Thu, 4 May 2017 18:34:07 +0000 (14:34 -0400)
committerFeng Pan <fpan@redhat.com>
Thu, 4 May 2017 18:34:07 +0000 (14:34 -0400)
JIRA: APEX-450

Change-Id: I6d570c19ff5286b1307e38eee439116839b1d612
Signed-off-by: Feng Pan <fpan@redhat.com>
build/overcloud-opendaylight.sh
build/patches/disable_odl_clustering.patch [deleted file]
lib/overcloud-deploy-functions.sh

index dec80fa..1efd209 100755 (executable)
@@ -113,7 +113,6 @@ LIBGUESTFS_BACKEND=direct virt-customize \
     --run-command "cd /root/quagga; packages=\$(ls |grep -vE 'debuginfo|devel|contrib'); yum -y install \$packages" \
     --run-command "sudo usermod -a -G quaggavt quagga" \
     --upload ${BUILD_ROOT}/patches/neutron-patch-NSDriver.patch:/usr/lib/python2.7/site-packages/ \
-    --upload ${BUILD_ROOT}/patches/disable_odl_clustering.patch:/etc/puppet/modules/tripleo/ \
     --upload ${CACHE_DIR}/odl-netvirt-vpp-distribution.tar.gz:/root/ \
     -a overcloud-full-opendaylight_build.qcow2
 
diff --git a/build/patches/disable_odl_clustering.patch b/build/patches/disable_odl_clustering.patch
deleted file mode 100644 (file)
index 151481f..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-diff --git a/manifests/profile/base/neutron/opendaylight.pp b/manifests/profile/base/neutron/opendaylight.pp
-index 3269f3e..556fe63 100644
---- a/manifests/profile/base/neutron/opendaylight.pp
-+++ b/manifests/profile/base/neutron/opendaylight.pp
-@@ -22,34 +22,19 @@
- #   (Optional) The current step of the deployment
- #   Defaults to hiera('step')
- #
--# [*odl_api_ips*]
--#   (Optional) List of OpenStack Controller IPs for ODL API
--#   Defaults to hiera('opendaylight_api_node_ips')
--#
--# [*node_name*]
--#   (Optional) The short hostname of node
--#   Defaults to hiera('bootstack_nodeid')
-+# [*primary_node*]
-+#   (Optional) The hostname of the first node of this role type
-+#   Defaults to hiera('bootstrap_nodeid', undef)
- #
- class tripleo::profile::base::neutron::opendaylight (
-   $step         = hiera('step'),
--  $odl_api_ips  = hiera('opendaylight_api_node_ips'),
--  $node_name    = hiera('bootstack_nodeid')
-+  $primary_node = hiera('bootstrap_nodeid', undef),
- ) {
-   if $step >= 1 {
--    if empty($odl_api_ips) {
--      fail('No IPs assigned to OpenDaylight Api Service')
--    } elsif size($odl_api_ips) == 2 {
--      fail('2 node OpenDaylight deployments are unsupported.  Use 1 or greater than 2')
--    } elsif size($odl_api_ips) > 2 {
--      $node_string = split($node_name, '-')
--      $ha_node_index = $node_string[-1] + 1
--      class { '::opendaylight':
--        enable_ha     => true,
--        ha_node_ips   => $odl_api_ips,
--        ha_node_index => $ha_node_index,
--      }
--    } else {
-+    # Configure ODL only on first node of the role where this service is
-+    # applied
-+    if $primary_node == downcase($::hostname) {
-       include ::opendaylight
-     }
-   }
index 4ef2ab1..6f1a09a 100755 (executable)
@@ -182,15 +182,7 @@ EOI
                                                -a overcloud-full.qcow2
 EOI
 
-    # Disable clustering for ODL FDIO HA scenarios
-    if [[ "${deploy_options_array['sdn_controller']}" == 'opendaylight' ]]; then
-      ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
-      LIBGUESTFS_BACKEND=direct virt-customize --run-command "cd /etc/puppet/modules/tripleo/ && patch -p1 < disable_odl_clustering.patch" \
-                                               -a overcloud-full.qcow2
-EOI
-    fi
-
-    # Configure routing node for odl_l3-fdio
+    # Configure routing node for odl-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}