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

Bug 1755908

Summary: [multus] Removing simpleMacvlanConfig from CNO not delete old network-attachment-definition
Product: OpenShift Container Platform Reporter: Ben Bennett <bbennett>
Component: NetworkingAssignee: Tomofumi Hayashi <tohayash>
Networking sub component: openshift-sdn QA Contact: zhaozhanqi <zzhao>
Status: CLOSED WORKSFORME Docs Contact:
Severity: medium    
Priority: unspecified CC: bbennett, jboxman, tohayash, weliang, zzhao
Version: 4.2.0   
Target Milestone: ---   
Target Release: 4.2.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1755586 Environment:
Last Closed: 2020-01-29 20:21:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1755586    
Bug Blocks:    

Description Ben Bennett 2019-09-26 12:41:43 UTC
+++ This bug was initially created as a clone of Bug #1755586 +++

Description of problem:
Removing simpleMacvlanConfig from CNO not delete old network-attachment-definition

Version-Release number of selected component (if applicable):
4.2.0-0.nightly-2019-09-25-043501

How reproducible:
Always

Steps to Reproduce:
1. using simpleMacvlanConfig to create network-attach-def through CNO 
2. Check  network-attach-def is created
3. Edit CNO to remove simpleMacvlanConfig
4. After 21 minutes, network-attach-def is not deleted

Actual results:
[root@dhcp-41-193 FILE]# oc get networks.operator.openshift.io cluster -o yaml
apiVersion: operator.openshift.io/v1
kind: Network
metadata:
  creationTimestamp: "2019-09-25T14:51:10Z"
  generation: 8
  name: cluster
  resourceVersion: "57016"
  selfLink: /apis/operator.openshift.io/v1/networks/cluster
  uid: e9edd716-dfa3-11e9-adea-028a60c357e8
spec:
  additionalNetworks:
  - name: macvlan-ipam-static
    namespace: test1
    simpleMacvlanConfig:
      ipamConfig:
        staticIPAMConfig:
          addresses:
          - address: 22.2.2.2/24
            gateway: 22.2.2.254
        type: static
      master: ens5
      mode: bridge
    type: SimpleMacvlan
  clusterNetwork:
  - cidr: 10.128.0.0/14
    hostPrefix: 23
  defaultNetwork:
    type: OpenShiftSDN
  serviceNetwork:
  - 172.30.0.0/16
status: {}
[root@dhcp-41-193 FILE]# oc get network-attachment-definition --all-namespaces
NAMESPACE   NAME                  AGE
test1       macvlan-ipam-static   6s
[root@dhcp-41-193 FILE]# oc edit networks.operator.openshift.io cluster
network.operator.openshift.io/cluster edited
[root@dhcp-41-193 FILE]# oc get networks.operator.openshift.io cluster -o yaml
apiVersion: operator.openshift.io/v1
kind: Network
metadata:
  creationTimestamp: "2019-09-25T14:51:10Z"
  generation: 11
  name: cluster
  resourceVersion: "63895"
  selfLink: /apis/operator.openshift.io/v1/networks/cluster
  uid: e9edd716-dfa3-11e9-adea-028a60c357e8
spec:
  clusterNetwork:
  - cidr: 10.128.0.0/14
    hostPrefix: 23
  defaultNetwork:
    type: OpenShiftSDN
  serviceNetwork:
  - 172.30.0.0/16
status: {}
[root@dhcp-41-193 FILE]# oc get network-attachment-definition --all-namespaces
NAMESPACE   NAME                  AGE
test1       macvlan-ipam-static   5m59s
[root@dhcp-41-193 FILE]# oc get network-attachment-definition --all-namespaces
NAMESPACE   NAME                  AGE
test1       macvlan-ipam-static   21m

Expected results:
macvlan-ipam-static should be deleted

Additional info:

--- Additional comment from Casey Callendrello on 2019-09-26 05:51:51 EDT ---

This is a known issue that will be fixed in 4.3 For the mean time, we should just fix this in the docs - you need to delete the resources manually.

Comment 1 Tomofumi Hayashi 2019-11-13 14:05:53 UTC
Parent bz's PR in upstream: https://github.com/openshift/cluster-network-operator/pull/354

Comment 2 Jason Boxman 2020-01-28 23:57:16 UTC
Hi,

Did this fix make it into 4.3.0? The PR referenced in #1 didn't get merged.

Thanks!

Comment 3 Weibin Liang 2020-01-29 20:21:11 UTC
QE can not reproduce this issue in latest v4.3 and v4.4 image

Comment 4 Red Hat Bugzilla 2023-09-14 05:43:49 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days