Bug 1769435
| Summary: | [Multus] multus-admission-controller is being too strict about requiring the "type" field | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Weibin Liang <weliang> |
| Component: | Networking | Assignee: | Douglas Smith <dosmith> |
| Networking sub component: | openshift-sdn | QA Contact: | Weibin Liang <weliang> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | high | ||
| Priority: | unspecified | CC: | dosmith, tohayash |
| Version: | 4.3.0 | ||
| Target Milestone: | --- | ||
| Target Release: | 4.3.0 | ||
| 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-01-23 11:11:16 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
Weibin Liang
2019-11-06 15:58:32 UTC
Reproduced the issue in upstream.
----
I1107 04:00:11.552960 1 webhook.go:69] validating network config spec: { "cniVersion": "0.3.1", "plugins": [{ "type": "macvlan", "capabilities": { "ips": true }, "master": "ens5", "mode": "bridge", "ipam": { "type": "static" } }, { "type": "tuning", "capabilities": { "mac": true } }] }
I1107 04:00:11.552997 1 webhook.go:80] spec is not a valid network config list: error parsing configuration list: no name - trying to parse into standalone config
I1107 04:00:11.553038 1 webhook.go:83] spec is not a valid network config: { "cniVersion": "0.3.1", "plugins": [{ "type": "macvlan", "capabilities": { "ips": true }, "master": "ens5", "mode": "bridge", "ipam": { "type": "static" } }, { "type": "tuning", "capabilities": { "mac": true } }] }
I1107 04:00:32.288995 1 webhook.go:69] validating network config spec: { "cniVersion": "0.3.1", "plugins": [{ "type": "macvlan", "capabilities": { "ips": true }, "master": "ens5", "mode": "bridge", "ipam": { "type": "static" } }, { "type": "tuning", "capabilities": { "mac": true } }] }
I1107 04:00:32.289047 1 webhook.go:80] spec is not a valid network config list: error parsing configuration list: no name - trying to parse into standalone config
I1107 04:00:32.289067 1 webhook.go:83] spec is not a valid network config: { "cniVersion": "0.3.1", "plugins": [{ "type": "macvlan", "capabilities": { "ips": true }, "master": "ens5", "mode": "bridge", "ipam": { "type": "static" } }, { "type": "tuning", "capabilities": { "mac": true } }] }
----
From above message, admission controller trying to parse it conflist but failed due to missing 'name' field.
With ' "name": "foobar",', admission controller pass to parse it. This can be a workaround.
----
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: runtimeconfig-def
spec:
config: '{
"cniVersion": "0.3.1",
"name": "foobar",
"plugins": [{
"type": "macvlan",
"capabilities": { "ips": true },
"master": "ens5",
"mode": "bridge",
"ipam": {
"type": "static"
}
}, {
"type": "tuning",
"capabilities": { "mac": true }
}]
}'
---
So need to fix it as following:
- adding syntax check for name in conflist
- revisit the condition to fallback to config from conflist
Working on fix...
Tested and verified on 4.3.0-0.nightly-2019-11-18-062034 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:0062 |