Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 2005357: [4.8z] Fixes misuse of pod annotations during update event #753

Merged
merged 1 commit into from Sep 22, 2021

Commits on Sep 17, 2021

  1. Fixes misuse of pod annotations during update event

    In the update pod logic, we pass the current pod event to
    addLogicalPort. In addLogicalPort we assume that if the annotations
    exist for the pod mac/ifaddr, then we use those and do not update
    annotations on the pod. This assumption is invalid, because this event
    may not be the current state of the pod. In other words we could have a
    situation where:
    
    1. A pod add event comes we annotate with 10.0.0.2, assume OVN execute
       failure
    2. Before the annotate is done, the pod is modified in some other way
       signaling another pod update event
    3. A pod update event comes for 2, the pod is annotated with 10.0.0.3
       because this was an update to the original pod, before it was
       annotated with 10.0.0.2, assume OVN execute failure
    4. A pod update event comes for 1, since annotations existed, nothing is
       annotated and 10.0.0.2 is found to be used. OVN logical port is
       configured with 10.0.0.2. addLogicalPort succeeds.
    5. Now the pod has 10.0.0.3 annotated, and 10.0.0.2 in OVN. CNI openflow
       check will fail and the pod will never come up.
    
    Signed-off-by: Tim Rozet <trozet@redhat.com>
    trozet committed Sep 17, 2021
    Copy the full SHA
    20ded50 View commit details
    Browse the repository at this point in the history