summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@redhat.com>2016-04-18 18:03:33 -0400
committerAndrew Butcher <abutcher@redhat.com>2016-04-20 10:31:41 -0400
commitbe00d3399795278ac799fab848918d5bd64a2c46 (patch)
treec11cf26d7043282f8cd8bc822458395bf04f81f5 /roles
parent3fccdb3e55a89597270e4ee2d9cdaf9dd66cb341 (diff)
downloadopenshift-be00d3399795278ac799fab848918d5bd64a2c46.tar.gz
openshift-be00d3399795278ac799fab848918d5bd64a2c46.tar.bz2
openshift-be00d3399795278ac799fab848918d5bd64a2c46.tar.xz
openshift-be00d3399795278ac799fab848918d5bd64a2c46.zip
Fix router selector fact migration and match multiple selectors when counting nodes.
Diffstat (limited to 'roles')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py1
-rw-r--r--roles/openshift_hosted/tasks/router.yml1
-rw-r--r--roles/openshift_hosted_facts/tasks/main.yml6
-rw-r--r--roles/openshift_master_facts/tasks/main.yml1
4 files changed, 8 insertions, 1 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 3bdad1175..f0f3e3861 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -95,6 +95,7 @@ def migrate_local_facts(facts):
migrated_facts = migrate_docker_facts(migrated_facts)
migrated_facts = migrate_common_facts(migrated_facts)
migrated_facts = migrate_node_facts(migrated_facts)
+ migrated_facts = migrate_hosted_facts(migrated_facts)
return migrated_facts
def migrate_hosted_facts(facts):
diff --git a/roles/openshift_hosted/tasks/router.yml b/roles/openshift_hosted/tasks/router.yml
index 6a36f74b2..4ccbf4430 100644
--- a/roles/openshift_hosted/tasks/router.yml
+++ b/roles/openshift_hosted/tasks/router.yml
@@ -32,6 +32,7 @@
{{ openshift.common.client_binary }} --api-version='v1' -o json
get nodes -n default --config={{ openshift.common.config_base }}/master/admin.kubeconfig
register: openshift_hosted_router_nodes_json
+ changed_when: false
when: openshift.hosted.router.replicas | default(None) == None
- name: Collect nodes matching router selector
diff --git a/roles/openshift_hosted_facts/tasks/main.yml b/roles/openshift_hosted_facts/tasks/main.yml
index f595e1e81..b77318085 100644
--- a/roles/openshift_hosted_facts/tasks/main.yml
+++ b/roles/openshift_hosted_facts/tasks/main.yml
@@ -1,4 +1,10 @@
---
+- name: Set legacy hosted facts
+ openshift_facts:
+ role: hosted
+ openshift_env:
+ openshift_hosted_router_selector: "{{ openshift_router_selector | default(None) }}"
+
- name: Set hosted facts
openshift_facts:
role: hosted
diff --git a/roles/openshift_master_facts/tasks/main.yml b/roles/openshift_master_facts/tasks/main.yml
index e3be12182..a020fdb41 100644
--- a/roles/openshift_master_facts/tasks/main.yml
+++ b/roles/openshift_master_facts/tasks/main.yml
@@ -54,7 +54,6 @@
mcs_allocator_range: "{{ osm_mcs_allocator_range | default(None) }}"
mcs_labels_per_project: "{{ osm_mcs_labels_per_project | default(None) }}"
uid_allocator_range: "{{ osm_uid_allocator_range | default(None) }}"
- router_selector: "{{ openshift_router_selector | default(None) }}"
registry_selector: "{{ openshift_registry_selector | default(None) }}"
api_server_args: "{{ osm_api_server_args | default(None) }}"
controller_args: "{{ osm_controller_args | default(None) }}"