Bug 1849322 - Recreating recently deleted NodePort service results in 'port is already allocated' error
Summary: Recreating recently deleted NodePort service results in 'port is already allo...
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: kube-apiserver
Version: 4.6
Hardware: All
OS: Linux
Target Milestone: ---
: 4.4.z
Assignee: Stefan Schimanski
QA Contact: Xingxing Xia
Depends On: 1849321
Blocks: 1849323
TreeView+ depends on / blocked
Reported: 2020-06-20 16:33 UTC by OpenShift BugZilla Robot
Modified: 2020-09-22 06:59 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-09-22 06:58:40 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Github openshift origin pull 25175 None open [release-4.4] Bug 1849322: UPSTREAM: 89937: portAllocator sync local data before allocate 2020-09-11 15:26:32 UTC
Red Hat Product Errata RHBA-2020:3715 None None None 2020-09-22 06:59:00 UTC

Comment 2 Michal Fojtik 2020-08-24 13:10:52 UTC
This bug hasn't had any activity in the last 30 days. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're marking this bug as "LifecycleStale" and decreasing the severity/priority. If you have further information on the current state of the bug, please update it, otherwise this bug can be closed in about 7 days. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

Comment 3 Michal Fojtik 2020-08-31 13:59:41 UTC
This bug hasn't had any activity 7 days after it was marked as LifecycleStale, so we are closing this bug as WONTFIX. If you consider this bug still valuable, please reopen it or create new bug.

Comment 4 Michal Fojtik 2020-08-31 15:00:29 UTC
The LifecycleStale keyword was removed because the bug got commented on recently.
The bug assignee was notified.

Comment 5 Stefan Schimanski 2020-09-11 15:27:33 UTC
PR is up, has to get green in CI. Adding UpcomingSprint while watching.

Comment 7 Ke Wang 2020-09-14 08:57:30 UTC
Verification steps see below,

oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.4.0-0.nightly-2020-09-13-231918   True        False         79m     Cluster version is 4.4.0-0.nightly-2020-09-13-231918

$ cat 1849322-nodeport.yaml
apiVersion: v1
kind: Service
    app: nodeport-admin
  name: nodeport-test
  type: NodePort
  externalTrafficPolicy: Cluster
  - name: 8080-tcp
    port: 8080
    protocol: TCP
    nodePort: 30006
    deploymentconfig: nodeport-app

$ cat 1849322-test.sh
#!/usr/bin/env bash
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

$ oc apply -f 1849322-nodeport.yaml

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

$ grep -i invalid test.log
Nothing found.

We got the expected results, move the bug verified.

Comment 10 errata-xmlrpc 2020-09-22 06:58:40 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.4.23 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.


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