Bug 1259737 - Explicitly specify the subnet to be used for a node
Explicitly specify the subnet to be used for a node
Status: ASSIGNED
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation (Show other bugs)
3.0.0
Unspecified Unspecified
high Severity medium
: ---
: ---
Assigned To: Vikram Goyal
Vikram Goyal
Vikram Goyal
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-03 09:05 EDT by Miheer Salunke
Modified: 2017-05-15 23:54 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Miheer Salunke 2015-09-03 09:05:17 EDT
Document URL: 

Section Number and Name: 

Describe the issue: 

How to explicitly specify the subnet to be used for a node such as node1 needs to use 10.1.0.0/24 shall be added to the documentation.

Changing Openshift-sdn subnet" can be interpretted two ways.
We mean, changing the subnet before you install to avoid the default. Changing the subnet in a running environment is probably a little more involved.
The network range is configured by the admin for the SDN and then each Node gets a piece of it.
The admin doesn't assign a subnet for a given Node.
So before installation you need to configure 
OPTIONS='-v=4 -container-network=10.2.0.0/16 -container-subnet-length=8' in /etc/sysconfig/openshift-sdn-master

Refer https://bugzilla.redhat.com/show_bug.cgi?id=1197170#c3 for more details.

However, you can do it if you are using ansible directly.
Set this in the inventory:
osm_cluster_network_cidr=192.168.0.0/16
osm_host_subnet_length=8
(just update the values to what you want)

Upstream issue- https://github.com/openshift/openshift-sdn/issues/30

Code submitted -
https://github.com/openshift/openshift-sdn/pull/38

As mentioned earlier "Changing the subnet in a running environment is probably a little more involved." So we need to document steps for this as well.


Suggestions for improvement: 

Additional information:
Comment 2 Timothy 2015-09-21 22:46:54 EDT
Miheer,

I have questions.

1. Are you saying that changing the subnet in a running environment is beyond the scope of this BZ? ("Changing the subnet in a running environment is probably a little more involved. So we need to document steps for this as well.") If you're indicating that changing the subnet in a running environment needs to be documented, then where can I find information on how to do this?

2. This is to be changed by a cluster admin, right? Not a developer? If this is an admin task, does this have any impact on the developer at all once complete?

3. Is avoiding IP and DNS conflicts when using 10.1.0.0/16 the main reason for wanting to explicitly specify the subnet for a node? 

4. What is the benefit of explicitly specifying the subnet for a node, if not merely avoiding conflicts? Why would a user want to do this? How would they know that they need to do this?

5. So, if I understand correctly, before installation the admin modifies /etc/sysconfig/openshift-sdn-master with the following: 

OPTIONS='-v=4 -container-network=<IP Address>/<subnet> -container-subnet-length=<length>'

For example:

OPTIONS='-v=4 -container-network=10.2.0.0/16 -container-subnet-length=8'


Or,


If doing an ansible install, modify the inventory to include the following:

osm_cluster_network_cidr=<IP Address>/<subnet>
osm_host_subnet_length=<length>

For example:

osm_cluster_network_cidr=192.168.0.0/16
osm_host_subnet_length=8


Is that all correct? Are there any more steps that might need to be explained? Does anything need to be restarted etc. once these modifications take place?

6. Could you please explain the following in more detail? "The network range is configured by the admin for the SDN and then each Node gets a piece of it.
The admin doesn't assign a subnet for a given Node." Does that mean that each node gets a subnet within the defined range?
Comment 3 Miheer Salunke 2015-10-16 05:44:27 EDT
1. Are you saying that changing the subnet in a running environment is beyond the scope of this BZ? ("Changing the subnet in a running environment is probably a little more involved. So we need to document steps for this as well.") If you're indicating that changing the subnet in a running environment needs to be documented, then where can I find information on how to do this?

"Changing the subnet in a running environment is probably a little more involved. So we need to document steps for this as well." By saying this I mean that it involves a lot of things and is complicated to do so and therefore we need a documentation for the same.

You will need to ask regarding this to  "Jason DeTiberus" <jdetiber@redhat.com>

2. This is to be changed by a cluster admin, right? Not a developer? If this is an admin task, does this have any impact on the developer at all once complete?

Yes this is done by the admin

3. Is avoiding IP and DNS conflicts when using 10.1.0.0/16 the main reason for wanting to explicitly specify the subnet for a node? 
   We've had one user who has IP and DNS conflicts when using 10.1.0.0/16 for their cluster so we should allow for configuration of this subnet. This is noted as a TODO but wanted to get an issue in to track it (https://github.com/openshift/openshift-sdn/issues/30) Also another reason may be that some companies may opt for different network range as per their environement.

4. What is the benefit of explicitly specifying the subnet for a node, if not merely avoiding conflicts? Why would a user want to do this? How would they know that they need to do this?

It depends on their networking environment. It helps in flexibility for a company to use a network range of their own choice

5. So, if I understand correctly, before installation the admin modifies /etc/sysconfig/openshift-sdn-master with the following: 

OPTIONS='-v=4 -container-network=<IP Address>/<subnet> -container-subnet-length=<length>'

For example:

OPTIONS='-v=4 -container-network=10.2.0.0/16 -container-subnet-length=8'


Or,


If doing an ansible install, modify the inventory to include the following:

osm_cluster_network_cidr=<IP Address>/<subnet>
osm_host_subnet_length=<length>

For example:

osm_cluster_network_cidr=192.168.0.0/16
osm_host_subnet_length=8


Is that all correct? Are there any more steps that might need to be explained? Does anything need to be restarted etc. once these modifications take place?

Yes looks good

6. Could you please explain the following in more detail? "The network range is configured by the admin for the SDN and then each Node gets a piece of it.
The admin doesn't assign a subnet for a given Node." Does that mean that each node gets a subnet within the defined range?

A range of ip addresses will be selected for a node and the ip addresses will be allocated to the containers from this range


Also please have it reviewed by  "Jason DeTiberus" <jdetiber@redhat.com> as well to confirm things as he is an expert in this.
Comment 4 Miheer Salunke 2015-10-16 05:46:49 EDT
Hi Jason,

It would be really great if you could please review this for the adding this into documentation ?

Thanks and regards,
Miheer Salunke
Comment 7 Scott Dodson 2015-10-21 23:10:56 EDT
I've put together some proposed text for the advanced installer to allow configuring the cluster network and the subnet size.

Until something happens with Bug 1197170 we cannot support changing the network after the fact and I think that's out of scope for this bug.
Comment 8 Scott Dodson 2015-10-21 23:11:29 EDT
Fail, I meant to put a link to the PR here, sorry.

https://github.com/openshift/openshift-docs/pull/1103

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