Bug 1954755 - Multus configuration should allow for net-attach-defs referenced in the openshift-multus namespace
Summary: Multus configuration should allow for net-attach-defs referenced in the opens...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.8
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.8.0
Assignee: Douglas Smith
QA Contact: Weibin Liang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-28 18:00 UTC by Rohan Gupta
Modified: 2021-07-27 23:05 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Allows for network selection annotations to include references to `openshift-multus/$net-attach-def-name` to allow reference across namespaces. Reason: It can sometimes be untenable to have net-attach-defs copied into many namespaces when using net-attach-defs in a large number of namespaces. Result: net-attach-defs can be stored in the openshift-multus namespace and be referred to in networks selections annotations for pods in any arbitrary namespace.
Clone Of:
Environment:
Last Closed: 2021-07-27 23:04:34 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-network-operator pull 956 0 None open Bug 1954755: Multus configuration should allow for net-attach-defs in certain namespaces to be used across namespaces 2021-04-28 18:07:08 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 23:05:00 UTC

Description Rohan Gupta 2021-04-28 18:00:10 UTC
Description of problem:
"*/networks:" annotations should allow referring to the "openshift-multus" namespace.

How reproducible: always.


Steps to Reproduce:
1. Create a net-attach-def in openshift-multus
2. Create a pod in the default namespace with an annotation that refers to */networks: openshift-multus/foo

Actual results: Pod doesn't create, cannot access net-attach-def.

Expected results: Pod created successfully.

Reasoning: It's untenable to have all net-attach-defs as managed by operators living in the default namespace.

Comment 2 zhaozhanqi 2021-05-11 08:12:15 UTC
Verified this bug on 4.8.0-0.nightly-2021-05-10-002052

# oc get net-attach-def -n openshift-multus
NAME               AGE
mlx277-netdevice   25h

cat pod.yaml

apiVersion: v1
kind: Pod
metadata:
  generateName: testpod1
  namespace: z1
  labels:
    env: test
  annotations:
    k8s.v1.cni.cncf.io/networks: openshift-multus/mlx277-netdevice
spec:
  containers:
  - name: test-pod
    image: quay.io/openshifttest/hello-sdn@sha256:d5785550cf77b7932b090fcd1a2625472912fb3189d5973f177a5a2c347a1f95

Create pod with above yaml

Check the pod can be running

# oc get pod -n z1 testpod1thswz -o yaml
apiVersion: v1
kind: Pod
metadata:
  annotations:
    k8s.ovn.org/pod-networks: '{"default":{"ip_addresses":["10.131.0.33/23"],"mac_address":"0a:58:0a:83:00:21","gateway_ips":["10.131.0.1"],"ip_address":"10.131.0.33/23","gateway_ip":"10.131.0.1"}}'
    k8s.v1.cni.cncf.io/network-status: |-
      [{
          "name": "",
          "interface": "eth0",
          "ips": [
              "10.131.0.33"
          ],
          "mac": "0a:58:0a:83:00:21",
          "default": true,
          "dns": {}
      },{
          "name": "openshift-multus/mlx277-netdevice",
          "interface": "net1",
          "ips": [
              "10.56.217.171"
          ],
          "mac": "2e:57:f6:8a:e8:8b",
          "dns": {},
          "device-info": {
              "type": "pci",
              "version": "1.0.0",
              "pci": {
                  "pci-address": "0000:5e:01.7"
              }
          }
      }]
    k8s.v1.cni.cncf.io/networks: openshift-multus/mlx277-netdevice
    k8s.v1.cni.cncf.io/networks-status: |-
      [{
          "name": "",
          "interface": "eth0",
          "ips": [
              "10.131.0.33"
          ],
          "mac": "0a:58:0a:83:00:21",
          "default": true,
          "dns": {}
      },{
          "name": "openshift-multus/mlx277-netdevice",
          "interface": "net1",
          "ips": [
              "10.56.217.171"
          ],
          "mac": "2e:57:f6:8a:e8:8b",
          "dns": {},
          "device-info": {
              "type": "pci",
              "version": "1.0.0",
              "pci": {
                  "pci-address": "0000:5e:01.7"
              }
          }
      }]

Comment 5 errata-xmlrpc 2021-07-27 23:04:34 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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security 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-2021:2438


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