diff options
author | Tim Rozet <trozet@redhat.com> | 2018-12-21 09:34:05 -0500 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2018-12-21 09:34:05 -0500 |
commit | 56a2abfb7a1b23e1716beb16702d130226e4778d (patch) | |
tree | 947256a964c59947be343e91254af71ded0ccb61 | |
parent | e1d286e89e04577bda2569a5909dfe8182d953ba (diff) |
Disable NFS when all-in-one deployment
No point in using NFS when we only have one node.
Change-Id: Ic80f75913bf31c2e4a875146731d9c0d3483ae1b
Signed-off-by: Tim Rozet <trozet@redhat.com>
-rw-r--r-- | apex/overcloud/deploy.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/apex/overcloud/deploy.py b/apex/overcloud/deploy.py index 708a6625..ccb21cec 100644 --- a/apex/overcloud/deploy.py +++ b/apex/overcloud/deploy.py @@ -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): """ @@ -704,11 +710,11 @@ def prep_env(ds, ns, inv, opnfv_env, net_env, tmp_dir): # 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'): @@ -716,6 +722,10 @@ def prep_env(ds, ns, inv, opnfv_env, net_env, tmp_dir): "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...") @@ -730,11 +740,11 @@ def prep_env(ds, ns, inv, opnfv_env, net_env, tmp_dir): 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: |