Skip to content
This repository was archived by the owner on Jul 7, 2020. It is now read-only.

Commit 1263c3c

Browse files
nixpanicjarrpa
authored andcommitted
deploy: add volume mounts for /sys/class and /sys/module
gluster-block (or rather tcmu-runner) uses /sys/class/uio to create new /dev/uioN devices. For this, it needs write access to /sys/class. The actual /sys/class/uio only exists after the kernel modules are loaded, which can happen during starting of the services in the glusterfs-server container. Therefor it is not possible to bind-mount /sys/class/uio only. In addition to /sys/class/uio, tcmu-runner toggles kernel parameters through writing to /sys/module/target_core_user/parameters/* files. This path is also only available once the target_core_user kernel module is loaded, which can be done during runtime. /sys/module is the only path that is guaranteed to be available when the container starts. See-also: https://bugzilla.redhat.com/1653571 Signed-off-by: Niels de Vos <ndevos@redhat.com>
1 parent 20f39c4 commit 1263c3c

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

deploy/kube-templates/glusterfs-daemonset.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ spec:
5656
mountPath: "/mnt/host-dev"
5757
- name: glusterfs-misc
5858
mountPath: "/var/lib/misc/glusterfsd"
59+
- name: glusterfs-block-sys-class
60+
mountPath: "/sys/class"
61+
- name: glusterfs-block-sys-module
62+
mountPath: "/sys/module"
5963
- name: glusterfs-cgroup
6064
mountPath: "/sys/fs/cgroup"
6165
readOnly: true
@@ -113,6 +117,12 @@ spec:
113117
- name: glusterfs-misc
114118
hostPath:
115119
path: "/var/lib/misc/glusterfsd"
120+
- name: glusterfs-block-sys-class
121+
hostPath:
122+
path: "/sys/class"
123+
- name: glusterfs-block-sys-module
124+
hostPath:
125+
path: "/sys/module"
116126
- name: glusterfs-cgroup
117127
hostPath:
118128
path: "/sys/fs/cgroup"

deploy/ocp-templates/glusterfs-template.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ objects:
6666
mountPath: "${HOST_DEV_DIR}"
6767
- name: glusterfs-misc
6868
mountPath: "/var/lib/misc/glusterfsd"
69+
- name: glusterfs-block-sys-class
70+
mountPath: "/sys/class"
71+
- name: glusterfs-block-sys-module
72+
mountPath: "/sys/module"
6973
- name: glusterfs-cgroup
7074
mountPath: "/sys/fs/cgroup"
7175
readOnly: true
@@ -125,6 +129,12 @@ objects:
125129
- name: glusterfs-misc
126130
hostPath:
127131
path: "/var/lib/misc/glusterfsd"
132+
- name: glusterfs-block-sys-class
133+
hostPath:
134+
path: "/sys/class"
135+
- name: glusterfs-block-sys-module
136+
hostPath:
137+
path: "/sys/module"
128138
- name: glusterfs-cgroup
129139
hostPath:
130140
path: "/sys/fs/cgroup"

0 commit comments

Comments
 (0)