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
Fix coming with: https://github.com/openshift/origin/pull/11628
This has been merged into ose and is in OSE v3.4.0.22 or newer.
verified in OCP 3.4.0.22 and issue has been fixed.
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