Bug 1868294

Summary: NFD operator does not allow customisation of nfd-worker.conf
Product: OpenShift Container Platform Reporter: Andreas Bleischwitz <ableisch>
Component: Node Feature Discovery OperatorAssignee: Carlos Eduardo Arango Gutierrez <carangog>
Status: CLOSED ERRATA QA Contact: Walid A. <wabouham>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.7CC: carangog, sejug, zkosic
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 15:01:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andreas Bleischwitz 2020-08-12 08:58:42 UTC
Description of problem:
Current version of the NFD operator has a static config-map which configures the NFD-worker.
Users are therefore limited to the following worker config:

```
sources:
  pci:
    deviceLabelFields:
      - "vendor"
    deviceClassWhitelist:
      - "0200"
      - "03"
      - "12"
```

User which may require scanning of i.e. Fibre-channel or other dedicated hardware are not able to change this and won't get proper label attached to the nodes.

Version-Release number of selected component (if applicable):

{"level":"info","ts":1597222546.4806738,"logger":"cmd","msg":"Go Version: go1.13.4"}
{"level":"info","ts":1597222546.4808075,"logger":"cmd","msg":"Go OS/Arch: linux/amd64"}
{"level":"info","ts":1597222546.4808278,"logger":"cmd","msg":"Version of operator-sdk: v0.4.0+git"}

registry.redhat.io/openshift4/ose-cluster-nfd-operator@sha256:c34f885bc15d76d45486b1a6fb41990d07896ff5e319905d937d6ccf6affb44c

How reproducible:
Always

Steps to Reproduce:
1. Install NFD operator
2. try to change CM nfd-worker
3.

Actual results:
Changes are reverted to defaults

Expected results:
Changes are stored in CM and reflected in running config of the worker-pods

Additional info:

Comment 2 Zvonko Kosic 2020-08-28 14:41:09 UTC
*** Bug 1873471 has been marked as a duplicate of this bug. ***

Comment 3 Zvonko Kosic 2020-10-20 11:10:31 UTC
*** Bug 1873471 has been marked as a duplicate of this bug. ***

Comment 6 Walid A. 2021-01-06 19:11:14 UTC
Verified on OCP version: 4.7.0-fc.1
We can update the nfd-worker.config from Web Console, at install time, under Installed Operators -> NFD -> NodeFeatureDiscoveries tab, under Operand:  Worker Config, Config Data:

I added the code block:

      sources:
        pci:
          deviceLabelFields:
            - "vendor"
          deviceClassWhitelist:
            - "0200"
            - "03"
            - "12"

And the nfd master server yaml file confirmed that entered code block was preserved.


I also made edits to the NodeFeatureDiscovery nfd-master-server post install, and the edits were also preserved as observed on the nfd-worker pod terminal, under /etc/kubernetes/node-feature-discovery/nfd-worker.conf :
 
sh-4.4$ cd /etc/kubernetes/node-feature-discovery/
sh-4.4$ ls -ltr
total 0
drwxr-xr-x. 2 root root  6 Jan  6 14:13 source.d
drwxr-xr-x. 2 root root  6 Jan  6 14:13 features.d
lrwxrwxrwx. 1 root root 22 Jan  6 15:46 nfd-worker.conf -> ..data/nfd-worker.conf
sh-4.4$ cat nfd-worker.conf 
sources:
  pci:
    deviceLabelFields:
      - "vendor"
      - "test"
    deviceClassWhitelist:
      - "0200"
      - "03"
      - "12"
sh-4.4$ 
sh-4.4$

Comment 8 errata-xmlrpc 2021-02-24 15:01:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 extras and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:5635