diff options
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/overcloud-deploy-functions.sh | 51 | ||||
-rw-r--r-- | lib/python/apex/deploy_settings.py | 3 | ||||
-rw-r--r-- | lib/python/apex/ip_utils.py | 7 |
3 files changed, 22 insertions, 39 deletions
diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh index f30e875f..e5f9134b 100755 --- a/lib/overcloud-deploy-functions.sh +++ b/lib/overcloud-deploy-functions.sh @@ -34,7 +34,9 @@ function overcloud_deploy { DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/services/gluon.yaml" fi elif [ "${deploy_options_array['vpp']}" == 'True' ]; then - if [ "${deploy_options_array['sdn_l3']}" == "True" ]; then + if [ "${deploy_options_array['odl_vpp_netvirt']}" == "True" ]; then + DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-netvirt-vpp.yaml" + elif [ "${deploy_options_array['sdn_l3']}" == "True" ]; then DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-honeycomb.yaml" else DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-honeycomb-l2.yaml" @@ -118,12 +120,10 @@ EOI if [ "${deploy_options_array['vpn']}" == 'True' ]; then echo -e "${blue}INFO: Enabling ZRPC and Quagga${reset}" ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI - LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum -y install /root/quagga/*.rpm" \ - --run-command "sudo usermod -a -G quaggavt quagga" \ - --run-command "sudo mkdir -p /var/run/quagga/" \ - --run-command "sudo chown quagga:quagga -R /var/run/quagga/" \ - --run-command "systemctl enable zrpcd" \ - -a overcloud-full.qcow2 + LIBGUESTFS_BACKEND=direct virt-customize \ + --run-command "systemctl enable zrpcd" \ + --run-command "systemctl enable bgpd" \ + -a overcloud-full.qcow2 EOI fi @@ -182,18 +182,12 @@ 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-fdio + # Configure routing node and interface role mapping 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} + sed -i "/ControllerExtraConfig:/ c\ ControllerExtraConfig:\n tripleo::profile::base::neutron::agents::honeycomb::interface_role_mapping: \"['${tenant_nic_mapping_controller_members}:tenant-interface']\"" ${ENV_FILE} + sed -i "/NovaComputeExtraConfig:/ c\ NovaComputeExtraConfig:\n tripleo::profile::base::neutron::agents::honeycomb::interface_role_mapping: \"['${tenant_nic_mapping_compute_members}:tenant-interface','${external_nic_mapping_compute_members}:public-interface']\"" ${ENV_FILE} EOI fi fi @@ -251,10 +245,6 @@ EOI echo -e "${blue}INFO: nosdn fdio deployment...installing correct vpp packages...${reset}" ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI sed -i "/NeutronVPPAgentPhysnets:/c\ NeutronVPPAgentPhysnets: 'datacentre:${tenant_nic_mapping_controller_members}'" ${ENV_FILE} - LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum remove -y vpp vpp-api-python vpp-lib vpp-plugins" \ - --run-command "yum install -y /root/fdio_nosdn/*.rpm" \ - --run-command "rm -f /etc/sysctl.d/80-vpp.conf" \ - -a overcloud-full.qcow2 EOI else echo -e "${red}Compute and Controller must use the same tenant nic name, please modify network setting file.${reset}" @@ -284,22 +274,13 @@ EOI EOI fi - # Override ODL if FDIO and ODL L2 - if [[ "${deploy_options_array['vpp']}" == 'True' && "${deploy_options_array['sdn_controller']}" == 'opendaylight' ]]; then - if [ "${deploy_options_array['sdn_l3']}" == "False" ]; then - ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI - LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum -y remove opendaylight" \ - --run-command "yum -y install /root/fdio_l2/opendaylight*.rpm" \ - -a overcloud-full.qcow2 -EOI - else - ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI - LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum remove -y vpp vpp-api-python vpp-lib vpp-plugins honeycomb" \ - --run-command "yum -y install /root/fdio_l3/*.rpm" \ - --run-command "rm -f /etc/sysctl.d/80-vpp.conf" \ - -a overcloud-full.qcow2 + # Override ODL if we enable netvirt for fdio + if [[ "${deploy_options_array['odl_vpp_netvirt']}" == 'True' && "${deploy_options_array['sdn_controller']}" == 'opendaylight' ]]; then + ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI + LIBGUESTFS_BACKEND=direct virt-customize --run-command "rm -rf /opt/opendaylight/*" \ + --run-command "tar zxvf /root/odl-netvirt-vpp-distribution.tar.gz -C /opt/opendaylight/" \ + -a overcloud-full.qcow2 EOI - fi fi # check if ceph should be enabled diff --git a/lib/python/apex/deploy_settings.py b/lib/python/apex/deploy_settings.py index dc58d764..48ce340d 100644 --- a/lib/python/apex/deploy_settings.py +++ b/lib/python/apex/deploy_settings.py @@ -31,7 +31,8 @@ OPT_DEPLOY_SETTINGS = ['performance', 'ceph_device', 'yardstick', 'dovetail', - 'odl_vpp_routing_node'] + 'odl_vpp_routing_node', + 'odl_vpp_netvirt'] VALID_ROLES = ['Controller', 'Compute', 'ObjectStorage'] VALID_PERF_OPTS = ['kernel', 'nova', 'vpp', 'ovs'] diff --git a/lib/python/apex/ip_utils.py b/lib/python/apex/ip_utils.py index b039e26b..ae60b705 100644 --- a/lib/python/apex/ip_utils.py +++ b/lib/python/apex/ip_utils.py @@ -147,7 +147,7 @@ def get_interface(nic, address_family=4): if not nic.strip(): logging.error("empty nic name specified") return None - output = subprocess.getoutput("ip -{} addr show {} scope global" + output = subprocess.getoutput("/usr/sbin/ip -{} addr show {} scope global" .format(address_family, nic)) if address_family == 4: pattern = re.compile("\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/\d{1,2}") @@ -178,14 +178,15 @@ def find_gateway(interface): """ address_family = interface.version - output = subprocess.getoutput("ip -{} route".format(address_family)) + output = subprocess.getoutput("/usr/sbin/ip -{} route".format( + address_family)) pattern = re.compile("default\s+via\s+(\S+)\s+") match = re.search(pattern, output) if match: gateway_ip = match.group(1) - reverse_route_output = subprocess.getoutput("ip route get {}" + reverse_route_output = subprocess.getoutput("/usr/sbin/ip route get {}" .format(gateway_ip)) pattern = re.compile("{}.+src\s+{}".format(gateway_ip, interface.ip)) if not re.search(pattern, reverse_route_output): |