-
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.
cherry pick gluster block support for 3.6
- Loading branch information
Showing
9 changed files
with
176 additions
and
51 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
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 -%} |