Bug 1259737 - Explicitly specify the subnet to be used for a node
Summary: Explicitly specify the subnet to be used for a node
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Vikram Goyal
QA Contact: Vikram Goyal
Vikram Goyal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-03 13:05 UTC by Miheer Salunke
Modified: 2019-12-16 04:55 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-26 12:19:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Miheer Salunke 2015-09-03 13:05:17 UTC
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-22 02:46:54 UTC
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 09:44:27 UTC
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>

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> as well to confirm things as he is an expert in this.

Comment 4 Miheer Salunke 2015-10-16 09:46:49 UTC
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-22 03:10:56 UTC
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-22 03:11:29 UTC
Fail, I meant to put a link to the PR here, sorry.

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

Comment 10 Vikram Goyal 2017-12-26 12:19:55 UTC
Docs were published and updated as per Scott's PR in https://bugzilla.redhat.com/show_bug.cgi?id=1259737#c8. 

Moving this bug to closed.


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