Bug 1848379 - Recreating recently deleted NodePort service results in 'port is already allocated' error
Summary: Recreating recently deleted NodePort service results in 'port is already allo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: kube-apiserver
Version: 4.6
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: 4.6.0
Assignee: Stefan Schimanski
QA Contact: Ke Wang
URL:
Whiteboard:
Depends On:
Blocks: 1753649 1849321 1849324
TreeView+ depends on / blocked
 
Reported: 2020-06-18 09:24 UTC by Stefan Schimanski
Modified: 2020-10-27 16:08 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1753649
Environment:
Last Closed: 2020-10-27 16:08:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift origin pull 25150 0 None closed Bug 1848379: UPSTREAM: 89937: portAllocator sync local data before allocate 2020-11-30 11:07:07 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:08:39 UTC

Comment 3 Ke Wang 2020-07-01 03:58:31 UTC
Verified with OCP 4.6.0-0.nightly-2020-06-30-020342, verification steps see below,

$ cat 1848379-nodeport.yaml
apiVersion: v1
kind: Service
metadata:
  labels:
    app: nodeport-admin
  name: nodeport-test
spec:
  type: NodePort
  externalTrafficPolicy: Cluster
  ports:
  - name: 8080-tcp
    port: 8080
    protocol: TCP
    nodePort: 30006
  selector:
    deploymentconfig: nodeport-app

$ cat 1848379-test.sh
#!/usr/bin/env bash
date
oc delete svc nodeport-test
#while [ -n "$(oc create -f nodeport.yml 2>&1 > /dev/null)" ]; do
while ! oc create -f 1848379-nodeport.yaml; do
  date
done

$ oc apply -f 1848379-nodeport.yaml

Run 100 times,
$ for i in {1..100}; do echo "test $i ..." >> test.log;./1848379-test.sh >> test.log;done

$ grep -i invalid test.log
Nothing found.

We got the expected results, move the bug verified.

Comment 5 errata-xmlrpc 2020-10-27 16:08:03 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 GA Images), 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-2020:4196


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