Skip to content

Commit a9cecec

Browse files
authored
Revert "feat: Blacklist DOCA Drive modules on host" (#1140)
Revert "feat: Blacklist DOCA Drive modules on host" This reverts commit ea72766. Following PR depends on [Doca driver PR](Mellanox/doca-driver-build#8)
2 parents 096f5b5 + c88cfdb commit a9cecec

File tree

3 files changed

+10
-53
lines changed

3 files changed

+10
-53
lines changed

manifests/state-ofed-driver/0060_ofed-driver-ds.yaml renamed to manifests/state-ofed-driver/0050_ofed-driver-ds.yaml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,6 @@ spec:
8181
- image: {{ .RuntimeSpec.MOFEDImageName }}
8282
imagePullPolicy: IfNotPresent
8383
name: mofed-container
84-
lifecycle:
85-
postStart:
86-
exec:
87-
command: [ "cp", "/opt/blacklist-ofed-modules.conf", "/host/etc/modprobe.d/" ]
88-
preStop:
89-
exec:
90-
command: [ "rm", "/host/etc/modprobe.d/blacklist-ofed-modules.conf" ]
9184
securityContext:
9285
privileged: true
9386
seLinuxOptions:
@@ -125,9 +118,6 @@ spec:
125118
mountPath: /mnt/drivers-inventory
126119
- name: host-ib-core
127120
mountPath: /etc/modprobe.d/ib_core.conf
128-
- name: modules-blacklist
129-
mountPath: /opt/blacklist-ofed-modules.conf
130-
subPath: blacklist-ofed-modules.conf
131121
{{- if.AdditionalVolumeMounts.VolumeMounts }}
132122
{{- range .AdditionalVolumeMounts.VolumeMounts }}
133123
- name: {{ .Name }}
@@ -255,9 +245,6 @@ spec:
255245
hostPath:
256246
path: /etc/modprobe.d/ib_core.conf
257247
type: FileOrCreate
258-
- name: modules-blacklist
259-
configMap:
260-
name: ofed-modules-blacklist
261248
{{- range .AdditionalVolumeMounts.Volumes }}
262249
- name: {{ .Name }}
263250
{{- if and .ConfigMap .ConfigMap.Items }}

manifests/state-ofed-driver/0050_ofed-modules-blacklist-configmap.yaml

Lines changed: 0 additions & 30 deletions
This file was deleted.

pkg/state/state_ofed_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,8 @@ var _ = Describe("MOFED state test", func() {
307307
catalog.Add(InfoTypeDocaDriverImage, &dummyOfedImageProvider{tagExists: true})
308308
objs, err := ofedState.GetManifestObjects(ctx, cr, catalog, testLogger)
309309
Expect(err).NotTo(HaveOccurred())
310-
// Expect 5 objects: 1 DS per pool, Service Account, Role, RoleBinding, ConfigMap
311-
Expect(len(objs)).To(Equal(6))
310+
// Expect 5 objects: 1 DS per pool, Service Account, Role, RoleBinding
311+
Expect(len(objs)).To(Equal(5))
312312
By("Verify DaemonSets NodeSelector")
313313
for _, obj := range objs {
314314
if obj.GetKind() != "DaemonSet" {
@@ -365,8 +365,8 @@ var _ = Describe("MOFED state test", func() {
365365
catalog.Add(InfoTypeDocaDriverImage, &dummyOfedImageProvider{tagExists: false})
366366
objs, err := ofedState.GetManifestObjects(ctx, cr, catalog, testLogger)
367367
Expect(err).NotTo(HaveOccurred())
368-
// Expect 5 objects: 1 DS per pool, Service Account, Role, RoleBinding, ConfigMap
369-
Expect(len(objs)).To(Equal(5))
368+
// Expect 5 objects: 1 DS per pool, Service Account, Role, RoleBinding
369+
Expect(len(objs)).To(Equal(4))
370370
By("Verify Subscription mounts")
371371
for _, obj := range objs {
372372
if obj.GetKind() != "DaemonSet" {
@@ -470,8 +470,8 @@ var _ = Describe("MOFED state test", func() {
470470
objs, err := ofedState.GetManifestObjects(ctx, cr, catalog, testLogger)
471471
Expect(err).NotTo(HaveOccurred())
472472
// Expect 6 object due to OpenShift: DaemonSet, Service Account, ClusterRole, ClusterRoleBinding
473-
// Role, RoleBinding, ConfigMap
474-
Expect(len(objs)).To(Equal(7))
473+
// Role, RoleBinding
474+
Expect(len(objs)).To(Equal(6))
475475
By("Verify DaemonSet with DTK")
476476
for _, obj := range objs {
477477
if obj.GetKind() != "DaemonSet" {
@@ -539,8 +539,8 @@ var _ = Describe("MOFED state test", func() {
539539
objs, err := ofedState.GetManifestObjects(ctx, cr, catalog, testLogger)
540540
Expect(err).NotTo(HaveOccurred())
541541
By("Verify image is not precompiled format")
542-
// Expect 4 objects: DS , Service Account, Role, RoleBinding, ConfigMap
543-
Expect(len(objs)).To(Equal(5))
542+
// Expect 4 objects: DS , Service Account, Role, RoleBinding
543+
Expect(len(objs)).To(Equal(4))
544544
for _, obj := range objs {
545545
if obj.GetKind() != "DaemonSet" {
546546
continue
@@ -577,8 +577,8 @@ var _ = Describe("MOFED state test", func() {
577577
objs, err := ofedState.GetManifestObjects(ctx, cr, catalog, testLogger)
578578
Expect(err).NotTo(HaveOccurred())
579579
By("Verify image is not precompiled format")
580-
// Expect 4 objects: DS , Service Account, Role, RoleBinding, ConfigMap
581-
Expect(len(objs)).To(Equal(5))
580+
// Expect 4 objects: DS , Service Account, Role, RoleBinding
581+
Expect(len(objs)).To(Equal(4))
582582
for _, obj := range objs {
583583
if obj.GetKind() != "DaemonSet" {
584584
continue

0 commit comments

Comments
 (0)