Skip to content

Instantly share code, notes, and snippets.

@kincl
Last active April 16, 2025 01:12
Show Gist options
  • Save kincl/9670553083cb75814b10d37968fa3016 to your computer and use it in GitHub Desktop.
Save kincl/9670553083cb75814b10d37968fa3016 to your computer and use it in GitHub Desktop.
machineconfig-multipath
# This only went GA for OpenShift in 4.17
#
# https://docs.openshift.com/container-platform/4.17/machine_configuration/machine-config-node-disruption.html
apiVersion: operator.openshift.io/v1
kind: MachineConfiguration
metadata:
name: cluster
namespace: openshift-machine-config-operator
spec:
nodeDisruptionPolicy:
files:
- path: /etc/multipath.conf
actions:
- type: Restart
restart:
serviceName: multipathd.service
units:
- name: multipathd.service
actions:
- type: Restart
restart:
serviceName: multipathd.service
- name: iscsid.service
actions:
- type: Restart
restart:
serviceName: iscsid.service
# /etc/multipath.conf:
# defaults {
# user_friendly_names yes
# find_multipaths no
# }
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: worker
name: worker-enable-multipathing
spec:
config:
ignition:
version: 3.2.0
storage:
files:
- contents:
source: data:text/plain;charset=utf-8;base64,ZGVmYXVsdHMgewogICAgICAgIHVzZXJfZnJpZW5kbHlfbmFtZXMgeWVzCiAgICAgICAgZmluZF9tdWx0aXBhdGhzIG5vCn0K
path: /etc/multipath.conf
systemd:
units:
- name: multipathd.service
enabled: true
# /etc/multipath.conf:
# defaults {
# user_friendly_names yes
# find_multipaths yes
# }
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: worker
name: worker-enable-multipathing
spec:
config:
ignition:
version: 3.2.0
storage:
files:
- contents:
source: data:text/plain;charset=utf-8;base64,ZGVmYXVsdHMgewogICAgICAgIHVzZXJfZnJpZW5kbHlfbmFtZXMgeWVzCiAgICAgICAgZmluZF9tdWx0aXBhdGhzIHllcwp9Cg==
path: /etc/multipath.conf
systemd:
units:
- name: multipathd.service
enabled: true
- name: iscsid.service
enabled: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment