Bug 1889744

Summary: The sctp validation phase fails if there is at least one machine config configured with no raw config (i.e. machine configs containing only kernel arguments)
Product: OpenShift Container Platform Reporter: OpenShift BugZilla Robot <openshift-bugzilla-robot>
Component: CNF Platform ValidationAssignee: Federico Paolinelli <fpaoline>
Status: CLOSED ERRATA QA Contact: Nikita <nkononov>
Severity: high Docs Contact:
Priority: high    
Version: 4.6CC: aos-bugs, fpaoline
Target Milestone: ---   
Target Release: 4.6.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-17 06:55:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1889275    
Bug Blocks:    

Description OpenShift BugZilla Robot 2020-10-20 13:45:08 UTC
+++ This bug was initially created as a clone of Bug #1889275 +++

Description of problem:
-----------------------
Running cnf tests fails during sctp validation:

Running Suite: CNF Features e2e validation
==========================================
Random Seed: 1603097335
Will run 2 of 17 specs

SSSSSSSSSSS
------------------------------
validation sctp
  should have a sctp enable machine config
  /go/src/github.com/openshift-kni/cnf-features-deploy/validationsuite/cluster/validation.go:211

• Failure [0.075 seconds]
validation
/go/src/github.com/openshift-kni/cnf-features-deploy/validationsuite/cluster/validation.go:39
  sctp
  /go/src/github.com/openshift-kni/cnf-features-deploy/validationsuite/cluster/validation.go:171
    should have a sctp enable machine config [It]
    /go/src/github.com/openshift-kni/cnf-features-deploy/validationsuite/cluster/validation.go:211

    Unexpected error:
        <*json.SyntaxError | 0xc000338600>: {
            msg: "unexpected end of JSON input",
            Offset: 0,
        }
        unexpected end of JSON input
    occurred

    /go/src/github.com/openshift-kni/cnf-features-deploy/validationsuite/cluster/validation.go:176

------------------------------
validation sctp
  should have the sctp enable machine config as part of the CNF machine config pool
  /go/src/github.com/openshift-kni/cnf-features-deploy/validationsuite/cluster/validation.go:219

• Failure [0.076 seconds]
validation
/go/src/github.com/openshift-kni/cnf-features-deploy/validationsuite/cluster/validation.go:39
  sctp
  /go/src/github.com/openshift-kni/cnf-features-deploy/validationsuite/cluster/validation.go:171
    should have the sctp enable machine config as part of the CNF machine config pool [It]
    /go/src/github.com/openshift-kni/cnf-features-deploy/validationsuite/cluster/validation.go:219

    Unexpected error:
        <*json.SyntaxError | 0xc000379ca0>: {
            msg: "unexpected end of JSON input",
            Offset: 0,
        }
        unexpected end of JSON input
    occurred

    /go/src/github.com/openshift-kni/cnf-features-deploy/validationsuite/cluster/validation.go:176
------------------------------
SSSS
JUnit report was created: /junit/validation_junit.xml


Summarizing 2 Failures:

[Fail] validation sctp [It] should have a sctp enable machine config
/go/src/github.com/openshift-kni/cnf-features-deploy/validationsuite/cluster/validation.go:176

[Fail] validation sctp [It] should have the sctp enable machine config as part of the CNF machine config pool
/go/src/github.com/openshift-kni/cnf-features-deploy/validationsuite/cluster/validation.go:176

Ran 2 of 17 Specs in 0.151 seconds
FAIL! -- 0 Passed | 2 Failed | 0 Pending | 15 Skipped
--- FAIL: TestTest (0.15s)
FAIL

Version-Release number of selected component (if applicable):
-------------------------------------------------------------
4.6.0-0.nightly-2020-10-08-210814
cnf-tests sha( /usr/local/etc/cnf/cnftests-sha.txt) e7ba3cb2d32cbb8d2c8b13a1283257659a36c951


How reproducible:
-----------------
100%

Steps to Reproduce:
-------------------
1. Run containerised tests against existing 4.6 clusters for sctp feature
podman run --name yp-cnf-container-tests \
  -v /home/yp-cnf-tests/:/kubeconfig:Z \
  -v /home/yp-cnf-tests/junit:/junit:Z \
  -v /home/yp-cnf-tests/report:/report:Z \
  -e KUBECONFIG=/kubeconfig/kubeconfig \ 
  -e IMAGE_REGISTRY=registry.my.example.com:5000 \
  quay.io/openshift-kni/cnf-tests:4.6 /usr/bin/test-run.sh  \
  --junit /junit -ginkgo.v -ginkgo.focus="sctp"


Actual results:
---------------
Validation failed


Expected results:
-----------------
Validation passes and tests are executed

--- Additional comment from fpaoline on 2020-10-19 08:56:17 UTC ---

The offending MC is 

apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"machineconfiguration.openshift.io/v1","kind":"MachineConfig","metadata":{"annotations":{},"labels":{"machineconfiguration.openshift.io/role":"worker-lb"},"name":"99-worker-lb-disable-smt"},"spec":{"kernelArguments":["nosmt"]}}
  creationTimestamp: "2020-10-12T07:50:13Z"
  generation: 1
  labels:
    machineconfiguration.openshift.io/role: worker-lb
  managedFields:
  - apiVersion: machineconfiguration.openshift.io/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .: {}
          f:kubectl.kubernetes.io/last-applied-configuration: {}
        f:labels:
          .: {}
          f:machineconfiguration.openshift.io/role: {}
      f:spec:
        .: {}
        f:kernelArguments: {}
    manager: kubectl-client-side-apply
    operation: Update
    time: "2020-10-12T07:50:13Z"
  name: 99-worker-lb-disable-smt
  resourceVersion: "1390127"
  selfLink: /apis/machineconfiguration.openshift.io/v1/machineconfigs/99-worker-lb-disable-smt
  uid: 93e2faa6-64b1-468f-8b81-a2b51ceb0cbb
spec:
  kernelArguments:
  - nosmt

This happens if the cluster has (at least) one machine config with no config section.

Comment 1 Federico Paolinelli 2020-10-21 11:22:50 UTC
*** Bug 1889276 has been marked as a duplicate of this bug. ***

Comment 5 Nikita 2020-11-12 08:08:02 UTC
Bug fixed. 
Verified on following environment:
OCP - 4.6.2
openshift4-cnf-tests:v4.6.0-28

Comment 8 errata-xmlrpc 2020-12-17 06:55:56 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 (OpenShift Container Platform 4.6.8 low-latency extras 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/RHBA-2020:5187