diff options
-rw-r--r-- | .tito/packages/openshift-ansible | 2 | ||||
-rw-r--r-- | openshift-ansible.spec | 11 | ||||
-rw-r--r-- | playbooks/common/openshift-cluster/initialize_openshift_version.yml | 7 | ||||
-rw-r--r-- | playbooks/common/openshift-master/scaleup.yml | 11 | ||||
-rw-r--r-- | playbooks/common/openshift-node/scaleup.yml | 11 | ||||
-rw-r--r-- | roles/openshift_excluder/tasks/adjust.yml | 10 | ||||
-rw-r--r-- | roles/openshift_excluder/tasks/enable.yml | 4 | ||||
-rw-r--r-- | roles/openshift_excluder/tasks/exclude.yml | 8 | ||||
-rw-r--r-- | roles/openshift_excluder/tasks/unexclude.yml | 10 | ||||
-rw-r--r-- | roles/openshift_hosted/filter_plugins/filters.py | 13 |
10 files changed, 66 insertions, 21 deletions
diff --git a/.tito/packages/openshift-ansible b/.tito/packages/openshift-ansible index e612a8982..339add87b 100644 --- a/.tito/packages/openshift-ansible +++ b/.tito/packages/openshift-ansible @@ -1 +1 @@ -3.6.1-1 ./ +3.6.3-1 ./ diff --git a/openshift-ansible.spec b/openshift-ansible.spec index f87c0bada..0cc66d48c 100644 --- a/openshift-ansible.spec +++ b/openshift-ansible.spec @@ -9,7 +9,7 @@ %global __requires_exclude ^/usr/bin/ansible-playbook$ Name: openshift-ansible -Version: 3.6.1 +Version: 3.6.3 Release: 1%{?dist} Summary: Openshift and Atomic Enterprise Ansible License: ASL 2.0 @@ -270,6 +270,15 @@ Atomic OpenShift Utilities includes %changelog +* Fri Mar 17 2017 Jenkins CD Merge Bot <tdawson@redhat.com> 3.6.3-1 +- enable docker excluder since the time it is installed (jchaloup@redhat.com) + +* Thu Mar 16 2017 Jenkins CD Merge Bot <tdawson@redhat.com> 3.6.2-1 +- enable excluders during node/master scaling up (jchaloup@redhat.com) +- Fixing variable naming for 35 scoping. (kwoodson@redhat.com) +- Fix get_router_replicas infrastructure node count. (abutcher@redhat.com) +- Fix containerized openvswitch race (sdodson@redhat.com) + * Thu Mar 16 2017 Jenkins CD Merge Bot <tdawson@redhat.com> 3.6.1-1 - Bump version to 3.6.0 (smunilla@redhat.com) - Improve CONTRIBUTING guide with testing tricks (rhcarvalho@gmail.com) diff --git a/playbooks/common/openshift-cluster/initialize_openshift_version.yml b/playbooks/common/openshift-cluster/initialize_openshift_version.yml index f8981c040..1f74e929f 100644 --- a/playbooks/common/openshift-cluster/initialize_openshift_version.yml +++ b/playbooks/common/openshift-cluster/initialize_openshift_version.yml @@ -23,6 +23,9 @@ vars: # the excluders needs to be disabled no matter what status says with_status_check: false + # Only openshift excluder needs to be temporarily disabled + # So ignore the docker one + enable_docker_excluder: false tags: - always when: openshift_upgrade_target is not defined @@ -44,6 +47,10 @@ # Re-enable excluders if they are meant to be enabled (and only during installation, upgrade disables the excluders before this play) - include: reset_excluder.yml + vars: + # Only openshift excluder needs to be re-enabled + # So ignore the docker one + enable_docker_excluder: false tags: - always when: openshift_upgrade_target is not defined diff --git a/playbooks/common/openshift-master/scaleup.yml b/playbooks/common/openshift-master/scaleup.yml index 18e5c665f..c59747081 100644 --- a/playbooks/common/openshift-master/scaleup.yml +++ b/playbooks/common/openshift-master/scaleup.yml @@ -60,8 +60,19 @@ - openshift_facts - openshift_docker +- include: ../openshift-cluster/disable_excluder.yml + vars: + # the excluders needs to be disabled no matter what status says + with_status_check: false + tags: + - always + - include: ../openshift-master/config.yml - include: ../openshift-loadbalancer/config.yml - include: ../openshift-node/config.yml + +- include: ../openshift-cluster/reset_excluder.yml + tags: + - always diff --git a/playbooks/common/openshift-node/scaleup.yml b/playbooks/common/openshift-node/scaleup.yml index bb3b1e780..d81bd152e 100644 --- a/playbooks/common/openshift-node/scaleup.yml +++ b/playbooks/common/openshift-node/scaleup.yml @@ -27,4 +27,15 @@ - openshift_facts - openshift_docker +- include: ../openshift-cluster/disable_excluder.yml + vars: + # the excluders needs to be disabled no matter what status says + with_status_check: false + tags: + - always + - include: ../openshift-node/config.yml + +- include: ../openshift-cluster/reset_excluder.yml + tags: + - always diff --git a/roles/openshift_excluder/tasks/adjust.yml b/roles/openshift_excluder/tasks/adjust.yml index 2535b9ea6..cbdd7785b 100644 --- a/roles/openshift_excluder/tasks/adjust.yml +++ b/roles/openshift_excluder/tasks/adjust.yml @@ -8,16 +8,18 @@ - include: exclude.yml vars: # Enable the docker excluder only if it is overrided - enable_docker_excluder: "{{ enable_docker_excluder_override | default(false) | bool }}" + # BZ #1430612: docker excluders should be enabled even during installation and upgrade + exclude_docker_excluder: "{{ enable_docker_excluder | default(true) | bool }}" # excluder is to be disabled by default - enable_openshift_excluder: false + exclude_openshift_excluder: false # All excluders that are to be disabled are disabled - include: unexclude.yml vars: # If the docker override is not set, default to the generic behaviour - disable_docker_excluder: "{{ not enable_docker_excluder_override | default(not docker_excluder_on) | bool }}" + # BZ #1430612: docker excluders should be enabled even during installation and upgrade + unexclude_docker_excluder: false # disable openshift excluder is never overrided to be enabled # disable it if the docker excluder is enabled - disable_openshift_excluder: "{{ openshift_excluder_on | bool }}" + unexclude_openshift_excluder: "{{ openshift_excluder_on | bool }}" when: - not openshift.common.is_atomic | bool diff --git a/roles/openshift_excluder/tasks/enable.yml b/roles/openshift_excluder/tasks/enable.yml index 413c7b5cf..9122c9aeb 100644 --- a/roles/openshift_excluder/tasks/enable.yml +++ b/roles/openshift_excluder/tasks/enable.yml @@ -13,9 +13,9 @@ - include: exclude.yml vars: # Enable the docker excluder only if it is overrided, resp. enabled by default (in that order) - enable_docker_excluder: "{{ enable_docker_excluder_override | default(docker_excluder_on) | bool }}" + exclude_docker_excluder: "{{ enable_docker_excluder_override | default(docker_excluder_on) | bool }}" # Enable the openshift excluder only if it is not overrided, resp. enabled by default (in that order) - enable_openshift_excluder: "{{ not disable_openshift_excluder_override | default(not openshift_excluder_on) | bool }}" + exclude_openshift_excluder: "{{ not disable_openshift_excluder_override | default(not openshift_excluder_on) | bool }}" when: - not openshift.common.is_atomic | bool diff --git a/roles/openshift_excluder/tasks/exclude.yml b/roles/openshift_excluder/tasks/exclude.yml index af9824aae..d31351aea 100644 --- a/roles/openshift_excluder/tasks/exclude.yml +++ b/roles/openshift_excluder/tasks/exclude.yml @@ -1,20 +1,20 @@ --- # input variables: -# - enable_docker_excluder -# - enable_openshift_excluder +# - exclude_docker_excluder +# - exclude_openshift_excluder - block: - name: Enable docker excluder command: "{{ openshift.common.service_type }}-docker-excluder exclude" # if the docker override is set, it means the docker excluder needs to be enabled no matter what # if the docker override is not set, the excluder is set based on enable_docker_excluder when: - - enable_docker_excluder | default(false) | bool + - exclude_docker_excluder | default(false) | bool - name: Enable openshift excluder command: "{{ openshift.common.service_type }}-excluder exclude" # if the openshift override is set, it means the openshift excluder is disabled no matter what # if the openshift override is not set, the excluder is set based on enable_openshift_excluder when: - - enable_openshift_excluder | default(false) | bool + - exclude_openshift_excluder | default(false) | bool when: - not openshift.common.is_atomic | bool diff --git a/roles/openshift_excluder/tasks/unexclude.yml b/roles/openshift_excluder/tasks/unexclude.yml index 196ca25f5..9112adbac 100644 --- a/roles/openshift_excluder/tasks/unexclude.yml +++ b/roles/openshift_excluder/tasks/unexclude.yml @@ -1,19 +1,17 @@ --- # input variables: -# - disable_docker_excluder -# - disable_openshift_excluder +# - unexclude_docker_excluder +# - unexclude_openshift_excluder - block: - - include: init.yml - - name: disable docker excluder command: "{{ openshift.common.service_type }}-docker-excluder unexclude" when: - - disable_docker_excluder | default(false) | bool + - unexclude_docker_excluder | default(false) | bool - name: disable openshift excluder command: "{{ openshift.common.service_type }}-excluder unexclude" when: - - disable_openshift_excluder | default(false) | bool + - unexclude_openshift_excluder | default(false) | bool when: - not openshift.common.is_atomic | bool diff --git a/roles/openshift_hosted/filter_plugins/filters.py b/roles/openshift_hosted/filter_plugins/filters.py index cbfadfe9d..7f41529ac 100644 --- a/roles/openshift_hosted/filter_plugins/filters.py +++ b/roles/openshift_hosted/filter_plugins/filters.py @@ -21,14 +21,21 @@ class FilterModule(object): if replicas is not None: return replicas + replicas = 1 + + # Ignore boolean expression limit of 5. + # pylint: disable=too-many-boolean-expressions if (isinstance(router_nodes, dict) and 'results' in router_nodes and 'results' in router_nodes['results'] and - 'items' in router_nodes['results']['results']): + isinstance(router_nodes['results']['results'], list) and + len(router_nodes['results']['results']) > 0 and + 'items' in router_nodes['results']['results'][0]): - return len(router_nodes['results']['results'][0]['items']) + if len(router_nodes['results']['results'][0]['items']) > 0: + replicas = len(router_nodes['results']['results'][0]['items']) - return 1 + return replicas def filters(self): ''' returns a mapping of filters to methods ''' |