Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1389267

Summary: [networking_public_155] The hostsubnet for f5 cannot be created after deleting and recreating it many times
Product: OpenShift Container Platform Reporter: Hongan Li <hongli>
Component: NetworkingAssignee: Rajat Chopra <rchopra>
Networking sub component: router QA Contact: zhaozhanqi <zzhao>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: aos-bugs, bbennett, bmeng, eparis, tdawson
Version: 3.4.0   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-18 12:47:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hongan Li 2016-10-27 10:18:13 UTC
Description of problem:

the hostsubnet for f5 always getting a new subnet from cluster CIDR when  deleting and recreating it, like 10.1.5.0/24, 10.1.6.0/24, 10.1.7.0/24...

If repeating above steps many times (255 - node_numbers) it will get the last valid subnet: 10.1.255.0/24. Delete it then create it failed.  


Version-Release number of selected component (if applicable):
openshift v3.4.0.16+cc70b72
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0


How reproducible:
Always

Steps to Reproduce:
1. oc create -f f5host.yaml (see additiontal info for file content)
2. oc get hostsubnet
3. oc delete hostsubnet f5-server
4. for i in {1..252}; do oc create -f f5host.yaml ; oc delete hostsubnet f5-server ; done
5. try to create the hostsubnet one more time

Actual results:
Cannot create hostsubnet any more. 

[root@ip-172-18-5-211 ~]# 
[root@ip-172-18-5-211 ~]# oc get  hostsubnet 
NAME                           HOST                           HOST IP        SUBNET
f5-server                      f5-server                      10.3.89.213    10.1.255.0/24
ip-172-18-4-193.ec2.internal   ip-172-18-4-193.ec2.internal   172.18.4.193   10.1.1.0/24
ip-172-18-4-194.ec2.internal   ip-172-18-4-194.ec2.internal   172.18.4.194   10.1.0.0/24
ip-172-18-5-211.ec2.internal   ip-172-18-5-211.ec2.internal   172.18.5.211   10.1.2.0/24
[root@ip-172-18-5-211 ~]# 
[root@ip-172-18-5-211 ~]# oc delete hostsubnet f5-server
hostsubnet "f5-server" deleted
[root@ip-172-18-5-211 ~]# 
[root@ip-172-18-5-211 ~]# oc create -f f5host.yaml 
hostsubnet "f5-server" created
[root@ip-172-18-5-211 ~]# 
[root@ip-172-18-5-211 ~]# oc get  hostsubnet 
NAME                           HOST                           HOST IP        SUBNET
ip-172-18-4-193.ec2.internal   ip-172-18-4-193.ec2.internal   172.18.4.193   10.1.1.0/24
ip-172-18-4-194.ec2.internal   ip-172-18-4-194.ec2.internal   172.18.4.194   10.1.0.0/24
ip-172-18-5-211.ec2.internal   ip-172-18-5-211.ec2.internal   172.18.5.211   10.1.2.0/24
[root@ip-172-18-5-211 ~]# 
[root@ip-172-18-5-211 ~]# oc delete hostsubnet f5-server
Error from server: hostsubnets "f5-server" not found
[root@ip-172-18-5-211 ~]# 


Expected results:
The hostsubnet should be created successfully, the subnet can be reused since the resource has released. 

Additional info:

<f5host.yaml>
apiVersion: v1
host: f5-server
hostIP: 10.3.89.213
kind: HostSubnet
metadata:
  annotations:
    pod.network.openshift.io/assign-subnet: "true"
  name: f5-server

Comment 1 Rajat Chopra 2016-10-31 18:28:53 UTC
Fix coming with: https://github.com/openshift/origin/pull/11628

Comment 3 Troy Dawson 2016-11-04 18:49:00 UTC
This has been merged into ose and is in OSE v3.4.0.22 or newer.

Comment 5 Hongan Li 2016-11-07 10:09:37 UTC
verified in OCP 3.4.0.22 and issue has been fixed.

Comment 8 errata-xmlrpc 2017-01-18 12:47:06 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, 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-2017:0066