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: ""
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.
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 ~]#
@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.
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 %}
Posted PR -- https://github.com/openshift/openshift-ansible/pull/5864
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
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