Skip to content
Snippets Groups Projects
Commit 5b91542c authored by Trung Nguyen's avatar Trung Nguyen
Browse files

Merge branch 'glusteropversion' into 'master'

making sure gluster op.version is set. unfortunately via manual intervention after force fail

See merge request !499
parents f975dea6 3a8e8e90
No related branches found
No related tags found
1 merge request!499making sure gluster op.version is set. unfortunately via manual intervention after force fail
--- ---
#https://docs.gluster.org/en/latest/Administrator%20Guide/Storage%20Pools/ #https://docs.gluster.org/en/latest/Administrator%20Guide/Storage%20Pools/
- name: install gluster repository - name: install gluster repository
yum: yum:
name: name:
...@@ -11,8 +13,8 @@ ...@@ -11,8 +13,8 @@
become: true become: true
become_user: root become_user: root
register: glusterrepo_added register: glusterrepo_added
- name: force refresh of the repository cache - name: force refresh of the repository cache
shell: | shell: |
yum clean metadata yum clean metadata
yum clean all yum clean all
...@@ -24,7 +26,7 @@ ...@@ -24,7 +26,7 @@
check_mode: no check_mode: no
when: ansible_os_family == 'RedHat' and glusterrepo_added.changed when: ansible_os_family == 'RedHat' and glusterrepo_added.changed
args: args:
warn: False warn: False
- name: install gluster - name: install gluster
yum: yum:
...@@ -45,7 +47,7 @@ ...@@ -45,7 +47,7 @@
when: ansible_os_family == 'Debian' when: ansible_os_family == 'Debian'
become: true become: true
become_user: root become_user: root
- name: start daemon - name: start daemon
service: name=glusterd enabled=yes state=started service: name=glusterd enabled=yes state=started
...@@ -73,7 +75,7 @@ ...@@ -73,7 +75,7 @@
run_once: True run_once: True
delegate_to: "{{ groups['SQLNodes'][0] }}" delegate_to: "{{ groups['SQLNodes'][0] }}"
when: gluster_installed.changed when: gluster_installed.changed
- name: enable bitrot - name: enable bitrot
command: "gluster volume bitrot gv enable" command: "gluster volume bitrot gv enable"
become: true become: true
...@@ -82,8 +84,15 @@ ...@@ -82,8 +84,15 @@
run_once: True run_once: True
delegate_to: "{{ groups['SQLNodes'][0] }}" delegate_to: "{{ groups['SQLNodes'][0] }}"
when: gluster_installed.changed when: gluster_installed.changed
#https://docs.gluster.org/en/v3/Upgrade-Guide/op_version/
- name: fail on purpose to manually look up gluster op.version and use it in a later task
fail:
msg: The purpose of this fail is to 1. let you look up what op.version we want to use via gluster volume get all cluster.max-op-version. read doco above ansible line. 2. set this in this role below. 3. comment this fail and run ansible.
- name: set cluster.op-version set this after fail
command: "gluster volume set all cluster.op-version 90000"
#gluster volume bitrot <VOLNAME> enable #gluster volume bitrot <VOLNAME> enable
#not needed anymore or not supported #not needed anymore or not supported
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment