Bug 1879244
| Summary: | Error adding container to network "ipvlan-host-local": "master" field is required | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Weibin Liang <weliang> |
| Component: | Networking | Assignee: | Tomofumi Hayashi <tohayash> |
| Networking sub component: | multus | QA Contact: | Weibin Liang <weliang> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | medium | ||
| Priority: | medium | CC: | bbennett, dosmith, tohayash |
| Version: | 4.6 | Keywords: | UpcomingSprint |
| Target Milestone: | --- | ||
| Target Release: | 4.7.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | No Doc Update | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-02-24 15:18:03 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
2020-09-15 18:33:20 UTC
Upstream PR merged, have downstream PR pending. Test still failed, seems like fixed PR merged 8 days ago but still not in the nightly image. Test still failed in 4.6.0-0.nightly-2020-10-27-011248 and get same errors: Warning FailedCreatePodSandBox 1s kubelet, ip-10-0-155-175.us-east-2.compute.internal Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create pod network sandbox k8s_pod-ipvlan-host-local1_test_9441be2b-2f4b-47a4-8c39-10f681722bca_0(ac5019971ce3414b7f24269276e66cf3220f076c316cf3b14eac374f3eac2800): [test/pod-ipvlan-host-local1:ipvlan-host-local]: error adding container to network "ipvlan-host-local": "master" field is required. It specifies the host interface name to virtualize Still pending a replication by me to see why it didn't show up. Looks like this is indeed now in the 4.7 images...
Here's what I did to take a look:
Created this net-attach-def (note that it uses ipvlan and does not specify a master field):
```
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: ipvlan-conf
spec:
config: '{
"cniVersion": "0.3.0",
"type": "ipvlan",
"ipam": {
"type": "host-local",
"subnet": "192.168.1.0/24",
"rangeStart": "192.168.1.200",
"rangeEnd": "192.168.1.216",
"routes": [
{ "dst": "0.0.0.0/0" }
],
"gateway": "192.168.1.1"
}
}'
```
And then a pod like so:
```
apiVersion: v1
kind: Pod
metadata:
name: samplepod
annotations:
k8s.v1.cni.cncf.io/networks: ipvlan-conf
spec:
containers:
- name: samplepod
command: ["/bin/ash", "-c", "trap : TERM INT; sleep infinity & wait"]
image: alpine
```
Verified in 4.7.0-0.nightly-2020-12-20-055006 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 security, bug fix, and enhancement 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:5633 |