Migrates from queens to rocky
[apex.git] / apex / overcloud / deploy.py
index 2f75b40..4deeabf 100644 (file)
@@ -152,7 +152,7 @@ def get_docker_sdn_files(ds_opts):
     :return: list of docker THT env files for an SDN
     """
     docker_services = con.VALID_DOCKER_SERVICES
-    tht_dir = con.THT_DOCKER_ENV_DIR[ds_opts['os_version']]
+    tht_dir = con.THT_DOCKER_ENV_DIR
     sdn_env_list = build_sdn_env_list(ds_opts, SDN_FILE_MAP)
     for i, sdn_file in enumerate(sdn_env_list):
         sdn_base = os.path.basename(sdn_file)
@@ -360,6 +360,19 @@ def prep_image(ds, ns, img, tmp_dir, root_pw=None, docker_tag=None,
     if dataplane == 'ovs':
         if ds_opts['sfc']:
             oc_builder.inject_ovs_nsh(tmp_oc_image, tmp_dir)
+        elif sdn == 'opendaylight':
+            # FIXME(trozet) remove this after RDO is updated with fix for
+            # https://bugzilla.redhat.com/show_bug.cgi?id=1544892
+            ovs_file = os.path.basename(con.CUSTOM_OVS)
+            ovs_url = con.CUSTOM_OVS.replace(ovs_file, '')
+            utils.fetch_upstream_and_unpack(dest=tmp_dir, url=ovs_url,
+                                            targets=[ovs_file])
+            virt_cmds.extend([
+                {con.VIRT_UPLOAD: "{}:/root/".format(os.path.join(tmp_dir,
+                                                                  ovs_file))},
+                {con.VIRT_RUN_CMD: "yum downgrade -y /root/{}".format(
+                    ovs_file)}
+            ])
 
     if dataplane == 'fdio':
         # Patch neutron with using OVS external interface for router
@@ -697,6 +710,10 @@ def prep_env(ds, ns, inv, opnfv_env, net_env, tmp_dir):
                          "services")
 
     logging.info("opnfv-environment file written to {}".format(tmp_opnfv_env))
+    with open(tmp_opnfv_env, 'r') as fh:
+        logging.debug("opnfv-environment content is : {}".format(
+            pprint.pformat(yaml.safe_load(fh.read()))
+        ))
 
 
 def generate_ceph_key():
@@ -850,8 +867,7 @@ def external_network_cmds(ns, ds):
                  "--allocation-pool start={},end={} --subnet-range " \
                  "{}".format(gateway, pool_start, pool_end, str(cidr))
     if external and cidr.version == 6:
-        subnet_cmd += ' --ip-version 6 --ipv6-ra-mode slaac ' \
-                      '--ipv6-address-mode slaac'
+        subnet_cmd += ' --ip-version 6'
     cmds.append(subnet_cmd)
     logging.debug("Neutron external network commands determined "
                   "as: {}".format(cmds))