From f3861404a08ba3171d8798facc07440284465be9 Mon Sep 17 00:00:00 2001 From: Andrew Butcher Date: Tue, 26 Apr 2016 10:28:07 -0400 Subject: Access portal_net in common facts. --- playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml | 2 +- playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/upgrade.yml | 2 +- roles/openshift_master/templates/atomic-openshift-master.j2 | 2 +- .../templates/native-cluster/atomic-openshift-master-api.j2 | 2 +- .../templates/native-cluster/atomic-openshift-master-controllers.j2 | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml b/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml index db1d420ac..6f0af31b8 100644 --- a/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml +++ b/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml @@ -100,7 +100,7 @@ vars: target_version: "{{ '1.2' if deployment_type == 'origin' else '3.1.1.900' }}" openshift_docker_hosted_registry_insecure: True - openshift_docker_hosted_registry_network: "{{ hostvars[groups.oo_first_master.0].openshift.master.portal_net }}" + openshift_docker_hosted_registry_network: "{{ hostvars[groups.oo_first_master.0].openshift.common.portal_net }}" handlers: - include: ../../../../../roles/openshift_master/handlers/main.yml - include: ../../../../../roles/openshift_node/handlers/main.yml diff --git a/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/upgrade.yml index a28f7e9c1..a91727ecd 100644 --- a/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/upgrade.yml +++ b/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/upgrade.yml @@ -129,7 +129,7 @@ origin_reconcile_bindings: "{{ deployment_type == 'origin' and g_new_version | version_compare('1.0.6', '>') }}" ent_reconcile_bindings: true openshift_docker_hosted_registry_insecure: True - openshift_docker_hosted_registry_network: "{{ hostvars[groups.oo_first_master.0].openshift.master.portal_net }}" + openshift_docker_hosted_registry_network: "{{ hostvars[groups.oo_first_master.0].openshift.common.portal_net }}" tasks: - name: Verifying the correct commandline tools are available shell: grep {{ verify_upgrade_version }} {{ openshift.common.admin_binary}} diff --git a/roles/openshift_master/templates/atomic-openshift-master.j2 b/roles/openshift_master/templates/atomic-openshift-master.j2 index c70f3ec57..ad6817eb5 100644 --- a/roles/openshift_master/templates/atomic-openshift-master.j2 +++ b/roles/openshift_master/templates/atomic-openshift-master.j2 @@ -14,7 +14,7 @@ AWS_SECRET_ACCESS_KEY={{ openshift.cloudprovider.aws.secret_key }} {% if 'http_proxy' in openshift.common or 'https_proxy' in openshift.common %} HTTP_PROXY='{{ openshift.common.http_proxy | default('') }}' HTTPS_PROXY='{{ openshift.common.https_proxy | default('')}}' -NO_PROXY='{{ openshift.common.no_proxy | default('') | join(',') }},{{ openshift.master.portal_net }},{{ openshift.master.sdn_cluster_network_cidr }}' +NO_PROXY='{{ openshift.common.no_proxy | default('') | join(',') }},{{ openshift.common.portal_net }},{{ openshift.master.sdn_cluster_network_cidr }}' {% else %} #HTTP_PROXY=http://user:pass@proxy.example.com #HTTPS_PROXY=http://user:pass@proxy.example.com diff --git a/roles/openshift_master/templates/native-cluster/atomic-openshift-master-api.j2 b/roles/openshift_master/templates/native-cluster/atomic-openshift-master-api.j2 index 549ebe5ab..80d8ef488 100644 --- a/roles/openshift_master/templates/native-cluster/atomic-openshift-master-api.j2 +++ b/roles/openshift_master/templates/native-cluster/atomic-openshift-master-api.j2 @@ -14,7 +14,7 @@ AWS_SECRET_ACCESS_KEY={{ openshift.cloudprovider.aws.secret_key }} {% if 'http_proxy' or 'https_proxy' in openshift.common %} HTTP_PROXY='{{ openshift.common.http_proxy | default('') }}' HTTPS_PROXY='{{ openshift.common.https_proxy | default('')}}' -NO_PROXY='{{ openshift.common.no_proxy | default('') | join(',') }},{{ openshift.master.portal_net }},{{ openshift.master.sdn_cluster_network_cidr }}' +NO_PROXY='{{ openshift.common.no_proxy | default('') | join(',') }},{{ openshift.common.portal_net }},{{ openshift.master.sdn_cluster_network_cidr }}' {% else %} #HTTP_PROXY=http://user:pass@proxy.example.com #HTTPS_PROXY=http://user:pass@proxy.example.com diff --git a/roles/openshift_master/templates/native-cluster/atomic-openshift-master-controllers.j2 b/roles/openshift_master/templates/native-cluster/atomic-openshift-master-controllers.j2 index 08dc87d2e..ec7b98ec3 100644 --- a/roles/openshift_master/templates/native-cluster/atomic-openshift-master-controllers.j2 +++ b/roles/openshift_master/templates/native-cluster/atomic-openshift-master-controllers.j2 @@ -14,7 +14,7 @@ AWS_SECRET_ACCESS_KEY={{ openshift.cloudprovider.aws.secret_key }} {% if 'http_proxy' or 'https_proxy' in openshift.common %} HTTP_PROXY='{{ openshift.common.http_proxy | default('') }}' HTTPS_PROXY='{{ openshift.common.https_proxy | default('')}}' -NO_PROXY='{{ openshift.common.no_proxy | default('') | join(',') }},{{ openshift.master.portal_net }},{{ openshift.master.sdn_cluster_network_cidr }}' +NO_PROXY='{{ openshift.common.no_proxy | default('') | join(',') }},{{ openshift.common.portal_net }},{{ openshift.master.sdn_cluster_network_cidr }}' {% else %} #HTTP_PROXY=http://user:pass@proxy.example.com #HTTPS_PROXY=http://user:pass@proxy.example.com -- cgit v1.2.3 From ca88d5ca2357d5342f4dbb357aa17b4164a2c18e Mon Sep 17 00:00:00 2001 From: Andrew Butcher Date: Tue, 26 Apr 2016 10:57:20 -0400 Subject: Apply openshift_common to all masters prior to creating certificates for portal_net. --- playbooks/common/openshift-master/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml index 060b5aa0d..537de4f5c 100644 --- a/playbooks/common/openshift-master/config.yml +++ b/playbooks/common/openshift-master/config.yml @@ -50,6 +50,10 @@ when: openshift_hosted_metrics_resolution is not defined roles: - openshift_facts + # TODO: Remove openshift_common from this roles list once + # openshift_master_certificates uses delegate_to and is applied to + # all masters rather than just the first. + - openshift_common post_tasks: - openshift_facts: role: master -- cgit v1.2.3 From 927278059ae25e97ada2161903c571409c2bc151 Mon Sep 17 00:00:00 2001 From: Andrew Butcher Date: Tue, 26 Apr 2016 11:34:16 -0400 Subject: Move portal_net from openshift_common to openshift_facts. --- playbooks/common/openshift-master/config.yml | 4 ---- roles/openshift_common/tasks/main.yml | 1 - roles/openshift_facts/tasks/main.yml | 1 + 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml index 537de4f5c..060b5aa0d 100644 --- a/playbooks/common/openshift-master/config.yml +++ b/playbooks/common/openshift-master/config.yml @@ -50,10 +50,6 @@ when: openshift_hosted_metrics_resolution is not defined roles: - openshift_facts - # TODO: Remove openshift_common from this roles list once - # openshift_master_certificates uses delegate_to and is applied to - # all masters rather than just the first. - - openshift_common post_tasks: - openshift_facts: role: master diff --git a/roles/openshift_common/tasks/main.yml b/roles/openshift_common/tasks/main.yml index d5166b52e..4ec255dbc 100644 --- a/roles/openshift_common/tasks/main.yml +++ b/roles/openshift_common/tasks/main.yml @@ -27,7 +27,6 @@ use_nuage: "{{ openshift_use_nuage | default(None) }}" use_manageiq: "{{ openshift_use_manageiq | default(None) }}" data_dir: "{{ openshift_data_dir | default(None) }}" - portal_net: "{{ openshift_portal_net | default(openshift_master_portal_net) | default(None) }}" use_dnsmasq: "{{ openshift_use_dnsmasq | default(None) }}" # Using oo_image_tag_to_rpm_version here is a workaround for how diff --git a/roles/openshift_facts/tasks/main.yml b/roles/openshift_facts/tasks/main.yml index 7510e4e39..8077c0d97 100644 --- a/roles/openshift_facts/tasks/main.yml +++ b/roles/openshift_facts/tasks/main.yml @@ -33,6 +33,7 @@ is_containerized: "{{ l_is_containerized | default(None) }}" public_hostname: "{{ openshift_public_hostname | default(None) }}" public_ip: "{{ openshift_public_ip | default(None) }}" + portal_net: "{{ openshift_portal_net | default(openshift_master_portal_net) | default(None) }}" # had to be done outside of the above because hostname isn't yet set - name: Gather hostnames for proxy configuration -- cgit v1.2.3