Bug 2034097 - [OVN] After edit EgressIP object, the status is not correct
Summary: [OVN] After edit EgressIP object, the status is not correct
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.10
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.10.0
Assignee: Ben Bennett
QA Contact: Anurag saxena
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-20 06:14 UTC by huirwang
Modified: 2022-03-10 16:35 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-10 16:35:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift ovn-kubernetes pull 917 0 None open Bug 2039099: EgressIP fixes for 4.10 2022-01-19 21:13:07 UTC
Github ovn-org ovn-kubernetes pull 2734 0 None open EgressIP: miscellaneous fixes 2022-01-19 17:24:20 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:35:21 UTC

Description huirwang 2021-12-20 06:14:02 UTC
Description of problem:
[OVN AWS] After edit EgressIP object, the status is not correct

Version-Release number of selected component (if applicable):
4.10.0-0.ci-2021-12-19-184945 

How reproducible:
Always

Steps to Reproduce:
1.Label two nodes as EgressIP nodes.

2.Create one EgressIP object with one EgressIP configured.
oc get egressip -o yaml
apiVersion: v1
items:
- apiVersion: k8s.ovn.org/v1
  kind: EgressIP
  metadata:
    creationTimestamp: "2021-12-20T05:52:31Z"
    generation: 3
    name: egressip-1
    resourceVersion: "106577"
    uid: 7c279c67-f9c1-40e8-9a6e-28e98a52cdd6
  spec:
    egressIPs:
    - 10.0.77.135
    namespaceSelector:
      matchLabels:
        name: test
    podSelector: {}
  status:
    items:
    - egressIP: 10.0.77.135
      node: ip-10-0-77-132.us-east-2.compute.internal
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""

3. Updated EgressIP 10.0.77.135 to another one 10.0.48.215 by "oc edit egressip egressip-1"

4. Check EgressIP object again.

Actual results:
The old EgressIP item was not removed from status, here it showed 2 EgressIPs items.
$ oc get egressip -o yaml
apiVersion: v1
items:
- apiVersion: k8s.ovn.org/v1
  kind: EgressIP
  metadata:
    creationTimestamp: "2021-12-20T05:52:31Z"
    generation: 5
    name: egressip-1
    resourceVersion: "107008"
    uid: 7c279c67-f9c1-40e8-9a6e-28e98a52cdd6
  spec:
    egressIPs:
    - 10.0.48.215
    namespaceSelector:
      matchLabels:
        name: test
    podSelector: {}
  status:
    items:
    - egressIP: 10.0.77.135
      node: ip-10-0-77-132.us-east-2.compute.internal
    - egressIP: 10.0.48.215
      node: ip-10-0-51-53.us-east-2.compute.internal
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""

Expected results:
The old one should be removed from status.


Additional info:

Comment 2 jechen 2022-01-09 01:02:12 UTC
same behavior on GCP.

$ oc get node
NAME                                                        STATUS   ROLES    AGE   VERSION
jechen-0108f-sbh2k-master-0.c.openshift-qe.internal         Ready    master   58m   v1.22.1+6859754
jechen-0108f-sbh2k-master-1.c.openshift-qe.internal         Ready    master   59m   v1.22.1+6859754
jechen-0108f-sbh2k-master-2.c.openshift-qe.internal         Ready    master   59m   v1.22.1+6859754
jechen-0108f-sbh2k-worker-a-bbm2v.c.openshift-qe.internal   Ready    worker   48m   v1.22.1+6859754
jechen-0108f-sbh2k-worker-b-nwtpx.c.openshift-qe.internal   Ready    worker   48m   v1.22.1+6859754

$ oc label node jechen-0108f-sbh2k-worker-a-bbm2v.c.openshift-qe.internal "k8s.ovn.org/egress-assignable"=""

#initially egressIP is set to 10.0.128.111

$ cat config5.yaml 
 apiVersion: k8s.ovn.org/v1
 kind: EgressIP
 metadata:
   name: egressip
 spec:
   egressIPs:
   - 10.0.128.111
   podSelector:
     matchLabels:
       team: blue
   namespaceSelector:
     matchLabels:
       team: red

$ oc create -f ./SDN-1332-test/config5.yaml 
egressip.k8s.ovn.org/egressip created

$ oc get egressip
NAME       EGRESSIPS      ASSIGNED NODE   ASSIGNED EGRESSIPS
egressip   10.0.128.111                   

$ oc get egressip
NAME       EGRESSIPS      ASSIGNED NODE                                               ASSIGNED EGRESSIPS
egressip   10.0.128.111   jechen-0108f-sbh2k-worker-a-bbm2v.c.openshift-qe.internal   10.0.128.111

$ oc get egressip -oyaml
apiVersion: v1
items:
- apiVersion: k8s.ovn.org/v1
  kind: EgressIP
  metadata:
    creationTimestamp: "2022-01-09T00:30:16Z"
    generation: 4
    name: egressip
    resourceVersion: "47832"
    uid: b8dc4110-7f4a-45c1-abdb-17462466d51a
  spec:
    egressIPs:
    - 10.0.128.111
    namespaceSelector:
      matchLabels:
        team: red
    podSelector:
      matchLabels:
        team: blue
  status:
    items:
    - egressIP: 10.0.128.111
      node: jechen-0108f-sbh2k-worker-a-bbm2v.c.openshift-qe.internal
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""


# edit egressIP object to update egressIP to 10.0.128.222, now it shows both old egressIP address and new egressIP address are assigned to the node

$ oc get egressip 
NAME       EGRESSIPS      ASSIGNED NODE                                               ASSIGNED EGRESSIPS
egressip   10.0.128.222   jechen-0108f-sbh2k-worker-a-bbm2v.c.openshift-qe.internal   10.0.128.111

$ oc get egressip -oyaml
apiVersion: v1
items:
- apiVersion: k8s.ovn.org/v1
  kind: EgressIP
  metadata:
    creationTimestamp: "2022-01-09T00:30:16Z"
    generation: 6
    name: egressip
    resourceVersion: "53039"
    uid: b8dc4110-7f4a-45c1-abdb-17462466d51a
  spec:
    egressIPs:
    - 10.0.128.222
    namespaceSelector:
      matchLabels:
        team: red
    podSelector:
      matchLabels:
        team: blue
  status:
    items:
    - egressIP: 10.0.128.111
      node: jechen-0108f-sbh2k-worker-a-bbm2v.c.openshift-qe.internal
    - egressIP: 10.0.128.222
      node: jechen-0108f-sbh2k-worker-a-bbm2v.c.openshift-qe.internal
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""

Comment 9 errata-xmlrpc 2022-03-10 16:35:04 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.10.3 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-2022:0056


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