Skip to content

Commit

Permalink
Merge pull request #15 from mojaloop/fix-multipath-for-longhorn
Browse files Browse the repository at this point in the history
first draft fix multipath for longhorn
  • Loading branch information
dfry authored Jan 23, 2024
2 parents d9daaf1 + 0e57852 commit 203ea78
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mojaloop/iac/playbooks/argok3s_cluster_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
- hosts: master
become: true
roles:
- mojaloop.iac.k8s_node_common
- mojaloop.iac.k3s_common
- mojaloop.iac.k3s_master

- hosts: agent
become: true
roles:
- mojaloop.iac.k8s_node_common
- mojaloop.iac.k3s_common
- mojaloop.iac.k3s_worker

Expand Down
2 changes: 2 additions & 0 deletions mojaloop/iac/playbooks/argomicrok8s_cluster_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- hosts: master
become: true
roles:
- role: mojaloop.iac.k8s_node_common
- role: mojaloop.iac.microk8s
vars:
microk8s_enable_HA: true
Expand Down Expand Up @@ -45,6 +46,7 @@
- hosts: agent
become: true
roles:
- role: mojaloop.iac.k8s_node_common
- role: mojaloop.iac.microk8s
vars:
microk8s_enable_HA: true
Expand Down
19 changes: 19 additions & 0 deletions mojaloop/iac/roles/k8s_node_common/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
- name: Gather the package facts
ansible.builtin.package_facts:
manager: auto

- name: Configure multipathd to ignore longhorn volumes
blockinfile:
path: /etc/multipath.conf
block: |
blacklist {
devnode "^sd[a-z0-9]+"
}
register: multipathconf
when: "'multipath-tools' in ansible_facts.packages"

- name: Restart multipathd
ansible.builtin.service:
name: multipathd
state: restarted
when: "'multipath-tools' in ansible_facts.packages and multipathconf.changed"

0 comments on commit 203ea78

Please sign in to comment.