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

Bug 1684659

Summary: hostsubnetlength and hostPrefix are mixed shown in different oc get commands
Product: OpenShift Container Platform Reporter: Weibin Liang <weliang>
Component: NetworkingAssignee: Ricardo Carrillo Cruz <ricarril>
Status: CLOSED WONTFIX QA Contact: Meng Bo <bmeng>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: aos-bugs, cdc, ricarril
Target Milestone: ---   
Target Release: 4.2.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-18 15:34:32 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 Weibin Liang 2019-03-01 19:22:55 UTC
Description of problem:
hostsubnetlength and hostPrefix are mixed shown in different oc get commands. Better to consistent use hostPrefix in all oc get commands.

Version-Release number of selected component (if applicable):
v4.0.0-0.177.0

How reproducible:
Always

Steps to Reproduce:
1. Install v4.0 AWS cluster
2. hostsubnetlength shown after oc get clusternetwork default -o yaml
3. hostPrefix show after oc get network cluster -o yaml
4. hostPrefix show after oc get networkconfig cluster -o yaml

Actual results:
hostsubnetlength shown after oc get clusternetwork default -o yaml

Expected results:
hostPrefix show after oc get clusternetwork default -o yaml

Additional info:
[root@dhcp-41-193 openshift-client]# oc get clusternetwork default -o yaml
apiVersion: network.openshift.io/v1
clusterNetworks:
- CIDR: 10.128.0.0/14
  hostSubnetLength: 9
hostsubnetlength: 9
kind: ClusterNetwork
metadata:
  creationTimestamp: 2019-03-01T18:14:13Z
  generation: 1
  name: default
  resourceVersion: "813"
  selfLink: /apis/network.openshift.io/v1/clusternetworks/default
  uid: d183b692-3c4d-11e9-9185-02b2eb0ca44c
network: 10.128.0.0/14
pluginName: redhat/openshift-ovs-networkpolicy
serviceNetwork: 172.30.0.0/16
vxlanPort: 4789
[root@dhcp-41-193 openshift-client]# oc get network cluster -o yaml
apiVersion: config.openshift.io/v1
kind: Network
metadata:
  creationTimestamp: 2019-03-01T18:13:16Z
  generation: 1
  name: cluster
  resourceVersion: "740"
  selfLink: /apis/config.openshift.io/v1/networks/cluster
  uid: af9cd7c2-3c4d-11e9-9185-02b2eb0ca44c
spec:
  clusterNetwork:
  - cidr: 10.128.0.0/14
    hostPrefix: 23
  networkType: OpenShiftSDN
  serviceNetwork:
  - 172.30.0.0/16
status:
  clusterNetwork:
  - cidr: 10.128.0.0/14
    hostPrefix: 23
  clusterNetworkMTU: 1452
  networkType: OpenShiftSDN
  serviceNetwork:
  - 172.30.0.0/16
[root@dhcp-41-193 openshift-client]# oc get networkconfig cluster -o yaml
apiVersion: networkoperator.openshift.io/v1
kind: NetworkConfig
metadata:
  creationTimestamp: 2019-03-01T18:13:16Z
  generation: 1
  name: cluster
  resourceVersion: "514"
  selfLink: /apis/networkoperator.openshift.io/v1/networkconfigs/cluster
  uid: afbaa69e-3c4d-11e9-9185-02b2eb0ca44c
spec:
  clusterNetwork:
  - cidr: 10.128.0.0/14
    hostPrefix: 23
  defaultNetwork:
    openshiftSDNConfig:
      mode: NetworkPolicy
      mtu: 1452
      useExternalOpenvswitch: false
      vxlanPort: 4789
    type: OpenShiftSDN
  serviceNetwork:
  - 172.30.0.0/16
status: {}

Comment 1 Casey Callendrello 2019-03-04 11:16:54 UTC
You're right, but that's not something we can fix right now; the old objects (hostsubnet) have always used hostsubnetlength - hostprefix is new for 4.0. It would be nice to rename that field, but it's not critical.