Bug 1837638

Summary: Multus admission controller not detecting syntax issues in pod and net-attach-def CRDs
Product: OpenShift Container Platform Reporter: Douglas Smith <dosmith>
Component: NetworkingAssignee: Douglas Smith <dosmith>
Networking sub component: multus QA Contact: Weibin Liang <weliang>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: aconstan, anusaxen, bbennett, dosmith, scuppett, weliang, zzhao
Version: 4.4   
Target Milestone: ---   
Target Release: 4.4.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: SDN-CI-IMPACT,SDN-BP,SDN-STALE
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1782301 Environment:
Last Closed: 2020-06-02 11:18:33 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: 1758702    
Bug Blocks: 1782301    

Comment 1 Douglas Smith 2020-05-19 18:08:36 UTC
Setting to ON_QA. I believe this should be fixed in 4.4

Comment 2 Weibin Liang 2020-05-20 20:50:44 UTC
Tested and verified in 4.4.0-0.nightly-2020-05-18-164758

[weliang@weliang FILE]$ oc get net-attach-def -o yaml
apiVersion: v1
items:
- apiVersion: k8s.cni.cncf.io/v1
  kind: NetworkAttachmentDefinition
  metadata:
    creationTimestamp: "2020-05-20T20:48:58Z"
    generation: 1
    name: macvlan-bridge
    namespace: test
    resourceVersion: "23440"
    selfLink: /apis/k8s.cni.cncf.io/v1/namespaces/test/network-attachment-definitions/macvlan-bridge
    uid: 7e4114c9-9162-42be-9e47-16f07b501e87
  spec:
    config: '{ "cniVersion": "0.3.0", "type": "macvlan", "master": "eth0", "mode":
      "bridge", "ipam": { "type": "dhcp" } }'
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""
[weliang@weliang FILE]$ oc patch networkattachmentdefinition.k8s.cni.cncf.io macvlan-bridge -p '{"spec":{"config":" " }}' --type=merge
Error from server: admission webhook "multus-validating-config.k8s.io" denied the request: configuration string is not in JSON format

[weliang@weliang FILE]$ oc patch networkattachmentdefinition.k8s.cni.cncf.io macvlan-bridge -p '{"spec":{"config":"{"cniVersion": "0.3.0", "type": "cvlan", "master": "eth", "mode": "bridge", "ipam": { "type": "dhcp" }}"}}' --type=merge
Error from server: Invalid JSON Patch
[weliang@weliang FILE]$

Comment 5 errata-xmlrpc 2020-06-02 11:18:33 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, 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:2310