Bug 1500650 - There is no clusterNetworks config in master config
Summary: There is no clusterNetworks config in master config
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 3.7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.7.0
Assignee: Jacob Tanenbaum
QA Contact: Meng Bo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-11 09:36 UTC by Yan Du
Modified: 2017-11-28 22:16 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-28 22:16:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift openshift-ansible pull 5864 0 'None' 'closed' 'add new clusterNetworks fields to new installs' 2019-11-21 16:45:55 UTC
Red Hat Product Errata RHSA-2017:3188 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-29 02:34:54 UTC

Description Yan Du 2017-10-11 09:36:33 UTC
Description of problem:
There is no clusterNetworks config in master config

Version-Release number of the following components:
openshift v3.7.0-0.147.1
kubernetes v1.7.6+a08f5eeb62

ansible-2.3.2.0-2.el7.noarch.rpm    
openshift-ansible-3.7.0-0.147.1.git.0.add2337.el7.noarch.rpm    


How reproducible:
Always

Steps to Reproduce:
1. Install a OCP env
2. Check the /etc/origin/master/master-config.yaml
3.

Actual results:
[root@ip-172-18-4-189 ~]# grep -A 6 networkConfig: /etc/origin/master/master-config.yaml
networkConfig:
  clusterNetworkCIDR: 10.128.0.0/14
  externalIPNetworkCIDRs:
  - 0.0.0.0/0
  hostSubnetLength: 9
  networkPluginName: redhat/openshift-ovs-multitenant
  serviceNetworkCIDR: 172.30.0.0/16


Expected results:
networkConfig:
  clusterNetworkCIDR: 10.128.0.0/14
  clusterNetworks:
  - cidr: 10.128.0.0/14
    hostSubnetLength: 9
  externalIPNetworkCIDRs:
  - 0.0.0.0/0
  hostSubnetLength: 9
  networkPluginName: redhat/openshift-ovs-multitenant
  serviceNetworkCIDR: 172.30.0.0/16


Additional info:
# oc get clusternetwork -o yaml
apiVersion: v1
items:
- apiVersion: v1
  clusterNetworks:
  - CIDR: 10.128.0.0/14
    hostSubnetLength: 9
  kind: ClusterNetwork
  metadata:
    creationTimestamp: 2017-10-11T03:30:28Z
    name: default
    namespace: ""
    resourceVersion: "553"
    selfLink: /oapi/v1/clusternetworks/default
    uid: 873588c9-ae34-11e7-a10b-0e63724f1f94
  pluginName: redhat/openshift-ovs-multitenant
  serviceNetwork: 172.30.0.0/16
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""

Comment 1 Scott Dodson 2017-10-11 13:31:31 UTC
Assigning to networking for clarification on what needs to be done in config. We also need to consider what we need to do during upgrades. Cluster Lifecycle team can help implement changes but we need to be told exactly what to do.

Comment 2 Weibin Liang 2017-10-11 19:30:19 UTC
no clusterNetworks config information found in v3.5.5.31.34 either, look like this is not a bug.

Log from oc v3.5.5.31.34
[root@ip-172-18-0-99 ~]# oc version
oc v3.5.5.31.34
kubernetes v1.5.2+43a9be4
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://ip-172-18-0-99.ec2.internal:8443
openshift v3.5.5.31.34
kubernetes v1.5.2+43a9be4
[root@ip-172-18-0-99 ~]# grep -A 6 networkConfig: /etc/origin/master/master-config.yaml
networkConfig:
  clusterNetworkCIDR: 10.128.0.0/14
  hostSubnetLength: 9
  networkPluginName: redhat/openshift-ovs-subnet
# serviceNetworkCIDR must match kubernetesMasterConfig.servicesSubnet
  serviceNetworkCIDR: 172.30.0.0/16
  externalIPNetworkCIDRs: 
[root@ip-172-18-0-99 ~]# oc get clusternetwork -o yaml
apiVersion: v1
items:
- apiVersion: v1
  hostsubnetlength: 9
  kind: ClusterNetwork
  metadata:
    creationTimestamp: 2017-10-11T17:54:18Z
    name: default
    namespace: ""
    resourceVersion: "458"
    selfLink: /oapi/v1/clusternetworks/default
    uid: 3416f090-aead-11e7-8382-0eff956f0e82
  network: 10.128.0.0/14
  pluginName: redhat/openshift-ovs-subnet
  serviceNetwork: 172.30.0.0/16
kind: List
metadata: {}
resourceVersion: ""
selfLink: ""
[root@ip-172-18-0-99 ~]#

Comment 3 Meng Bo 2017-10-12 02:11:48 UTC
@Weibin
This is a new feature which will be added in 3.7 release. And the old clusterNetworkCIDR and hostSubnetLength will be deprecated in master config.

Comment 4 Yan Du 2017-10-12 02:20:32 UTC
There is a 3.7 new feature, so 3.5 won't have clusterNetworks in master config. 

And this should be a OCP openshift-ansible bug, since the master config of OCP is generated by openshift ansible:

networkConfig:
  clusterNetworkCIDR: {{ openshift.master.sdn_cluster_network_cidr }}                                                                                                                         
  hostSubnetLength: {{ openshift.master.sdn_host_subnet_length }}
{% if r_openshift_master_use_openshift_sdn or r_openshift_master_use_nuage or r_openshift_master_use_contiv or r_openshift_master_sdn_network_plugin_name == 'cni' %}
  networkPluginName: {{ r_openshift_master_sdn_network_plugin_name_default }}
{% endif %}
# serviceNetworkCIDR must match kubernetesMasterConfig.servicesSubnet
  serviceNetworkCIDR: {{ openshift.common.portal_net }}
  externalIPNetworkCIDRs: {{ openshift_master_external_ip_network_cidrs | default(["0.0.0.0/0"]) | to_padded_yaml(1,2) }}
{% if openshift_master_ingress_ip_network_cidr is defined %}
  ingressIPNetworkCIDR: {{ openshift_master_ingress_ip_network_cidr }}
{% endif %}

Comment 5 Jacob Tanenbaum 2017-10-25 18:08:55 UTC
Posted PR -- https://github.com/openshift/openshift-ansible/pull/5864

Comment 7 Yan Du 2017-11-01 09:02:59 UTC
openshift v3.7.0-0.188.0
kubernetes v1.7.6+a08f5eeb62

clusterNetworks already exist in master-config now.

networkConfig:
  clusterNetworkCIDR: 10.128.0.0/14
  clusterNetworks:
  - cidr: 10.128.0.0/14
    hostSubnetLength: 9
  externalIPNetworkCIDRs:
  - 0.0.0.0/0
  hostSubnetLength: 9
  networkPluginName: redhat/openshift-ovs-subnet
  serviceNetworkCIDR: 172.30.0.0/16

Comment 10 errata-xmlrpc 2017-11-28 22:16:24 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/RHSA-2017:3188


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