Bug 1755908 - [multus] Removing simpleMacvlanConfig from CNO not delete old network-attachment-definition
Summary: [multus] Removing simpleMacvlanConfig from CNO not delete old network-attachm...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.2.z
Assignee: Tomofumi Hayashi
QA Contact: zhaozhanqi
URL:
Whiteboard:
Depends On: 1755586
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-26 12:41 UTC by Ben Bennett
Modified: 2023-09-14 05:43 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1755586
Environment:
Last Closed: 2020-01-29 20:21:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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


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