Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1750323

Summary: [sriov] network-attachment-definitions should be sync by sriov operator when it was deleted
Product: OpenShift Container Platform Reporter: zhaozhanqi <zzhao>
Component: NetworkingAssignee: Peng Liu <pliu>
Networking sub component: openshift-sdn QA Contact: zhaozhanqi <zzhao>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: high CC: bbennett
Version: 4.2.0   
Target Milestone: ---   
Target Release: 4.2.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-16 06:40:50 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 zhaozhanqi 2019-09-09 10:26:29 UTC
Description of problem:
When the NAD is deleted. The sriov operator did not sync the sriovnetwork to NAD

Version-Release number of selected component (if applicable):
quay.io/openshift-release-dev/ocp-v4.0-art-dev:v4.2.0-201909081401-ose-sriov-network-operator

How reproducible:
alwasy

Steps to Reproduce:
1. Install sriov operator 
2. Create the sriovnetwork CR
 
 apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetwork
metadata:
  creationTimestamp: "2019-08-27T09:30:26Z"
  generation: 3
  name: example-sriovnetwork
  namespace: sriov-network-operator
  resourceVersion: "9958438"
  selfLink: /apis/sriovnetwork.openshift.io/v1/namespaces/sriov-network-operator/sriovnetworks/example-sriovnetwork
  uid: 4d610e2c-c8ad-11e9-9801-3cfdfeba0aa4
spec:
  ipam: |
    {
      "type": "host-local",
      "subnet": "10.56.217.0/24",
      "rangeStart": "10.56.217.172",
      "rangeEnd": "10.56.217.181",
      "routes": [{
        "dst": "0.0.0.0/0"
      }],
      "gateway": "10.56.217.1"
    }
  networkNamespace: z1
  resourceName: intelnics1
  spoofChk: true
  trust: false
  vlan: 1

3. Check the NAD will be created by sriovoperator

oc get network-attachment-definitions.k8s.cni.cncf.io example-sriovnetwork -n z1
NAME                   AGE
example-sriovnetwork   26m

4. Delete the NAD 
 oc delete network-attachment-definitions.k8s.cni.cncf.io example-sriovnetwork -n z1

5. Check the NAD again
6. Check the sriov operator logs

Actual results:

5. wait a while. Check the NAD do not be created
6. Did not see any sync logs for NAD

Expected results:
The deleted NAD should be restored by sriov operator

Additional info:

Comment 3 zhaozhanqi 2019-09-11 04:41:20 UTC
@Peng Liu ok, Thanks the information.

Comment 4 zhaozhanqi 2019-09-11 08:43:18 UTC
Verified this bug on quay.io/openshift-release-dev/ocp-v4.0-art-dev:v4.2.0-201909110219-ose-sriov-network-operator

Comment 5 errata-xmlrpc 2019-10-16 06:40:50 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