-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6967 from mjudeikis/release-3.6-gluster-block-cherry
Automatic merge from submit-queue. cherry-pick to 3.6 gluster block
- Loading branch information
Showing
11 changed files
with
219 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,33 @@ | ||
--- | ||
- name: Install iSCSI storage plugin dependencies | ||
package: name=iscsi-initiator-utils state=present | ||
package: | ||
name: "{{ item }}" | ||
state: present | ||
when: not openshift.common.is_atomic | bool | ||
register: result | ||
until: result is succeeded | ||
with_items: | ||
- iscsi-initiator-utils | ||
- device-mapper-multipath | ||
|
||
- name: restart services | ||
systemd: | ||
name: "{{ item }}" | ||
state: started | ||
enabled: True | ||
when: not openshift.common.is_atomic | bool | ||
with_items: | ||
- multipathd | ||
- rpcbind | ||
|
||
- name: Template multipath configuration | ||
template: | ||
dest: "/etc/multipath.conf" | ||
src: multipath.conf.j2 | ||
backup: true | ||
when: not openshift.common.is_atomic | bool | ||
|
||
#enable multipath | ||
- name: Enable multipath | ||
command: "mpathconf --enable" | ||
when: not openshift.common.is_atomic | bool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# LIO iSCSI | ||
# TODO: Add env variables for tweaking | ||
devices { | ||
device { | ||
vendor "LIO-ORG" | ||
user_friendly_names "yes" | ||
path_grouping_policy "failover" | ||
path_selector "round-robin 0" | ||
failback immediate | ||
path_checker "tur" | ||
prio "const" | ||
no_path_retry 120 | ||
rr_weight "uniform" | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
- when: r_openshift_storage_glusterfs_firewall_enabled | bool and not r_openshift_storage_glusterfs_use_firewalld | bool | ||
block: | ||
- name: Add iptables allow rules | ||
os_firewall_manage_iptables: | ||
name: "{{ item.service }}" | ||
action: add | ||
protocol: "{{ item.port.split('/')[1] }}" | ||
port: "{{ item.port.split('/')[0] }}" | ||
when: item.cond | default(True) | ||
with_items: "{{ r_openshift_storage_glusterfs_os_firewall_allow }}" | ||
|
||
- name: Remove iptables rules | ||
os_firewall_manage_iptables: | ||
name: "{{ item.service }}" | ||
action: remove | ||
protocol: "{{ item.port.split('/')[1] }}" | ||
port: "{{ item.port.split('/')[0] }}" | ||
when: item.cond | default(True) | ||
with_items: "{{ r_openshift_storage_glusterfs_os_firewall_deny }}" | ||
|
||
- when: r_openshift_storage_glusterfs_firewall_enabled | bool and r_openshift_storage_glusterfs_use_firewalld | bool | ||
block: | ||
- name: Add firewalld allow rules | ||
firewalld: | ||
port: "{{ item.port }}" | ||
permanent: true | ||
immediate: true | ||
state: enabled | ||
when: item.cond | default(True) | ||
with_items: "{{ r_openshift_storage_glusterfs_os_firewall_allow }}" | ||
|
||
- name: Remove firewalld allow rules | ||
firewalld: | ||
port: "{{ item.port }}" | ||
permanent: true | ||
immediate: true | ||
state: disabled | ||
when: item.cond | default(True) | ||
with_items: "{{ r_openshift_storage_glusterfs_os_firewall_deny }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
#{{ ansible_managed }} | ||
dm_thin_pool | ||
dm_snapshot | ||
dm_mirror | ||
dm_mirror | ||
#glusterblock | ||
dm_multipath | ||
target_core_user |
19 changes: 19 additions & 0 deletions
19
roles/openshift_storage_glusterfs/templates/v3.6/gluster-block-storageclass.yml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
apiVersion: storage.k8s.io/v1 | ||
kind: StorageClass | ||
metadata: | ||
name: glusterfs-{{ glusterfs_name }}-block | ||
{% if glusterfs_block_storageclass_default is defined and glusterfs_block_storageclass_default %} | ||
annotations: | ||
storageclass.kubernetes.io/is-default-class: "true" | ||
{% endif %} | ||
provisioner: gluster.org/glusterblock | ||
parameters: | ||
resturl: "http://{% if glusterfs_heketi_is_native %}{{ glusterfs_heketi_route }}{% else %}{{ glusterfs_heketi_url }}:{{ glusterfs_heketi_port }}{% endif %}" | ||
restuser: "admin" | ||
chapauthenabled: "true" | ||
hacount: "3" | ||
{% if glusterfs_heketi_admin_key is defined %} | ||
restsecretnamespace: "{{ glusterfs_namespace }}" | ||
restsecretname: "heketi-{{ glusterfs_name }}-admin-secret-block" | ||
{%- endif -%} |