Bug 1387982

Summary: [networking_public_155] The annotation "pod.network.openshift.io/assign-subnet" is missing after creating hostsubnet with it
Product: OpenShift Container Platform Reporter: Hongan Li <hongli>
Component: NetworkingAssignee: Ben Bennett <bbennett>
Networking sub component: router QA Contact: zhaozhanqi <zzhao>
Status: CLOSED NOTABUG Docs Contact:
Severity: medium    
Priority: unspecified CC: aos-bugs, rchopra
Version: 3.4.0   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-26 13:30:53 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:

Description Hongan Li 2016-10-24 06:17:23 UTC
Description of problem:

Create new hostsubnet for f5-server with annotation pod.network.openshift.io/assign-subnet="true", but the annotation is missing when running oc command: "oc get hostsubnet" and "oc describe hostsubnet"

Version-Release number of selected component (if applicable):
openshift v3.4.0.14
kubernetes v1.4.0+776c994
etcd 3.1.0-alpha.1


How reproducible:
Always

Steps to Reproduce:
1. oc create -f f5hostsubnet.yaml (see additiontal info for file content)
2. oc get hostsubnet f5-server -o yaml
3. oc describe hostsubnet f5-server

Actual results:
Cannot find the annotation with the hostsubnet

[root@ip-172-18-6-71 ~]# oc get hostsubnet 
NAME                           HOST                           HOST IP        SUBNET
f5-server                      f5-server                      10.3.89.213    10.1.3.0/24
ip-172-18-0-149.ec2.internal   ip-172-18-0-149.ec2.internal   172.18.0.149   10.1.1.0/24
ip-172-18-6-71.ec2.internal    ip-172-18-6-71.ec2.internal    172.18.6.71    10.1.0.0/24

[root@ip-172-18-6-71 ~]# oc get hostsubnet f5-server -o yaml
apiVersion: v1
host: f5-server
hostIP: 10.3.89.213
kind: HostSubnet
metadata:
  creationTimestamp: 2016-10-24T05:19:10Z
  name: f5-server
  resourceVersion: "5869"
  selfLink: /oapi/v1/hostsubnets/f5-server
  uid: 64d0291a-99a9-11e6-8df0-0e8b13dd1a22
subnet: 10.1.3.0/24
[root@ip-172-18-6-71 ~]#
[root@ip-172-18-6-71 ~]# oc describe hostsubnet f5-server 
Name:		f5-server
Namespace:	<none>
Created:	About a minute ago
Labels:		<none>
Annotations:	<none>
Node:		f5-server
Node IP:	10.3.89.213
Pod Subnet:	10.1.3.0/24
[root@ip-172-18-6-71 ~]# 


Expected results:
The annotations should be pod.network.openshift.io/assign-subnet="true" instead of <none>

Additional info:

<f5hostsubnet.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-26 13:30:53 UTC
This is an expected result. The annotation is just an initial indication to assign the subnet. Once the subnet is assigned, the annotation is removed on purpose.