From 0db2995395d28caf4676ab566085b7c66130b629 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sun, 11 Mar 2018 20:02:50 +0100 Subject: Add patches also for small modules --- ...ansible-ghetto-json-ds-dont-parse-numbers.patch | 27 +++++++++ ...e-role-ntp-ds-replace-obsolete-constructs.patch | 13 +++++ anslib/patches/ansible_broker-ds-sc.patch | 10 ---- .../etcd-ds-rh1538446-openshift-undefined.patch | 11 ---- anslib/patches/glusterfs-ds-mountrun.patch | 25 --------- ...glusterfs-ds-use_cluster_local_for_heketi.patch | 24 -------- ...networkmanager-ds-use-openshift-interface.patch | 47 ---------------- .../openshift-ds-allow-upgrade-to-371.patch | 45 --------------- anslib/patches/openshift-ds-update371.patch | 45 --------------- .../patches/openshift/ansible_broker-ds-sc.patch | 10 ++++ .../etcd-ds-rh1538446-openshift-undefined.patch | 11 ++++ .../patches/openshift/glusterfs-ds-mountrun.patch | 25 +++++++++ ...glusterfs-ds-use_cluster_local_for_heketi.patch | 24 ++++++++ ...networkmanager-ds-use-openshift-interface.patch | 47 ++++++++++++++++ .../openshift-ds-allow-upgrade-to-371.patch | 45 +++++++++++++++ .../patches/openshift/openshift-ds-update371.patch | 45 +++++++++++++++ .../openshift/registry-ds-glusterfs-fixes.patch | 61 +++++++++++++++++++++ .../registry-ds-glusterfs-storageclass.patch | 64 ++++++++++++++++++++++ .../openshift/template_broker-ds-badcheck.patch | 23 ++++++++ anslib/patches/registry-ds-glusterfs-fixes.patch | 61 --------------------- .../registry-ds-glusterfs-storageclass.patch | 64 ---------------------- anslib/patches/template_broker-ds-badcheck.patch | 23 -------- 22 files changed, 395 insertions(+), 355 deletions(-) create mode 100644 anslib/patches/ansible-ghetto-json-ds-dont-parse-numbers.patch create mode 100644 anslib/patches/ansible-role-ntp-ds-replace-obsolete-constructs.patch delete mode 100644 anslib/patches/ansible_broker-ds-sc.patch delete mode 100644 anslib/patches/etcd-ds-rh1538446-openshift-undefined.patch delete mode 100644 anslib/patches/glusterfs-ds-mountrun.patch delete mode 100644 anslib/patches/glusterfs-ds-use_cluster_local_for_heketi.patch delete mode 100644 anslib/patches/networkmanager-ds-use-openshift-interface.patch delete mode 100644 anslib/patches/openshift-ds-allow-upgrade-to-371.patch delete mode 100644 anslib/patches/openshift-ds-update371.patch create mode 100644 anslib/patches/openshift/ansible_broker-ds-sc.patch create mode 100644 anslib/patches/openshift/etcd-ds-rh1538446-openshift-undefined.patch create mode 100644 anslib/patches/openshift/glusterfs-ds-mountrun.patch create mode 100644 anslib/patches/openshift/glusterfs-ds-use_cluster_local_for_heketi.patch create mode 100644 anslib/patches/openshift/networkmanager-ds-use-openshift-interface.patch create mode 100644 anslib/patches/openshift/openshift-ds-allow-upgrade-to-371.patch create mode 100644 anslib/patches/openshift/openshift-ds-update371.patch create mode 100644 anslib/patches/openshift/registry-ds-glusterfs-fixes.patch create mode 100644 anslib/patches/openshift/registry-ds-glusterfs-storageclass.patch create mode 100644 anslib/patches/openshift/template_broker-ds-badcheck.patch delete mode 100644 anslib/patches/registry-ds-glusterfs-fixes.patch delete mode 100644 anslib/patches/registry-ds-glusterfs-storageclass.patch delete mode 100644 anslib/patches/template_broker-ds-badcheck.patch (limited to 'anslib/patches') diff --git a/anslib/patches/ansible-ghetto-json-ds-dont-parse-numbers.patch b/anslib/patches/ansible-ghetto-json-ds-dont-parse-numbers.patch new file mode 100644 index 0000000..62069d3 --- /dev/null +++ b/anslib/patches/ansible-ghetto-json-ds-dont-parse-numbers.patch @@ -0,0 +1,27 @@ +diff --git a/ghetto_json b/ghetto_json +index ebc3d51..ef936b9 100755 +--- a/ghetto_json ++++ b/ghetto_json +@@ -35,14 +35,14 @@ def main(params_list): + del ref[last_part] + changed = True + else: +- if target.isdigit(): +- target = int(target) +- if target == 'null': +- target = None +- if target == 'false': +- target = False +- if target == 'true': +- target = True ++# if target.isdigit(): ++# target = int(target) ++# if target == 'null': ++# target = None ++# if target == 'false': ++# target = False ++# if target == 'true': ++# target = True + if last_part not in ref or ref[last_part] != target: + ref[last_part] = target + changed = True diff --git a/anslib/patches/ansible-role-ntp-ds-replace-obsolete-constructs.patch b/anslib/patches/ansible-role-ntp-ds-replace-obsolete-constructs.patch new file mode 100644 index 0000000..6ad99b9 --- /dev/null +++ b/anslib/patches/ansible-role-ntp-ds-replace-obsolete-constructs.patch @@ -0,0 +1,13 @@ +diff --git a/tasks/main.yml b/tasks/main.yml +index afbf1c2..503f4b0 100644 +--- a/tasks/main.yml ++++ b/tasks/main.yml +@@ -13,7 +13,7 @@ + state: present + when: ansible_system == "Linux" + +-- include: clock-rhel-6.yml ++- include_tasks: clock-rhel-6.yml + when: ansible_os_family == 'RedHat' and ansible_distribution_version.split('.')[0] == '6' + + - name: Set timezone diff --git a/anslib/patches/ansible_broker-ds-sc.patch b/anslib/patches/ansible_broker-ds-sc.patch deleted file mode 100644 index 9f99056..0000000 --- a/anslib/patches/ansible_broker-ds-sc.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/roles/ansible_service_broker/tasks/install.yml -+++ b/roles/ansible_service_broker/tasks/install.yml -@@ -211,6 +211,7 @@ - access_modes: - - ReadWriteOnce - volume_capacity: 1G -+ storage_class_name: glusterfs-storage - - - name: Search for existing Ansible Service Broker deployment config - oc_obj: diff --git a/anslib/patches/etcd-ds-rh1538446-openshift-undefined.patch b/anslib/patches/etcd-ds-rh1538446-openshift-undefined.patch deleted file mode 100644 index 2301072..0000000 --- a/anslib/patches/etcd-ds-rh1538446-openshift-undefined.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/roles/openshift_etcd_facts/tasks/main.yml b/roles/openshift_etcd_facts/tasks/main.yml -index 86546f4..bda0606 100644 ---- a/roles/openshift_etcd_facts/tasks/main.yml -+++ b/roles/openshift_etcd_facts/tasks/main.yml -@@ -1,2 +1,6 @@ - --- -+- openshift_facts: -+ role: etcd -+ local_facts: {} -+ - - import_tasks: set_etcd_ca_host.yml diff --git a/anslib/patches/glusterfs-ds-mountrun.patch b/anslib/patches/glusterfs-ds-mountrun.patch deleted file mode 100644 index 02f7e15..0000000 --- a/anslib/patches/glusterfs-ds-mountrun.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/roles/openshift_storage_glusterfs/files/v3.7/glusterfs-template.yml -+++ b/roles/openshift_storage_glusterfs/files/v3.7/glusterfs-template.yml -@@ -49,6 +49,8 @@ objects: - mountPath: "/var/lib/heketi" - - name: glusterfs-run - mountPath: "/run" -+# - name: glusterfs-socket -+# mountPath: "/run/glusterd.socket" - - name: glusterfs-lvm - mountPath: "/run/lvm" - - name: glusterfs-etc -@@ -98,7 +100,12 @@ objects: - hostPath: - path: "/var/lib/heketi" - - name: glusterfs-run -- emptyDir: {} -+ hostPath: -+ path: "/run/glusterd" -+# emptyDir: {} -+# - name: glusterfs-socket -+# hostPath: -+# path: "/run/glusterd.socket" - - name: glusterfs-lvm - hostPath: - path: "/run/lvm" diff --git a/anslib/patches/glusterfs-ds-use_cluster_local_for_heketi.patch b/anslib/patches/glusterfs-ds-use_cluster_local_for_heketi.patch deleted file mode 100644 index 75a8a43..0000000 --- a/anslib/patches/glusterfs-ds-use_cluster_local_for_heketi.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml b/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml -index 4928e86..b8f3cab 100644 ---- a/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml -+++ b/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml -@@ -293,7 +293,8 @@ - - - name: Determine StorageClass heketi URL - set_fact: -- glusterfs_heketi_route: "{{ heketi_route.results.results[0]['spec']['host'] }}" -+ glusterfs_heketi_route: "heketi-{{ glusterfs_name }}.{{ glusterfs_namespace }}.svc.cluster.local:8080" -+# glusterfs_heketi_route: "{{ heketi_route.results.results[0]['spec']['host'] }}" - when: - - glusterfs_heketi_is_native - -@@ -344,7 +345,8 @@ - - - name: Determine StorageClass heketi URL - set_fact: -- glusterfs_heketi_route: "{{ heketi_route.results.results[0]['spec']['host'] }}" -+ glusterfs_heketi_route: "heketi-{{ glusterfs_name }}.{{ glusterfs_namespace }}.svc.cluster.local:8080" -+# glusterfs_heketi_route: "{{ heketi_route.results.results[0]['spec']['host'] }}" - when: - - glusterfs_heketi_is_native - - glusterfs_heketi_route is not defined diff --git a/anslib/patches/networkmanager-ds-use-openshift-interface.patch b/anslib/patches/networkmanager-ds-use-openshift-interface.patch deleted file mode 100644 index 687be8a..0000000 --- a/anslib/patches/networkmanager-ds-use-openshift-interface.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/roles/openshift_node/files/bootstrap.yml b/roles/openshift_node/files/bootstrap.yml -index ea28064..df95ba3 100644 ---- a/roles/openshift_node/files/bootstrap.yml -+++ b/roles/openshift_node/files/bootstrap.yml -@@ -8,7 +8,7 @@ - lines: - - regex: ^listen-address - state: present -- line: "listen-address={{ ansible_default_ipv4.address }}" -+ line: "listen-address={{ openshift_dns_ip }}" - node_dns: - file: /etc/dnsmasq.d/node-dnsmasq.conf - lines: -diff --git a/roles/openshift_node/files/networkmanager/99-origin-dns.sh b/roles/openshift_node/files/networkmanager/99-origin-dns.sh -index acf3e2f..16129a2 100755 ---- a/roles/openshift_node/files/networkmanager/99-origin-dns.sh -+++ b/roles/openshift_node/files/networkmanager/99-origin-dns.sh -@@ -43,10 +43,25 @@ if [[ $2 =~ ^(up|dhcp4-change|dhcp6-change)$ ]]; then - ###################################################################### - # couldn't find an existing method to determine if the interface owns the - # default route -- def_route=$(/sbin/ip route list match 0.0.0.0/0 | awk '{print $3 }') -- def_route_int=$(/sbin/ip route get to ${def_route} | awk '{print $3}') -- def_route_ip=$(/sbin/ip route get to ${def_route} | awk '{print $5}') -- if [[ ${DEVICE_IFACE} == ${def_route_int} ]]; then -+ #SDS -+ #def_route=$(/sbin/ip route list match 0.0.0.0/0 | awk '{print $3 }') -+ #def_route_int=$(/sbin/ip route get to ${def_route} | awk '{print $3}') -+ #def_route_ip=$(/sbin/ip route get to ${def_route} | awk '{print $5}') -+ #EDS -+ def_route_ip=$(cat /etc/hosts | grep openshift_dns_ip | awk '{ print $1 }') -+ [ -n "$def_route_ip" ] && def_route_int=$(ip -o addr show | grep ${def_route_ip} | awk '{ print $2 }') -+ if [ -z "$def_route_ip" -o -z "$def_route_int" ]; then -+ def_route=$(/sbin/ip route list match 0.0.0.0/0 | awk '{print $3 }') -+ def_route_int=$(/sbin/ip route get to ${def_route} | awk '{print $3}' | head -n 1) -+ def_route_ip=$(/sbin/ip -f inet addr show dev ${def_route_int} scope global up | grep -Po 'inet \K[\d.]+' | head -n 1) -+ fi -+ -+ def_routes=$(/sbin/ip route list match 0.0.0.0/0 | awk '{print $3 }') -+ def_routes_int=$(for r in ${def_routes}; do /sbin/ip route get to ${r} | awk '{print $3}'; done) -+ interfaces="${def_route_int} ${def_routes_int}" -+ -+ if [[ "${interfaces}" =~ (^|[[:space:]])${DEVICE_IFACE}($|[[:space:]]) ]]; then -+# if [[ ${DEVICE_IFACE} == ${def_route_int} ]]; then - if [ ! -f /etc/dnsmasq.d/origin-dns.conf ]; then - cat << EOF > /etc/dnsmasq.d/origin-dns.conf - no-resolv diff --git a/anslib/patches/openshift-ds-allow-upgrade-to-371.patch b/anslib/patches/openshift-ds-allow-upgrade-to-371.patch deleted file mode 100644 index 2bae14e..0000000 --- a/anslib/patches/openshift-ds-allow-upgrade-to-371.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml -index cc2ec27..6c4ccf8 100644 ---- a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml -+++ b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml -@@ -12,7 +12,7 @@ - - pre_upgrade - tasks: - - set_fact: -- openshift_upgrade_target: '3.7' -+ openshift_upgrade_target: '3.7.1' - openshift_upgrade_min: '3.6' - - - import_playbook: ../pre/config.yml -diff --git a/roles/openshift_repos/templates/CentOS-OpenShift-Origin371.repo.j2 b/roles/openshift_repos/templates/CentOS-OpenShift-Origin371.repo.j2 -new file mode 100644 -index 0000000..3118c7c ---- /dev/null -+++ b/roles/openshift_repos/templates/CentOS-OpenShift-Origin371.repo.j2 -@@ -0,0 +1,26 @@ -+[centos-openshift-origin371] -+name=CentOS OpenShift Origin -+baseurl=http://ufo.kit.edu/ands/repos/openshift74/ -+enabled=1 -+gpgcheck=0 -+ -+[centos-openshift-origin37-testing] -+name=CentOS OpenShift Origin Testing -+baseurl=http://buildlogs.centos.org/centos/7/paas/x86_64/openshift-origin37/ -+enabled={{ 1 if openshift_repos_enable_testing else 0 }} -+gpgcheck=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-PaaS -+ -+[centos-openshift-origin37-debuginfo] -+name=CentOS OpenShift Origin DebugInfo -+baseurl=http://debuginfo.centos.org/centos/7/paas/x86_64/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-PaaS -+ -+[centos-openshift-origin37-source] -+name=CentOS OpenShift Origin Source -+baseurl=http://vault.centos.org/centos/7/paas/Source/openshift-origin37/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-PaaS diff --git a/anslib/patches/openshift-ds-update371.patch b/anslib/patches/openshift-ds-update371.patch deleted file mode 100644 index a6beff3..0000000 --- a/anslib/patches/openshift-ds-update371.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml -index cc2ec27..6c4ccf8 100644 ---- a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml -+++ b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml -@@ -12,7 +12,7 @@ - - pre_upgrade - tasks: - - set_fact: -- openshift_upgrade_target: '3.7' -+ openshift_upgrade_target: '3.7.1' - openshift_upgrade_min: '3.6' - - - import_playbook: ../pre/config.yml -diff --git a/roles/openshift_repos/templates/CentOS-OpenShift-Origin371.repo.j2 b/roles/openshift_repos/templates/CentOS-OpenShift-Origin371.repo.j2 -new file mode 100644 -index 0000000..10b49c0 ---- /dev/null -+++ b/roles/openshift_repos/templates/CentOS-OpenShift-Origin371.repo.j2 -@@ -0,0 +1,26 @@ -+[centos-openshift-origin371] -+name=CentOS OpenShift Origin -+baseurl={{ ands_repo_url }}/openshift371/ -+enabled=1 -+gpgcheck=0 -+ -+[centos-openshift-origin37-testing] -+name=CentOS OpenShift Origin Testing -+baseurl=http://buildlogs.centos.org/centos/7/paas/x86_64/openshift-origin37/ -+enabled={{ 1 if openshift_repos_enable_testing else 0 }} -+gpgcheck=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-PaaS -+ -+[centos-openshift-origin37-debuginfo] -+name=CentOS OpenShift Origin DebugInfo -+baseurl=http://debuginfo.centos.org/centos/7/paas/x86_64/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-PaaS -+ -+[centos-openshift-origin37-source] -+name=CentOS OpenShift Origin Source -+baseurl=http://vault.centos.org/centos/7/paas/Source/openshift-origin37/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-PaaS diff --git a/anslib/patches/openshift/ansible_broker-ds-sc.patch b/anslib/patches/openshift/ansible_broker-ds-sc.patch new file mode 100644 index 0000000..9f99056 --- /dev/null +++ b/anslib/patches/openshift/ansible_broker-ds-sc.patch @@ -0,0 +1,10 @@ +--- a/roles/ansible_service_broker/tasks/install.yml ++++ b/roles/ansible_service_broker/tasks/install.yml +@@ -211,6 +211,7 @@ + access_modes: + - ReadWriteOnce + volume_capacity: 1G ++ storage_class_name: glusterfs-storage + + - name: Search for existing Ansible Service Broker deployment config + oc_obj: diff --git a/anslib/patches/openshift/etcd-ds-rh1538446-openshift-undefined.patch b/anslib/patches/openshift/etcd-ds-rh1538446-openshift-undefined.patch new file mode 100644 index 0000000..2301072 --- /dev/null +++ b/anslib/patches/openshift/etcd-ds-rh1538446-openshift-undefined.patch @@ -0,0 +1,11 @@ +diff --git a/roles/openshift_etcd_facts/tasks/main.yml b/roles/openshift_etcd_facts/tasks/main.yml +index 86546f4..bda0606 100644 +--- a/roles/openshift_etcd_facts/tasks/main.yml ++++ b/roles/openshift_etcd_facts/tasks/main.yml +@@ -1,2 +1,6 @@ + --- ++- openshift_facts: ++ role: etcd ++ local_facts: {} ++ + - import_tasks: set_etcd_ca_host.yml diff --git a/anslib/patches/openshift/glusterfs-ds-mountrun.patch b/anslib/patches/openshift/glusterfs-ds-mountrun.patch new file mode 100644 index 0000000..02f7e15 --- /dev/null +++ b/anslib/patches/openshift/glusterfs-ds-mountrun.patch @@ -0,0 +1,25 @@ +--- a/roles/openshift_storage_glusterfs/files/v3.7/glusterfs-template.yml ++++ b/roles/openshift_storage_glusterfs/files/v3.7/glusterfs-template.yml +@@ -49,6 +49,8 @@ objects: + mountPath: "/var/lib/heketi" + - name: glusterfs-run + mountPath: "/run" ++# - name: glusterfs-socket ++# mountPath: "/run/glusterd.socket" + - name: glusterfs-lvm + mountPath: "/run/lvm" + - name: glusterfs-etc +@@ -98,7 +100,12 @@ objects: + hostPath: + path: "/var/lib/heketi" + - name: glusterfs-run +- emptyDir: {} ++ hostPath: ++ path: "/run/glusterd" ++# emptyDir: {} ++# - name: glusterfs-socket ++# hostPath: ++# path: "/run/glusterd.socket" + - name: glusterfs-lvm + hostPath: + path: "/run/lvm" diff --git a/anslib/patches/openshift/glusterfs-ds-use_cluster_local_for_heketi.patch b/anslib/patches/openshift/glusterfs-ds-use_cluster_local_for_heketi.patch new file mode 100644 index 0000000..75a8a43 --- /dev/null +++ b/anslib/patches/openshift/glusterfs-ds-use_cluster_local_for_heketi.patch @@ -0,0 +1,24 @@ +diff --git a/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml b/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml +index 4928e86..b8f3cab 100644 +--- a/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml ++++ b/roles/openshift_storage_glusterfs/tasks/glusterfs_common.yml +@@ -293,7 +293,8 @@ + + - name: Determine StorageClass heketi URL + set_fact: +- glusterfs_heketi_route: "{{ heketi_route.results.results[0]['spec']['host'] }}" ++ glusterfs_heketi_route: "heketi-{{ glusterfs_name }}.{{ glusterfs_namespace }}.svc.cluster.local:8080" ++# glusterfs_heketi_route: "{{ heketi_route.results.results[0]['spec']['host'] }}" + when: + - glusterfs_heketi_is_native + +@@ -344,7 +345,8 @@ + + - name: Determine StorageClass heketi URL + set_fact: +- glusterfs_heketi_route: "{{ heketi_route.results.results[0]['spec']['host'] }}" ++ glusterfs_heketi_route: "heketi-{{ glusterfs_name }}.{{ glusterfs_namespace }}.svc.cluster.local:8080" ++# glusterfs_heketi_route: "{{ heketi_route.results.results[0]['spec']['host'] }}" + when: + - glusterfs_heketi_is_native + - glusterfs_heketi_route is not defined diff --git a/anslib/patches/openshift/networkmanager-ds-use-openshift-interface.patch b/anslib/patches/openshift/networkmanager-ds-use-openshift-interface.patch new file mode 100644 index 0000000..687be8a --- /dev/null +++ b/anslib/patches/openshift/networkmanager-ds-use-openshift-interface.patch @@ -0,0 +1,47 @@ +diff --git a/roles/openshift_node/files/bootstrap.yml b/roles/openshift_node/files/bootstrap.yml +index ea28064..df95ba3 100644 +--- a/roles/openshift_node/files/bootstrap.yml ++++ b/roles/openshift_node/files/bootstrap.yml +@@ -8,7 +8,7 @@ + lines: + - regex: ^listen-address + state: present +- line: "listen-address={{ ansible_default_ipv4.address }}" ++ line: "listen-address={{ openshift_dns_ip }}" + node_dns: + file: /etc/dnsmasq.d/node-dnsmasq.conf + lines: +diff --git a/roles/openshift_node/files/networkmanager/99-origin-dns.sh b/roles/openshift_node/files/networkmanager/99-origin-dns.sh +index acf3e2f..16129a2 100755 +--- a/roles/openshift_node/files/networkmanager/99-origin-dns.sh ++++ b/roles/openshift_node/files/networkmanager/99-origin-dns.sh +@@ -43,10 +43,25 @@ if [[ $2 =~ ^(up|dhcp4-change|dhcp6-change)$ ]]; then + ###################################################################### + # couldn't find an existing method to determine if the interface owns the + # default route +- def_route=$(/sbin/ip route list match 0.0.0.0/0 | awk '{print $3 }') +- def_route_int=$(/sbin/ip route get to ${def_route} | awk '{print $3}') +- def_route_ip=$(/sbin/ip route get to ${def_route} | awk '{print $5}') +- if [[ ${DEVICE_IFACE} == ${def_route_int} ]]; then ++ #SDS ++ #def_route=$(/sbin/ip route list match 0.0.0.0/0 | awk '{print $3 }') ++ #def_route_int=$(/sbin/ip route get to ${def_route} | awk '{print $3}') ++ #def_route_ip=$(/sbin/ip route get to ${def_route} | awk '{print $5}') ++ #EDS ++ def_route_ip=$(cat /etc/hosts | grep openshift_dns_ip | awk '{ print $1 }') ++ [ -n "$def_route_ip" ] && def_route_int=$(ip -o addr show | grep ${def_route_ip} | awk '{ print $2 }') ++ if [ -z "$def_route_ip" -o -z "$def_route_int" ]; then ++ def_route=$(/sbin/ip route list match 0.0.0.0/0 | awk '{print $3 }') ++ def_route_int=$(/sbin/ip route get to ${def_route} | awk '{print $3}' | head -n 1) ++ def_route_ip=$(/sbin/ip -f inet addr show dev ${def_route_int} scope global up | grep -Po 'inet \K[\d.]+' | head -n 1) ++ fi ++ ++ def_routes=$(/sbin/ip route list match 0.0.0.0/0 | awk '{print $3 }') ++ def_routes_int=$(for r in ${def_routes}; do /sbin/ip route get to ${r} | awk '{print $3}'; done) ++ interfaces="${def_route_int} ${def_routes_int}" ++ ++ if [[ "${interfaces}" =~ (^|[[:space:]])${DEVICE_IFACE}($|[[:space:]]) ]]; then ++# if [[ ${DEVICE_IFACE} == ${def_route_int} ]]; then + if [ ! -f /etc/dnsmasq.d/origin-dns.conf ]; then + cat << EOF > /etc/dnsmasq.d/origin-dns.conf + no-resolv diff --git a/anslib/patches/openshift/openshift-ds-allow-upgrade-to-371.patch b/anslib/patches/openshift/openshift-ds-allow-upgrade-to-371.patch new file mode 100644 index 0000000..2bae14e --- /dev/null +++ b/anslib/patches/openshift/openshift-ds-allow-upgrade-to-371.patch @@ -0,0 +1,45 @@ +diff --git a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml +index cc2ec27..6c4ccf8 100644 +--- a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml ++++ b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml +@@ -12,7 +12,7 @@ + - pre_upgrade + tasks: + - set_fact: +- openshift_upgrade_target: '3.7' ++ openshift_upgrade_target: '3.7.1' + openshift_upgrade_min: '3.6' + + - import_playbook: ../pre/config.yml +diff --git a/roles/openshift_repos/templates/CentOS-OpenShift-Origin371.repo.j2 b/roles/openshift_repos/templates/CentOS-OpenShift-Origin371.repo.j2 +new file mode 100644 +index 0000000..3118c7c +--- /dev/null ++++ b/roles/openshift_repos/templates/CentOS-OpenShift-Origin371.repo.j2 +@@ -0,0 +1,26 @@ ++[centos-openshift-origin371] ++name=CentOS OpenShift Origin ++baseurl=http://ufo.kit.edu/ands/repos/openshift74/ ++enabled=1 ++gpgcheck=0 ++ ++[centos-openshift-origin37-testing] ++name=CentOS OpenShift Origin Testing ++baseurl=http://buildlogs.centos.org/centos/7/paas/x86_64/openshift-origin37/ ++enabled={{ 1 if openshift_repos_enable_testing else 0 }} ++gpgcheck=0 ++gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-PaaS ++ ++[centos-openshift-origin37-debuginfo] ++name=CentOS OpenShift Origin DebugInfo ++baseurl=http://debuginfo.centos.org/centos/7/paas/x86_64/ ++enabled=0 ++gpgcheck=1 ++gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-PaaS ++ ++[centos-openshift-origin37-source] ++name=CentOS OpenShift Origin Source ++baseurl=http://vault.centos.org/centos/7/paas/Source/openshift-origin37/ ++enabled=0 ++gpgcheck=1 ++gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-PaaS diff --git a/anslib/patches/openshift/openshift-ds-update371.patch b/anslib/patches/openshift/openshift-ds-update371.patch new file mode 100644 index 0000000..a6beff3 --- /dev/null +++ b/anslib/patches/openshift/openshift-ds-update371.patch @@ -0,0 +1,45 @@ +diff --git a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml +index cc2ec27..6c4ccf8 100644 +--- a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml ++++ b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml +@@ -12,7 +12,7 @@ + - pre_upgrade + tasks: + - set_fact: +- openshift_upgrade_target: '3.7' ++ openshift_upgrade_target: '3.7.1' + openshift_upgrade_min: '3.6' + + - import_playbook: ../pre/config.yml +diff --git a/roles/openshift_repos/templates/CentOS-OpenShift-Origin371.repo.j2 b/roles/openshift_repos/templates/CentOS-OpenShift-Origin371.repo.j2 +new file mode 100644 +index 0000000..10b49c0 +--- /dev/null ++++ b/roles/openshift_repos/templates/CentOS-OpenShift-Origin371.repo.j2 +@@ -0,0 +1,26 @@ ++[centos-openshift-origin371] ++name=CentOS OpenShift Origin ++baseurl={{ ands_repo_url }}/openshift371/ ++enabled=1 ++gpgcheck=0 ++ ++[centos-openshift-origin37-testing] ++name=CentOS OpenShift Origin Testing ++baseurl=http://buildlogs.centos.org/centos/7/paas/x86_64/openshift-origin37/ ++enabled={{ 1 if openshift_repos_enable_testing else 0 }} ++gpgcheck=0 ++gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-PaaS ++ ++[centos-openshift-origin37-debuginfo] ++name=CentOS OpenShift Origin DebugInfo ++baseurl=http://debuginfo.centos.org/centos/7/paas/x86_64/ ++enabled=0 ++gpgcheck=1 ++gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-PaaS ++ ++[centos-openshift-origin37-source] ++name=CentOS OpenShift Origin Source ++baseurl=http://vault.centos.org/centos/7/paas/Source/openshift-origin37/ ++enabled=0 ++gpgcheck=1 ++gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-PaaS diff --git a/anslib/patches/openshift/registry-ds-glusterfs-fixes.patch b/anslib/patches/openshift/registry-ds-glusterfs-fixes.patch new file mode 100644 index 0000000..65f30e5 --- /dev/null +++ b/anslib/patches/openshift/registry-ds-glusterfs-fixes.patch @@ -0,0 +1,61 @@ +diff --git a/roles/openshift_hosted/tasks/registry.yml b/roles/openshift_hosted/tasks/registry.yml +index bc4d81e..4720095 100644 +diff --git a/roles/openshift_hosted/tasks/registry_storage.yml b/roles/openshift_hosted/tasks/registry_storage.yml +index aa66a78..e1b8c4e 100644 +diff --git a/roles/openshift_hosted/tasks/storage/glusterfs.yml b/roles/openshift_hosted/tasks/storage/glusterfs.yml +index 7223a5a..3465b6c 100644 +--- a/roles/openshift_hosted/tasks/storage/glusterfs.yml ++++ b/roles/openshift_hosted/tasks/storage/glusterfs.yml +@@ -35,7 +35,7 @@ + mount: + state: mounted + fstype: glusterfs +- src: "{% if 'glusterfs_registry' in groups and groups['glusterfs_registry'] | length > 0 %}{% set node = groups.glusterfs_registry[0] %}{% elif 'glusterfs' in groups and groups['glusterfs'] | length > 0 %}{% set node = groups.glusterfs[0] %}{% endif %}{% if openshift_hosted_registry_storage_glusterfs_ips is defined and openshift_hosted_registry_storage_glusterfs_ips|length > 0 %}{{ openshift_hosted_registry_storage_glusterfs_ips[0] }}{% elif 'glusterfs_hostname' in hostvars[node] %}{{ hostvars[node].glusterfs_hostname }}{% elif 'openshift' in hostvars[node] %}{{ hostvars[node].openshift.node.nodename }}{% else %}{{ node }}{% endif %}:/{{ openshift.hosted.registry.storage.glusterfs.path }}" ++ src: "{% if 'glusterfs_registry' in groups and groups['glusterfs_registry'] | length > 0 %}{% set node = groups.glusterfs_registry[0] %}{% elif 'glusterfs' in groups and groups['glusterfs'] | length > 0 %}{% set node = groups.glusterfs[0] %}{% endif %}{% if openshift_hosted_registry_storage_glusterfs_ips is defined and openshift_hosted_registry_storage_glusterfs_ips|length > 0 %}{{ openshift_hosted_registry_storage_glusterfs_ips[0] }}{% elif 'glusterfs_hostname' in hostvars[node] %}{{ hostvars[node].glusterfs_hostname }}{% elif 'openshift' in hostvars[node] %}{{ hostvars[node].openshift.node.nodename }}{% else %}{{ node }}{% endif %}:/{{ openshift_hosted_registry_storage_glusterfs_path }}" + name: "{{ mktemp.stdout }}" + + - name: Set registry volume permissions +@@ -49,10 +49,11 @@ + - block: + - name: Activate registry maintenance mode + oc_env: ++ kind: dc + namespace: "{{ openshift_hosted_registry_namespace }}" + name: "{{ openshift_hosted_registry_name }}" + env_vars: +- - REGISTRY_STORAGE_MAINTENANCE_READONLY_ENABLED: 'true' ++ REGISTRY_STORAGE_MAINTENANCE_READONLY_ENABLED: 'true' + + - name: Get first registry pod name + set_fact: +@@ -72,11 +73,12 @@ + + - name: Deactivate registry maintenance mode + oc_env: ++ kind: dc + namespace: "{{ openshift_hosted_registry_namespace }}" + name: "{{ openshift_hosted_registry_name }}" + state: absent + env_vars: +- - REGISTRY_STORAGE_MAINTENANCE_READONLY_ENABLED: 'true' ++ REGISTRY_STORAGE_MAINTENANCE_READONLY_ENABLED: 'true' + when: openshift_hosted_registry_storage_glusterfs_swap + + - name: Unmount registry volume and clean up mount point/fstab +diff --git a/roles/openshift_persistent_volumes/tasks/main.yml b/roles/openshift_persistent_volumes/tasks/main.yml +index b1d9c8c..1c32a67 100644 +diff --git a/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2 b/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2 +index ca8b747..ce15533 100644 +--- a/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2 ++++ b/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2 +@@ -12,7 +12,7 @@ items: + resources: + requests: + storage: "{{ claim.capacity }}" +-{% if claim.storageclass is not None %} ++{% if claim.storageclass is defined and claim.storageclass is not none %} + storageClassName: "{{ claim.storageclass }}" + {% endif %} + {% endfor %} +diff --git a/roles/openshift_storage_glusterfs/tasks/glusterfs_registry.yml b/roles/openshift_storage_glusterfs/tasks/glusterfs_registry.yml +index e91e130..f3562b6 100644 diff --git a/anslib/patches/openshift/registry-ds-glusterfs-storageclass.patch b/anslib/patches/openshift/registry-ds-glusterfs-storageclass.patch new file mode 100644 index 0000000..a189091 --- /dev/null +++ b/anslib/patches/openshift/registry-ds-glusterfs-storageclass.patch @@ -0,0 +1,64 @@ +diff --git a/roles/openshift_hosted/tasks/registry.yml b/roles/openshift_hosted/tasks/registry.yml +index bc4d81e..4720095 100644 +--- a/roles/openshift_hosted/tasks/registry.yml ++++ b/roles/openshift_hosted/tasks/registry.yml +@@ -112,6 +112,7 @@ + when: + - openshift_hosted_registry_storage_glusterfs_ips|length > 0 + - openshift_hosted_registry_storage_kind | default(none) in ['glusterfs'] ++ - openshift_hosted_registry_storage_class is not defined + + - name: Create OpenShift registry + oc_adm_registry: +diff --git a/roles/openshift_hosted/tasks/registry_storage.yml b/roles/openshift_hosted/tasks/registry_storage.yml +index aa66a78..e1b8c4e 100644 +--- a/roles/openshift_hosted/tasks/registry_storage.yml ++++ b/roles/openshift_hosted/tasks/registry_storage.yml +@@ -2,3 +2,4 @@ + - include_tasks: storage/glusterfs.yml + when: + - openshift_hosted_registry_storage_kind | default(none) == 'glusterfs' or openshift_hosted_registry_storage_glusterfs_swap ++ - openshift_hosted_registry_storage_class is not defined +diff --git a/roles/openshift_hosted/tasks/storage/glusterfs.yml b/roles/openshift_hosted/tasks/storage/glusterfs.yml +index 7223a5a..3465b6c 100644 +diff --git a/roles/openshift_persistent_volumes/tasks/main.yml b/roles/openshift_persistent_volumes/tasks/main.yml +index b1d9c8c..1c32a67 100644 +--- a/roles/openshift_persistent_volumes/tasks/main.yml ++++ b/roles/openshift_persistent_volumes/tasks/main.yml +@@ -23,7 +23,21 @@ + - name: "{{ openshift_hosted_registry_storage_volume_name }}-glusterfs-claim" + capacity: "{{ openshift_hosted_registry_storage_volume_size }}" + access_modes: "{{ openshift_hosted_registry_storage_access_modes }}" +- when: openshift_hosted_registry_storage_glusterfs_swap | default(False) ++ when: ++ - openshift_hosted_registry_storage_glusterfs_swap | default(False) ++ - openshift_hosted_registry_storage_class is not defined ++ ++ ++- set_fact: ++ glusterfs_pv: [] ++ glusterfs_pvc: ++ - name: "{{ openshift_hosted_registry_storage_volume_name }}-claim" ++ storageclass: "{{ openshift_hosted_registry_storage_class }}" ++ capacity: "{{ openshift_hosted_registry_storage_volume_size }}" ++ access_modes: "{{ openshift_hosted_registry_storage_access_modes }}" ++ when: ++ - openshift_hosted_registry_storage_class is defined ++ + + - name: create standard pv and pvc lists + # generate_pv_pvcs_list is a custom action module defined in +diff --git a/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2 b/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2 +index ca8b747..ce15533 100644 +diff --git a/roles/openshift_storage_glusterfs/tasks/glusterfs_registry.yml b/roles/openshift_storage_glusterfs/tasks/glusterfs_registry.yml +index e91e130..f3562b6 100644 +--- a/roles/openshift_storage_glusterfs/tasks/glusterfs_registry.yml ++++ b/roles/openshift_storage_glusterfs/tasks/glusterfs_registry.yml +@@ -12,4 +12,6 @@ + + - name: Create GlusterFS registry volume + command: "{{ glusterfs_heketi_client }} volume create --size={{ openshift_hosted_registry_storage_volume_size | replace('Gi','') }} --name={{ openshift_hosted_registry_storage_glusterfs_path }}" +- when: "openshift_hosted_registry_storage_glusterfs_path not in registry_volume.stdout" ++ when: ++ - "openshift_hosted_registry_storage_glusterfs_path not in registry_volume.stdout" ++ - "openshift_hosted_registry_storage_class is not defined" diff --git a/anslib/patches/openshift/template_broker-ds-badcheck.patch b/anslib/patches/openshift/template_broker-ds-badcheck.patch new file mode 100644 index 0000000..477ec66 --- /dev/null +++ b/anslib/patches/openshift/template_broker-ds-badcheck.patch @@ -0,0 +1,23 @@ +diff --git a/roles/template_service_broker/tasks/install.yml b/roles/template_service_broker/tasks/install.yml +index d674d24..1eff3bc 100644 +--- a/roles/template_service_broker/tasks/install.yml ++++ b/roles/template_service_broker/tasks/install.yml +@@ -1,11 +1,12 @@ + --- ++#DS + # Fact setting +-- name: Ensure that Template Service Broker has nodes to run on +- fail: +- msg: |- +- No schedulable nodes found matching node selector for Template Service Broker - '{{ template_service_broker_selector }}' +- when: +- - openshift_schedulable_node_labels | lib_utils_oo_has_no_matching_selector(template_service_broker_selector) ++#- name: Ensure that Template Service Broker has nodes to run on ++# fail: ++# msg: |- ++# No schedulable nodes found matching node selector for Template Service Broker - '{{ template_service_broker_selector }}' ++# when: ++# - openshift_schedulable_node_labels | lib_utils_oo_has_no_matching_selector(template_service_broker_selector) + + - name: Set default image variables based on openshift_deployment_type + include_vars: "{{ item }}" diff --git a/anslib/patches/registry-ds-glusterfs-fixes.patch b/anslib/patches/registry-ds-glusterfs-fixes.patch deleted file mode 100644 index 65f30e5..0000000 --- a/anslib/patches/registry-ds-glusterfs-fixes.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff --git a/roles/openshift_hosted/tasks/registry.yml b/roles/openshift_hosted/tasks/registry.yml -index bc4d81e..4720095 100644 -diff --git a/roles/openshift_hosted/tasks/registry_storage.yml b/roles/openshift_hosted/tasks/registry_storage.yml -index aa66a78..e1b8c4e 100644 -diff --git a/roles/openshift_hosted/tasks/storage/glusterfs.yml b/roles/openshift_hosted/tasks/storage/glusterfs.yml -index 7223a5a..3465b6c 100644 ---- a/roles/openshift_hosted/tasks/storage/glusterfs.yml -+++ b/roles/openshift_hosted/tasks/storage/glusterfs.yml -@@ -35,7 +35,7 @@ - mount: - state: mounted - fstype: glusterfs -- src: "{% if 'glusterfs_registry' in groups and groups['glusterfs_registry'] | length > 0 %}{% set node = groups.glusterfs_registry[0] %}{% elif 'glusterfs' in groups and groups['glusterfs'] | length > 0 %}{% set node = groups.glusterfs[0] %}{% endif %}{% if openshift_hosted_registry_storage_glusterfs_ips is defined and openshift_hosted_registry_storage_glusterfs_ips|length > 0 %}{{ openshift_hosted_registry_storage_glusterfs_ips[0] }}{% elif 'glusterfs_hostname' in hostvars[node] %}{{ hostvars[node].glusterfs_hostname }}{% elif 'openshift' in hostvars[node] %}{{ hostvars[node].openshift.node.nodename }}{% else %}{{ node }}{% endif %}:/{{ openshift.hosted.registry.storage.glusterfs.path }}" -+ src: "{% if 'glusterfs_registry' in groups and groups['glusterfs_registry'] | length > 0 %}{% set node = groups.glusterfs_registry[0] %}{% elif 'glusterfs' in groups and groups['glusterfs'] | length > 0 %}{% set node = groups.glusterfs[0] %}{% endif %}{% if openshift_hosted_registry_storage_glusterfs_ips is defined and openshift_hosted_registry_storage_glusterfs_ips|length > 0 %}{{ openshift_hosted_registry_storage_glusterfs_ips[0] }}{% elif 'glusterfs_hostname' in hostvars[node] %}{{ hostvars[node].glusterfs_hostname }}{% elif 'openshift' in hostvars[node] %}{{ hostvars[node].openshift.node.nodename }}{% else %}{{ node }}{% endif %}:/{{ openshift_hosted_registry_storage_glusterfs_path }}" - name: "{{ mktemp.stdout }}" - - - name: Set registry volume permissions -@@ -49,10 +49,11 @@ - - block: - - name: Activate registry maintenance mode - oc_env: -+ kind: dc - namespace: "{{ openshift_hosted_registry_namespace }}" - name: "{{ openshift_hosted_registry_name }}" - env_vars: -- - REGISTRY_STORAGE_MAINTENANCE_READONLY_ENABLED: 'true' -+ REGISTRY_STORAGE_MAINTENANCE_READONLY_ENABLED: 'true' - - - name: Get first registry pod name - set_fact: -@@ -72,11 +73,12 @@ - - - name: Deactivate registry maintenance mode - oc_env: -+ kind: dc - namespace: "{{ openshift_hosted_registry_namespace }}" - name: "{{ openshift_hosted_registry_name }}" - state: absent - env_vars: -- - REGISTRY_STORAGE_MAINTENANCE_READONLY_ENABLED: 'true' -+ REGISTRY_STORAGE_MAINTENANCE_READONLY_ENABLED: 'true' - when: openshift_hosted_registry_storage_glusterfs_swap - - - name: Unmount registry volume and clean up mount point/fstab -diff --git a/roles/openshift_persistent_volumes/tasks/main.yml b/roles/openshift_persistent_volumes/tasks/main.yml -index b1d9c8c..1c32a67 100644 -diff --git a/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2 b/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2 -index ca8b747..ce15533 100644 ---- a/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2 -+++ b/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2 -@@ -12,7 +12,7 @@ items: - resources: - requests: - storage: "{{ claim.capacity }}" --{% if claim.storageclass is not None %} -+{% if claim.storageclass is defined and claim.storageclass is not none %} - storageClassName: "{{ claim.storageclass }}" - {% endif %} - {% endfor %} -diff --git a/roles/openshift_storage_glusterfs/tasks/glusterfs_registry.yml b/roles/openshift_storage_glusterfs/tasks/glusterfs_registry.yml -index e91e130..f3562b6 100644 diff --git a/anslib/patches/registry-ds-glusterfs-storageclass.patch b/anslib/patches/registry-ds-glusterfs-storageclass.patch deleted file mode 100644 index a189091..0000000 --- a/anslib/patches/registry-ds-glusterfs-storageclass.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff --git a/roles/openshift_hosted/tasks/registry.yml b/roles/openshift_hosted/tasks/registry.yml -index bc4d81e..4720095 100644 ---- a/roles/openshift_hosted/tasks/registry.yml -+++ b/roles/openshift_hosted/tasks/registry.yml -@@ -112,6 +112,7 @@ - when: - - openshift_hosted_registry_storage_glusterfs_ips|length > 0 - - openshift_hosted_registry_storage_kind | default(none) in ['glusterfs'] -+ - openshift_hosted_registry_storage_class is not defined - - - name: Create OpenShift registry - oc_adm_registry: -diff --git a/roles/openshift_hosted/tasks/registry_storage.yml b/roles/openshift_hosted/tasks/registry_storage.yml -index aa66a78..e1b8c4e 100644 ---- a/roles/openshift_hosted/tasks/registry_storage.yml -+++ b/roles/openshift_hosted/tasks/registry_storage.yml -@@ -2,3 +2,4 @@ - - include_tasks: storage/glusterfs.yml - when: - - openshift_hosted_registry_storage_kind | default(none) == 'glusterfs' or openshift_hosted_registry_storage_glusterfs_swap -+ - openshift_hosted_registry_storage_class is not defined -diff --git a/roles/openshift_hosted/tasks/storage/glusterfs.yml b/roles/openshift_hosted/tasks/storage/glusterfs.yml -index 7223a5a..3465b6c 100644 -diff --git a/roles/openshift_persistent_volumes/tasks/main.yml b/roles/openshift_persistent_volumes/tasks/main.yml -index b1d9c8c..1c32a67 100644 ---- a/roles/openshift_persistent_volumes/tasks/main.yml -+++ b/roles/openshift_persistent_volumes/tasks/main.yml -@@ -23,7 +23,21 @@ - - name: "{{ openshift_hosted_registry_storage_volume_name }}-glusterfs-claim" - capacity: "{{ openshift_hosted_registry_storage_volume_size }}" - access_modes: "{{ openshift_hosted_registry_storage_access_modes }}" -- when: openshift_hosted_registry_storage_glusterfs_swap | default(False) -+ when: -+ - openshift_hosted_registry_storage_glusterfs_swap | default(False) -+ - openshift_hosted_registry_storage_class is not defined -+ -+ -+- set_fact: -+ glusterfs_pv: [] -+ glusterfs_pvc: -+ - name: "{{ openshift_hosted_registry_storage_volume_name }}-claim" -+ storageclass: "{{ openshift_hosted_registry_storage_class }}" -+ capacity: "{{ openshift_hosted_registry_storage_volume_size }}" -+ access_modes: "{{ openshift_hosted_registry_storage_access_modes }}" -+ when: -+ - openshift_hosted_registry_storage_class is defined -+ - - - name: create standard pv and pvc lists - # generate_pv_pvcs_list is a custom action module defined in -diff --git a/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2 b/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2 -index ca8b747..ce15533 100644 -diff --git a/roles/openshift_storage_glusterfs/tasks/glusterfs_registry.yml b/roles/openshift_storage_glusterfs/tasks/glusterfs_registry.yml -index e91e130..f3562b6 100644 ---- a/roles/openshift_storage_glusterfs/tasks/glusterfs_registry.yml -+++ b/roles/openshift_storage_glusterfs/tasks/glusterfs_registry.yml -@@ -12,4 +12,6 @@ - - - name: Create GlusterFS registry volume - command: "{{ glusterfs_heketi_client }} volume create --size={{ openshift_hosted_registry_storage_volume_size | replace('Gi','') }} --name={{ openshift_hosted_registry_storage_glusterfs_path }}" -- when: "openshift_hosted_registry_storage_glusterfs_path not in registry_volume.stdout" -+ when: -+ - "openshift_hosted_registry_storage_glusterfs_path not in registry_volume.stdout" -+ - "openshift_hosted_registry_storage_class is not defined" diff --git a/anslib/patches/template_broker-ds-badcheck.patch b/anslib/patches/template_broker-ds-badcheck.patch deleted file mode 100644 index 477ec66..0000000 --- a/anslib/patches/template_broker-ds-badcheck.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/roles/template_service_broker/tasks/install.yml b/roles/template_service_broker/tasks/install.yml -index d674d24..1eff3bc 100644 ---- a/roles/template_service_broker/tasks/install.yml -+++ b/roles/template_service_broker/tasks/install.yml -@@ -1,11 +1,12 @@ - --- -+#DS - # Fact setting --- name: Ensure that Template Service Broker has nodes to run on -- fail: -- msg: |- -- No schedulable nodes found matching node selector for Template Service Broker - '{{ template_service_broker_selector }}' -- when: -- - openshift_schedulable_node_labels | lib_utils_oo_has_no_matching_selector(template_service_broker_selector) -+#- name: Ensure that Template Service Broker has nodes to run on -+# fail: -+# msg: |- -+# No schedulable nodes found matching node selector for Template Service Broker - '{{ template_service_broker_selector }}' -+# when: -+# - openshift_schedulable_node_labels | lib_utils_oo_has_no_matching_selector(template_service_broker_selector) - - - name: Set default image variables based on openshift_deployment_type - include_vars: "{{ item }}" -- cgit v1.2.3