Bug 1743496 - Multus admission controller rejects NetworkAttachmentDefinitions with an empty config
Summary: Multus admission controller rejects NetworkAttachmentDefinitions with an empt...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.2.0
Assignee: Douglas Smith
QA Contact: zhaozhanqi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-20 06:57 UTC by Marko Luksa
Modified: 2019-10-16 06:37 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-16 06:36:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift multus-admission-controller pull 10 0 None closed Bug 1743496: Allows empty spec.config 2020-09-08 20:02:48 UTC
Red Hat Product Errata RHBA-2019:2922 0 None None None 2019-10-16 06:37:22 UTC

Description Marko Luksa 2019-08-20 06:57:48 UTC
Description of problem:
A NetworkAttachmentDefinition without an empty spec.config can no longer be created.

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

How reproducible:
Always

Steps to Reproduce:
1. Create the following NetworkAttachmentDefinition

apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
  name: my-nad
  namespace: myns

Actual results:
The API server rejects the creation with the following message: admission webhook "multus-validating-config.k8s.io" denied the request: network config is empty

Expected results:
Creating a NetworkAttachmentDefinition should still be possible, as it was in 4.1

Additional info:
Multus allows creating an empty NetworkAttachmentDefinition. It then reads the config from a file with the same name as the net-attach-def (on the node's filesystem). This feature is still supported, but the admission controller erroneously doesn't allow it. 

OpenShift Service Mesh currently relies on this feature.

Comment 1 Marko Luksa 2019-08-20 07:04:14 UTC
Ah, I mistyped the description. It should be:

A NetworkAttachmentDefinition _with_ an empty spec.config can no longer be created

Comment 3 Douglas Smith 2019-08-21 15:08:13 UTC
We have a downstream PR available for this one: https://github.com/openshift/multus-admission-controller/pull/10

Comment 5 Weibin Liang 2019-08-22 13:52:37 UTC
Tested and verified in 4.2.0-0.nightly-2019-08-22-073746

[root@dhcp-41-193 Multus]# cat test.yaml 
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
  name: my-nad
  namespace: one-multus-interface 
[root@dhcp-41-193 Multus]# oc create -f test.yaml
networkattachmentdefinition.k8s.cni.cncf.io/my-nad created
[root@dhcp-41-193 Multus]# oc get network-attachment-definition
NAME           AGE
macvlan-conf   6m40s
my-nad         8s
[root@dhcp-41-193 Multus]# oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.2.0-0.nightly-2019-08-22-073746   True        False         41m     Cluster version is 4.2.0-0.nightly-2019-08-22-073746
[root@dhcp-41-193 Multus]#

Comment 6 errata-xmlrpc 2019-10-16 06:36:35 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-2019:2922


Note You need to log in before you can comment on or make changes to this bug.