summaryrefslogtreecommitdiffstats
path: root/deployment/playbooks
diff options
context:
space:
mode:
authorValerii Ponomarov <vponomar@redhat.com>2019-02-12 21:38:26 +0530
committerValerii Ponomarov <vponomar@redhat.com>2019-02-12 21:56:44 +0530
commitb853d34b42f822fb41fd8f2122d19692b98b2e8b (patch)
tree02af68c69942a2919d62f96f460bf7a0d22cdeeb /deployment/playbooks
parent2c5ae6e4bfd9ccb6cb7330e46cfec3f910468dad (diff)
Install correct heketi-client version on master nodes
Before, we were installing latest heketi-client version on master nodes. But, in case we install old OCS/CNS we may end up with false impression that we have new features, when it is not so. So, read heketi-client package version from Heketi POD and install exactly the same version on the master nodes. Change-Id: Ic4e9edd7f6ef614d28c061712473aaf9b9f652e2
Diffstat (limited to 'deployment/playbooks')
-rw-r--r--deployment/playbooks/cns-setup.yaml33
-rw-r--r--deployment/playbooks/crs-setup.yaml33
-rw-r--r--deployment/playbooks/ocp-configure.yaml19
3 files changed, 67 insertions, 18 deletions
diff --git a/deployment/playbooks/cns-setup.yaml b/deployment/playbooks/cns-setup.yaml
index 74e58e8f..e51bf1c0 100644
--- a/deployment/playbooks/cns-setup.yaml
+++ b/deployment/playbooks/cns-setup.yaml
@@ -119,3 +119,36 @@
chapauthenabled: "true"
when: cns_automation_config_file_path | length > 0
run_once: true
+
+- name: Install 'heketi-client' package on all the master nodes
+ hosts: master
+ gather_facts: no
+ tasks:
+ - name: Get Heketi POD name on master node
+ command: "oc get pods -l glusterfs=heketi-storage-pod --no-headers {{ ''
+ }}-o=custom-columns=:.metadata.name --namespace storage"
+ register: heketi_pod_name
+ - name: Read heketi-client package version from Heketi POD
+ shell: "oc exec --namespace storage {{ heketi_pod_name.stdout_lines[0]
+ }} -- rpm -q heketi-client --queryformat{{ ''
+ }} '%{version}-%{release}\n' | cut -d '.' -f 1,2,3"
+ register: heketi_client_version
+ - name: Enable Gluster 3 repo on master node
+ import_role:
+ name: enable-gluster-repo
+ - name: Remove existing heketi client from master node if present
+ package:
+ name: "heketi-client"
+ state: absent
+ retries: 5
+ delay: 5
+ register: result
+ until: result is succeeded
+ - name: Install heketi client on master node for CNS and CRS needs
+ package:
+ name: "heketi-client-{{heketi_client_version.stdout_lines[0].strip() }}*"
+ state: present
+ retries: 5
+ delay: 5
+ register: result
+ until: result is succeeded
diff --git a/deployment/playbooks/crs-setup.yaml b/deployment/playbooks/crs-setup.yaml
index e8ef6ad5..abe59eff 100644
--- a/deployment/playbooks/crs-setup.yaml
+++ b/deployment/playbooks/crs-setup.yaml
@@ -161,3 +161,36 @@
chapauthenabled: "true"
when: cns_automation_config_file_path | length > 0
run_once: true
+
+- name: Install 'heketi-client' package on all the master nodes
+ hosts: master
+ gather_facts: no
+ tasks:
+ - name: Get Heketi POD name on master node
+ command: "oc get pods -l glusterfs=heketi-storage-pod --no-headers {{ ''
+ }}-o=custom-columns=:.metadata.name --namespace storage"
+ register: heketi_pod_name
+ - name: Read heketi-client package version from Heketi POD
+ shell: "oc exec --namespace storage {{ heketi_pod_name.stdout_lines[0]
+ }} -- rpm -q heketi-client --queryformat{{ ''
+ }} '%{version}-%{release}\n' | cut -d '.' -f 1,2,3"
+ register: heketi_client_version
+ - name: Enable Gluster 3 repo on master node
+ import_role:
+ name: enable-gluster-repo
+ - name: Remove existing heketi client from master node if present
+ package:
+ name: "heketi-client"
+ state: absent
+ retries: 5
+ delay: 5
+ register: result
+ until: result is succeeded
+ - name: Install heketi client on master node for CNS and CRS needs
+ package:
+ name: "heketi-client-{{heketi_client_version.stdout_lines[0].strip() }}*"
+ state: present
+ retries: 5
+ delay: 5
+ register: result
+ until: result is succeeded
diff --git a/deployment/playbooks/ocp-configure.yaml b/deployment/playbooks/ocp-configure.yaml
index 7a59f9ed..c5123e6a 100644
--- a/deployment/playbooks/ocp-configure.yaml
+++ b/deployment/playbooks/ocp-configure.yaml
@@ -7,25 +7,8 @@
# Group systems
- instance-groups
-- hosts: master
- gather_facts: yes
- vars_files:
- - vars/main.yaml
- tasks:
- - name: Enable Gluster 3 repo
- import_role:
- name: enable-gluster-repo
- - name: Install heketi client for CNS and CRS needs
- package:
- name: heketi-client
- state: latest
- retries: 5
- delay: 5
- register: result
- until: result is succeeded
-
- hosts: single_master
- gather_facts: no
+ gather_facts: yes
vars_files:
- vars/main.yaml
roles: