From b0955d50b2beaa2b1e3937185f6d5e5337e1e87f Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Tue, 10 Nov 2015 09:10:58 -0400 Subject: Fix missing etcd_data_dir bug. A late change to original PR was not properly tested, there is a problem in the facts when upgrading where the deployment type is openshift-enterprise, and the system facts start reporting data_dir and config_base as referencing origin directories, which are not yet symlinked to their previous openshift variants. To correct we watch for a scenario where we evaluate these to origin directories, which don't exist, but the openshift ones do. (to allow for installation to still point at the origin variety) --- roles/openshift_facts/library/openshift_facts.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'roles') diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index 932bfd441..c108cd422 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -604,11 +604,17 @@ def set_deployment_facts_if_unset(facts): config_base = '/etc/origin' if deployment_type in ['enterprise', 'online']: config_base = '/etc/openshift' + # Handle upgrade scenarios when symlinks don't yet exist: + if not os.path.exists(config_base) and os.path.exists('/etc/openshift'): + config_base = '/etc/openshift' facts['common']['config_base'] = config_base if 'data_dir' not in facts['common']: data_dir = '/var/lib/origin' if deployment_type in ['enterprise', 'online']: data_dir = '/var/lib/openshift' + # Handle upgrade scenarios when symlinks don't yet exist: + if not os.path.exists(data_dir) and os.path.exists('/var/lib/openshift'): + data_dir = '/var/lib/openshift' facts['common']['data_dir'] = data_dir for role in ('master', 'node'): -- cgit v1.2.3 From d9e8e0ea821a87c3eb924dc89f5cd8de40ce34c8 Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Tue, 10 Nov 2015 09:51:02 -0400 Subject: 1279746: Fix leftover disabled features line in config template. --- roles/openshift_master/templates/master.yaml.v1.j2 | 1 - 1 file changed, 1 deletion(-) (limited to 'roles') diff --git a/roles/openshift_master/templates/master.yaml.v1.j2 b/roles/openshift_master/templates/master.yaml.v1.j2 index faf625e3c..bb12a0a0f 100644 --- a/roles/openshift_master/templates/master.yaml.v1.j2 +++ b/roles/openshift_master/templates/master.yaml.v1.j2 @@ -34,7 +34,6 @@ corsAllowedOrigins: disabledFeatures: {{ openshift.master.disabled_features | to_json }} {% endif %} {% if openshift.master.embedded_dns | bool %} -disabledFeatures: null dnsConfig: bindAddress: {{ openshift.master.bind_addr }}:{{ openshift.master.dns_port }} bindNetwork: tcp4 -- cgit v1.2.3