Merge "Always update OVS to 2.9.2"
authorRicardo Noriega <rnoriega@redhat.com>
Fri, 21 Dec 2018 22:32:54 +0000 (22:32 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Fri, 21 Dec 2018 22:32:54 +0000 (22:32 +0000)
1  2 
apex/overcloud/deploy.py

diff --combined apex/overcloud/deploy.py
@@@ -99,12 -99,6 +99,12 @@@ DUPLICATE_COMPUTE_SERVICES = 
      'OS::TripleO::Services::ComputeNeutronL3Agent'
  ]
  
 +NFS_VARS = [
 +    'NovaNfsEnabled',
 +    'GlanceNfsEnabled',
 +    'CinderNfsEnabledBackend'
 +]
 +
  
  def build_sdn_env_list(ds, sdn_map, env_list=None):
      """
@@@ -368,21 -362,10 +368,10 @@@ def prep_image(ds, ns, img, tmp_dir, ro
          virt_cmds.append({con.VIRT_PW: pw_op})
  
      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)}
-             ])
+         # FIXME(trozet) remove this after RDO is updated with fix for
+         # https://bugzilla.redhat.com/show_bug.cgi?id=1544892
+         # https://review.rdoproject.org/r/#/c/13839/
+         oc_builder.inject_ovs_nsh(tmp_oc_image, tmp_dir)
  
      if dataplane == 'fdio':
          # Patch neutron with using OVS external interface for router
@@@ -710,11 -693,11 +699,11 @@@ def prep_env(ds, ns, inv, opnfv_env, ne
      # Merge compute services into control services if only a single
      # node deployment
      if num_compute == 0:
 -        logging.info("All in one deployment. Checking if service merging "
 -                     "required into control services")
          with open(tmp_opnfv_env, 'r') as fh:
              data = yaml.safe_load(fh)
          param_data = data['parameter_defaults']
 +        logging.info("All in one deployment detected")
 +        logging.info("Disabling NFS in env file")
          # Check to see if any parameters are set for Compute
          for param in param_data.keys():
              if param != 'ComputeServices' and param.startswith('Compute'):
                                  "in deployment: {}. Please use Controller "
                                  "based parameters when using All-in-one "
                                  "deployments".format(param))
 +            if param in NFS_VARS:
 +                param_data[param] = False
 +        logging.info("Checking if service merging required into "
 +                     "control services")
          if ('ControllerServices' in param_data and 'ComputeServices' in
                  param_data):
              logging.info("Services detected in environment file. Merging...")
              logging.debug("Merged controller services: {}".format(
                  pprint.pformat(param_data['ControllerServices'])
              ))
 -            with open(tmp_opnfv_env, 'w') as fh:
 -                yaml.safe_dump(data, fh, default_flow_style=False)
          else:
              logging.info("No services detected in env file, not merging "
                           "services")
 +        with open(tmp_opnfv_env, 'w') as fh:
 +            yaml.safe_dump(data, fh, default_flow_style=False)
  
      logging.info("opnfv-environment file written to {}".format(tmp_opnfv_env))
      with open(tmp_opnfv_env, 'r') as fh: