crc-org / osp4

Proof of Concept repository of CodeReady Containers [Archived]
Apache License 2.0
26 stars 16 forks source link

[Virtualbox] When 2 Nic is present then openshift-sdn take a different Nic #17

Open praveenkumar opened 5 years ago

praveenkumar commented 5 years ago

Right now our current Virtualbox POC is require 2 Nic for the VM.

Right now we can't able to make virtualbox POC work by only having single nic. Now both the nic have different IP and our openshift service should communicate using the hostonlyadaptor which is not the case atm and most of the pods are in crashbackloop state.

We need to find if there is any config where we can change those pod IP to different Nic.

$ ssh -i master_private_key -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no" core@192.168.56.4 "sudo ifconfig eth0"
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.56.4  netmask 255.255.255.0  broadcast 192.168.56.255
        inet6 fe80::38ce:b1ff:fe21:9fb2  prefixlen 64  scopeid 0x20<link>
        ether 3a:ce:b1:21:9f:b2  txqueuelen 1000  (Ethernet)
        RX packets 58655  bytes 7113122 (6.7 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 46510  bytes 55771559 (53.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

$ ssh -i master_private_key -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no" core@192.168.56.4 "sudo ifconfig eth1"
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.3.15  netmask 255.255.255.0  broadcast 10.0.3.255
        inet6 fe80::438f:e918:54fa:7dcf  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:de:cb:52  txqueuelen 1000  (Ethernet)
        RX packets 24864  bytes 9119983 (8.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 27395  bytes 2971076 (2.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

$ kubectl get pods --all-namespaces -o wide
NAMESPACE                                                 NAME                                                              READY   STATUS             RESTARTS   AGE   IP            NODE                   NOMINATED NODE
kube-system                                               etcd-member-test1-master-0                                        1/1     Running            1          8d    10.0.3.15     test1-master-0         <none> => IP should be `192.168.56.4`
openshift-apiserver-operator                              openshift-apiserver-operator-77756dfc66-d8dkg                     1/1     Running            0          18m   10.128.0.66   test1-master-0         <none>
openshift-apiserver                                       apiserver-sf68z                                                   1/1     Running            11         8d    10.128.0.51   test1-master-0         <none>
openshift-cluster-api                                     cluster-autoscaler-operator-6855f55d94-29jkx                      1/1     Running            10         8d    10.128.0.63   test1-master-0         <none>
openshift-cluster-api                                     clusterapi-manager-controllers-748cb8d66c-68c8w                   4/4     Running            4          8d    10.128.0.43   test1-master-0         <none>
[...]
openshift-sdn                                             ovs-l6qh5                                                         1/1     Running            1          8d    10.0.3.15     test1-worker-0-vqgct   <none>
openshift-sdn                                             ovs-xfdg6                                                         1/1     Running            1          8d    10.0.3.15     test1-master-0         <none>
openshift-sdn                                             sdn-controller-6svcg                                              1/1     Running            3          8d    10.0.3.15     test1-master-0         <none>
openshift-sdn                                             sdn-nzdgx                                                         1/1     Running            1          8d    10.0.3.15     test1-master-0         <none>
openshift-sdn                                             sdn-vcxz9                                                         1/1     Running            2          8d    10.0.3.15     test1-worker-0-vqgct   <none>