Bug 1576694

Summary: Migrating steps from flanneld to ovs-subnet
Product: OpenShift Container Platform Reporter: Suresh <sgaikwad>
Component: NetworkingAssignee: Ben Bennett <bbennett>
Status: CLOSED NOTABUG QA Contact: Meng Bo <bmeng>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.5.0CC: aos-bugs, bbennett, jawilson, jmalde, schoudha
Target Milestone: ---   
Target Release: 3.5.z   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-14 17:19:15 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 Suresh 2018-05-10 08:03:00 UTC
Description of problem:
We don't have a documentation to migrate the network plugin from flanneld to openshift-sdn.

I have tested this on one of test environment which was installed with flanneld as network plugin and then migrated the cluster to use openshift-sdn from flanneld.

Here are the steps which I have taken to migrate this:

<snip>

//On master:

# systemctl stop flanneld
# systemctl disable flanneld

# vi /etc/origin/master/master-config.yaml

networkConfig:
  clusterNetworkCIDR: 10.138.0.0/14                                                                    ---> Change the network to the range which is not in use 
  hostSubnetLength: 9
# serviceNetworkCIDR must match kubernetesMasterConfig.servicesSubnet
  networkPluginName: redhat/openshift-ovs-subnet                                                       ---> Add this line below hostSubnetLength

# vi /etc/yum.conf 

Remove 'atomic-openshift-sdn-ovs' package name from the exclude line

# yum install atomic-openshift-sdn-ovs

Do the above changes on all the masters and then restart atomic-openshift-master-* services (For single master, atomic-openshift-master service):

# systemctl restart atomic-openshift-master-*


Go to all the nodes (including masters) and modify /etc/origin/node/node-config.yaml file

# vi /etc/origin/node/node-config.yaml 


masterKubeConfig: system:node:master.example.com.kubeconfig
networkPluginName: redhat/openshift-ovs-subnet                                                         ---> Add this line below masterKubeConfig
# networkConfig struct introduced in origin 1.0.6 and OSE 3.0.2 which
# deprecates networkPluginName above. The two should match.
networkConfig:
   mtu: 1450
   networkPluginName: redhat/openshift-ovs-subnet                                                      ---> Add this line below mtu line in networkConfig section

# systemctl restart atomic-openshift-node


//On nodes:

# systemctl stop flanneld
# systemctl disable flanneld


# vi /etc/yum.conf 

Remove 'atomic-openshift-sdn-ovs' package name from the exclude line

# yum install atomic-openshift-sdn-ovs


Go to all the nodes and modify /etc/origin/node/node-config.yaml file

# vi /etc/origin/node/node-config.yaml 


masterKubeConfig: system:node:master.example.com.kubeconfig
networkPluginName: redhat/openshift-ovs-subnet                                                         ---> Add this line below masterKubeConfig
# networkConfig struct introduced in origin 1.0.6 and OSE 3.0.2 which
# deprecates networkPluginName above. The two should match.
networkConfig:
   mtu: 1450
   networkPluginName: redhat/openshift-ovs-subnet                                                      ---> Add this line below mtu line in networkConfig section

# systemctl restart atomic-openshift-node



</snip>

Version-Release number of selected component (if applicable):


[root@master-0 ~]# oc version
oc v3.5.5.31.67
kubernetes v1.5.2+43a9be4
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://openshift.internal.ocp35flannel.quicklab.rdu2.cee.redhat.com:443
openshift v3.5.5.31.67
kubernetes v1.5.2+43a9be4


[root@master-0 ~]# rpm -qa | grep atomic-openshift
atomic-openshift-sdn-ovs-3.5.5.31.67-1.git.0.0a8cf24.el7.x86_64
atomic-openshift-utils-3.5.165-1.git.0.475fa67.el7.noarch
atomic-openshift-excluder-3.5.5.31.67-1.git.0.0a8cf24.el7.noarch
atomic-openshift-master-3.5.5.31.67-1.git.0.0a8cf24.el7.x86_64
atomic-openshift-docker-excluder-3.5.5.31.67-1.git.0.0a8cf24.el7.noarch
atomic-openshift-3.5.5.31.67-1.git.0.0a8cf24.el7.x86_64
atomic-openshift-node-3.5.5.31.67-1.git.0.0a8cf24.el7.x86_64
atomic-openshift-clients-3.5.5.31.67-1.git.0.0a8cf24.el7.x86_64
tuned-profiles-atomic-openshift-node-3.5.5.31.67-1.git.0.0a8cf24.el7.x86_64




Can we verify the steps and confirm if we can migrate the network plugin from flanneld to openshift-sdn

Comment 1 Ben Bennett 2018-05-10 14:43:17 UTC
That looks correct.

Weibin, can you see if we have done any migration testing?  I bet not.

Comment 5 Ben Bennett 2018-05-14 17:19:15 UTC
I believe that the migration steps outlined will work.  But it effectively requires a full cluster restart.  We have not tested this procedure and do not plan to... the expected migration will be from flannel to Kuryr when that is released.