Bug 2041903 - Neutron Ports assigned to Completed Pods are not reused Edit
Summary: Neutron Ports assigned to Completed Pods are not reused Edit
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.8
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.6.z
Assignee: Maysa Macedo
QA Contact: Itay Matza
URL:
Whiteboard:
Depends On: 2028396
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-18 13:46 UTC by Maysa Macedo
Modified: 2022-02-25 01:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2028396
Environment:
Last Closed: 2022-02-25 01:38:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift kuryr-kubernetes pull 623 0 None open Bug 2041903: Make completed Pods Ports reusable 2022-01-19 10:15:30 UTC
Red Hat Product Errata RHBA-2022:0566 0 None None None 2022-02-25 01:38:46 UTC

Comment 3 Itay Matza 2022-01-31 10:19:50 UTC
Verified in OCP 4.6.0-0.nightly-2022-01-27-155341 with Kury on top of RHOS-16.1-RHEL-8-20211126.n.1.

Verification steps:

## When a pod is in 'Completed' state, the Neutron port assigned to it remains in 'Active' state:
>$ oc get pods -n openshift-kube-apiserver -o wide | grep "NAME\|Completed" | head -n 2
>NAME                                      READY   STATUS      RESTARTS   AGE   IP              NODE                    NOMINATED NODE   READINESS GATES
>installer-2-ostest-ktbrv-master-0         0/1     Completed   0          13h   10.128.74.71    ostest-ktbrv-master-0   <none>           <none>

>$ openstack port list | grep "Name\|10.128.74.71"
>| ID                                   | Name                                                 | MAC Address       | Fixed IP Addresses                                                         | Status |
>| 50112c13-5548-4db3-9b42-4777fd0284ed |                                                      | fa:16:3e:6f:38:b3 | ip_address='10.128.74.71', subnet_id='4808aaad-248f-4409-9f12-b3f7d30de34a'| ACTIVE |


## Ports are reassigned to a new Pod if the namespace and the node are the same as the 'Completed' Pod:
>$ oc get pods -n openshift-kube-apiserver -o wide | grep "NAME\|10.128.74.71"
>NAME                                      READY   STATUS      RESTARTS   AGE   IP              NODE                    NOMINATED NODE   READINESS GATES
>demo-7897db69cc-psrfj                     1/1     Running     0          21s   10.128.74.71    ostest-ktbrv-master-0   <none>           <none>
>installer-2-ostest-ktbrv-master-0         0/1     Completed   0          13h   10.128.74.71    ostest-ktbrv-master-0   <none>           <none>
>revision-pruner-2-ostest-ktbrv-master-0   0/1     Completed   0          13h   10.128.74.71    ostest-ktbrv-master-0   <none>           <none>


## Verify in several different projects/namespaces - deploy new "demo" pods and make sure that ports of 'Completed' Pods are reassigned. Using the following sh:

```
completed_pods_addresses=$(oc get pods -A -o wide | grep Completed | awk '{print $7}' | grep -v "ago")
running_pods_addresses=$(oc get pods -A -o wide | grep Running | awk '{print $7}' | grep -v "ago")
openstack port list > osp_port_list
for completed_address in $completed_pods_addresses
do
        cat osp_port_list | grep $completed_address
        for running_address in $running_pods_addresses
        do
                if [ "$completed_address" == "$running_address" ]
                then
                        echo "Reused port found! The port with the following ip address - ${completed_address}."
                fi
        done
done
```

Comment 6 errata-xmlrpc 2022-02-25 01:38:36 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 (OpenShift Container Platform 4.6.55 bug fix 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/RHBA-2022:0566


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