Tungsten Fabric入门宝典丨关于集群更新的那些事(下)



  • old-controller: 172.31.19.25
    new-controller: 172.31.13.9
    two-vRouters: 172.31.25.102, 172.31.33.175
    
    开始issu之前:
    [root@ip-172-31-13-9 ~]# ./contrail-introspect-cli/ist.py --host 172.31.19.25 ctr nei
    Introspect Host: 172.31.19.25
    +------------------------+---------------+----------+----------+-----------+-------------+------------+------------+-----------+
    | peer                   | peer_address  | peer_asn | encoding | peer_type | state       | send_state | flap_count | flap_time |
    +------------------------+---------------+----------+----------+-----------+-------------+------------+------------+-----------+
    | ip-172-31-25-102.local | 172.31.25.102 | 0        | XMPP     | internal  | Established | in sync    | 0          | n/a       |
    | ip-172-31-33-175.local | 172.31.33.175 | 0        | XMPP     | internal  | Established | in sync    | 0          | n/a       |
    +------------------------+---------------+----------+----------+-----------+-------------+------------+------------+-----------+
    [root@ip-172-31-13-9 ~]# 
    [root@ip-172-31-13-9 ~]# 
    [root@ip-172-31-13-9 ~]# 
    [root@ip-172-31-13-9 ~]# ./contrail-introspect-cli/ist.py --host 172.31.13.9 ctr nei
    Introspect Host: 172.31.13.9
    [root@ip-172-31-13-9 ~]# 
     -> iBGP is not configured yet
    
    [root@ip-172-31-13-9 ~]# ./contrail-introspect-cli/ist.py --host 172.31.19.25 ctr route summary
    Introspect Host: 172.31.19.25
    +----------------------------------------------------+----------+-------+---------------+-----------------+------------------+
    | name                                               | prefixes | paths | primary_paths | secondary_paths | infeasible_paths |
    +----------------------------------------------------+----------+-------+---------------+-----------------+------------------+
    | default-domain:default-                            | 0        | 0     | 0             | 0               | 0                |
    | project:__link_local__:__link_local__.inet.0       |          |       |               |                 |                  |
    | default-domain:default-project:dci-                | 0        | 0     | 0             | 0               | 0                |
    | network:__default__.inet.0                         |          |       |               |                 |                  |
    | default-domain:default-project:dci-network:dci-    | 0        | 0     | 0             | 0               | 0                |
    | network.inet.0                                     |          |       |               |                 |                  |
    | default-domain:default-project:default-virtual-    | 0        | 0     | 0             | 0               | 0                |
    | network:default-virtual-network.inet.0             |          |       |               |                 |                  |
    | inet.0                                             | 0        | 0     | 0             | 0               | 0                |
    | default-domain:default-project:ip-fabric:ip-       | 7        | 7     | 2             | 5               | 0                |
    | fabric.inet.0                                      |          |       |               |                 |                  |
    | default-domain:k8s-default:k8s-default-pod-network | 7        | 7     | 4             | 3               | 0                |
    | :k8s-default-pod-network.inet.0                    |          |       |               |                 |                  |
    | default-domain:k8s-default:k8s-default-service-    | 7        | 7     | 1             | 6               | 0                |
    | network:k8s-default-service-network.inet.0         |          |       |               |                 |                  |
    +----------------------------------------------------+----------+-------+---------------+-----------------+------------------+
    [root@ip-172-31-13-9 ~]# 
    [root@ip-172-31-13-9 ~]# 
    [root@ip-172-31-13-9 ~]# ./contrail-introspect-cli/ist.py --host 172.31.13.9 ctr route summary
    Introspect Host: 172.31.13.9
    +----------------------------------------------------+----------+-------+---------------+-----------------+------------------+
    | name                                               | prefixes | paths | primary_paths | secondary_paths | infeasible_paths |
    +----------------------------------------------------+----------+-------+---------------+-----------------+------------------+
    | default-domain:default-                            | 0        | 0     | 0             | 0               | 0                |
    | project:__link_local__:__link_local__.inet.0       |          |       |               |                 |                  |
    | default-domain:default-project:dci-                | 0        | 0     | 0             | 0               | 0                |
    | network:__default__.inet.0                         |          |       |               |                 |                  |
    | default-domain:default-project:dci-network:dci-    | 0        | 0     | 0             | 0               | 0                |
    | network.inet.0                                     |          |       |               |                 |                  |
    | default-domain:default-project:default-virtual-    | 0        | 0     | 0             | 0               | 0                |
    | network:default-virtual-network.inet.0             |          |       |               |                 |                  |
    | inet.0                                             | 0        | 0     | 0             | 0               | 0                |
    | default-domain:default-project:ip-fabric:ip-       | 0        | 0     | 0             | 0               | 0                |
    | fabric.inet.0                                      |          |       |               |                 |                  |
    | default-domain:k8s-default:k8s-default-pod-network | 0        | 0     | 0             | 0               | 0                |
    | :k8s-default-pod-network.inet.0                    |          |       |               |                 |                  |
    | default-domain:k8s-default:k8s-default-service-    | 0        | 0     | 0             | 0               | 0                |
    | network:k8s-default-service-network.inet.0         |          |       |               |                 |                  |
    +----------------------------------------------------+----------+-------+---------------+-----------------+------------------+
    [root@ip-172-31-13-9 ~]# 
     -> 在新的控制器里没有导入路由
    
    [root@ip-172-31-19-25 contrail-ansible-deployer]# kubectl get pod -o wide
    NAME                                 READY   STATUS    RESTARTS   AGE     IP              NODE                                               NOMINATED NODE
    cirros-deployment-75c98888b9-6qmcm   1/1     Running   0          4m58s   10.47.255.249   ip-172-31-25-102.ap-northeast-1.compute.internal   
    cirros-deployment-75c98888b9-lxq4k   1/1     Running   0          4m58s   10.47.255.250   ip-172-31-33-175.ap-northeast-1.compute.internal   
    [root@ip-172-31-19-25 contrail-ansible-deployer]# 
    
    / # ip -o a
    1: lo:  mtu 65536 qdisc noqueue qlen 1000\    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    1: lo    inet 127.0.0.1/8 scope host lo\       valid_lft forever preferred_lft forever
    13: eth0@if14:  mtu 1500 qdisc noqueue \    link/ether 02:6b:dc:98:ac:95 brd ff:ff:ff:ff:ff:ff
    13: eth0    inet 10.47.255.249/12 scope global eth0\       valid_lft forever preferred_lft forever
    / # ping 10.47.255.250
    PING 10.47.255.250 (10.47.255.250): 56 data bytes
    64 bytes from 10.47.255.250: seq=0 ttl=63 time=2.155 ms
    64 bytes from 10.47.255.250: seq=1 ttl=63 time=0.904 ms
    ^C
    --- 10.47.255.250 ping statistics ---
    2 packets transmitted, 2 packets received, 0% packet loss
    round-trip min/avg/max = 0.904/1.529/2.155 ms
    / # 
     -> 两个vRouter每个都有一个容器,在两个容器之间ping的结果正常。
    
    
    在provision_control之后:
    
    [root@ip-172-31-13-9 ~]# ./contrail-introspect-cli/ist.py --host 172.31.19.25 ctr nei
    Introspect Host: 172.31.19.25
    +------------------------+---------------+----------+----------+-----------+-------------+-----------------+------------+-----------+
    | peer                   | peer_address  | peer_asn | encoding | peer_type | state       | send_state      | flap_count | flap_time |
    +------------------------+---------------+----------+----------+-----------+-------------+-----------------+------------+-----------+
    | ip-172-31-13-9.local   | 172.31.13.9   | 64512    | BGP      | internal  | Idle        | not advertising | 0          | n/a       |
    | ip-172-31-25-102.local | 172.31.25.102 | 0        | XMPP     | internal  | Established | in sync         | 0          | n/a       |
    | ip-172-31-33-175.local | 172.31.33.175 | 0        | XMPP     | internal  | Established | in sync         | 0          | n/a       |
    +------------------------+---------------+----------+----------+-----------+-------------+-----------------+------------+-----------+
    [root@ip-172-31-13-9 ~]# ./contrail-introspect-cli/ist.py --host 172.31.13.9 ctr nei
    Introspect Host: 172.31.13.9
    [root@ip-172-31-13-9 ~]#
     -> iBGP 在老的控制器上,但是新的控制器还没有那些配置(在执行pre-sync后,这会被复制到新的控制器上)
    
    
    在run-sync之后:
    [root@ip-172-31-13-9 ~]# ./contrail-introspect-cli/ist.py --host 172.31.19.25 ctr nei
    Introspect Host: 172.31.19.25
    +------------------------+---------------+----------+----------+-----------+-------------+------------+------------+-----------+
    | peer                   | peer_address  | peer_asn | encoding | peer_type | state       | send_state | flap_count | flap_time |
    +------------------------+---------------+----------+----------+-----------+-------------+------------+------------+-----------+
    | ip-172-31-13-9.local   | 172.31.13.9   | 64512    | BGP      | internal  | Established | in sync    | 0          | n/a       |
    | ip-172-31-25-102.local | 172.31.25.102 | 0        | XMPP     | internal  | Established | in sync    | 0          | n/a       |
    | ip-172-31-33-175.local | 172.31.33.175 | 0        | XMPP     | internal  | Established | in sync    | 0          | n/a       |
    +------------------------+---------------+----------+----------+-----------+-------------+------------+------------+-----------+
    [root@ip-172-31-13-9 ~]# ./contrail-introspect-cli/ist.py --host 172.31.13.9 ctr nei
    Introspect Host: 172.31.13.9
    +-----------------------+--------------+----------+----------+-----------+-------------+------------+------------+-----------+
    | peer                  | peer_address | peer_asn | encoding | peer_type | state       | send_state | flap_count | flap_time |
    +-----------------------+--------------+----------+----------+-----------+-------------+------------+------------+-----------+
    | ip-172-31-19-25.local | 172.31.19.25 | 64512    | BGP      | internal  | Established | in sync    | 0          | n/a       |
    +-----------------------+--------------+----------+----------+-----------+-------------+------------+------------+-----------+
    [root@ip-172-31-13-9 ~]#
     -> iBGP 建立起来了,ctr route summary没有改变,因为新的控制器没有k8s-default-pod-network的路由目标(route-target),路由目标(route target)过滤组织了导入这些前缀。
    
    
    在迁移节点到新的controller之后:
    
    / # ping 10.47.255.250
    PING 10.47.255.250 (10.47.255.250): 56 data bytes
    64 bytes from 10.47.255.250: seq=0 ttl=63 time=1.684 ms
    64 bytes from 10.47.255.250: seq=1 ttl=63 time=0.835 ms
    64 bytes from 10.47.255.250: seq=2 ttl=63 time=0.836 ms
    (snip)
    64 bytes from 10.47.255.250: seq=37 ttl=63 time=0.878 ms
    64 bytes from 10.47.255.250: seq=38 ttl=63 time=0.823 ms
    64 bytes from 10.47.255.250: seq=39 ttl=63 time=0.820 ms
    64 bytes from 10.47.255.250: seq=40 ttl=63 time=1.364 ms
    64 bytes from 10.47.255.250: seq=44 ttl=63 time=2.209 ms
    64 bytes from 10.47.255.250: seq=45 ttl=63 time=0.869 ms
    64 bytes from 10.47.255.250: seq=46 ttl=63 time=0.857 ms
    64 bytes from 10.47.255.250: seq=47 ttl=63 time=0.855 ms
    64 bytes from 10.47.255.250: seq=48 ttl=63 time=0.845 ms
    64 bytes from 10.47.255.250: seq=49 ttl=63 time=0.842 ms
    64 bytes from 10.47.255.250: seq=50 ttl=63 time=0.885 ms
    64 bytes from 10.47.255.250: seq=51 ttl=63 time=0.891 ms
    64 bytes from 10.47.255.250: seq=52 ttl=63 time=0.909 ms
    64 bytes from 10.47.255.250: seq=53 ttl=63 time=0.867 ms
    64 bytes from 10.47.255.250: seq=54 ttl=63 time=0.884 ms
    64 bytes from 10.47.255.250: seq=55 ttl=63 time=0.865 ms
    64 bytes from 10.47.255.250: seq=56 ttl=63 time=0.840 ms
    64 bytes from 10.47.255.250: seq=57 ttl=63 time=0.877 ms
    ^C
    --- 10.47.255.250 ping statistics ---
    58 packets transmitted, 55 packets received, 5% packet loss
    round-trip min/avg/max = 0.810/0.930/2.209 ms
    / # 
     -> 在vrouter-agent 重启后,可以看到丢了3个包(序号40-44)。在迁移vRouter到新的之后,ping工作地很好。
    
    
    [root@ip-172-31-13-9 ~]# ./contrail-introspect-cli/ist.py --host 172.31.19.25 ctr nei
    检查主机:172.31.19.25
    +------------------------+---------------+----------+----------+-----------+-------------+------------+------------+-----------+
    | peer                   | peer_address  | peer_asn | encoding | peer_type | state       | send_state | flap_count | flap_time |
    +------------------------+---------------+----------+----------+-----------+-------------+------------+------------+-----------+
    | ip-172-31-13-9.local   | 172.31.13.9   | 64512    | BGP      | internal  | Established | in sync    | 0          | n/a       |
    | ip-172-31-33-175.local | 172.31.33.175 | 0        | XMPP     | internal  | Established | in sync    | 0          | n/a       |
    +------------------------+---------------+----------+----------+-----------+-------------+------------+------------+-----------+
    [root@ip-172-31-13-9 ~]# ./contrail-introspect-cli/ist.py --host 172.31.13.9 ctr nei
    Introspect Host: 172.31.13.9
    +------------------------+---------------+----------+----------+-----------+-------------+------------+------------+-----------+
    | peer                   | peer_address  | peer_asn | encoding | peer_type | state       | send_state | flap_count | flap_time |
    +------------------------+---------------+----------+----------+-----------+-------------+------------+------------+-----------+
    | ip-172-31-19-25.local  | 172.31.19.25  | 64512    | BGP      | internal  | Established | in sync    | 0          | n/a       |
    | ip-172-31-25-102.local | 172.31.25.102 | 0        | XMPP     | internal  | Established | in sync    | 0          | n/a       |
    +------------------------+---------------+----------+----------+-----------+-------------+------------+------------+-----------+
    [root@ip-172-31-13-9 ~]# 
     -> 两个控制器具有XMPP连接,建立了IBGP
    
    [root@ip-172-31-13-9 ~]# ./contrail-introspect-cli/ist.py --host 172.31.19.25 ctr route summary
    检查主机: 172.31.19.25
    +----------------------------------------------------+----------+-------+---------------+-----------------+------------------+
    | name                                               | prefixes | paths | primary_paths | secondary_paths | infeasible_paths |
    +----------------------------------------------------+----------+-------+---------------+-----------------+------------------+
    | default-domain:default-                            | 0        | 0     | 0             | 0               | 0                |
    | project:__link_local__:__link_local__.inet.0       |          |       |               |                 |                  |
    | default-domain:default-project:dci-                | 0        | 0     | 0             | 0               | 0                |
    | network:__default__.inet.0                         |          |       |               |                 |                  |
    | default-domain:default-project:dci-network:dci-    | 0        | 0     | 0             | 0               | 0                |
    | network.inet.0                                     |          |       |               |                 |                  |
    | default-domain:default-project:default-virtual-    | 0        | 0     | 0             | 0               | 0                |
    | network:default-virtual-network.inet.0             |          |       |               |                 |                  |
    | inet.0                                             | 0        | 0     | 0             | 0               | 0                |
    | default-domain:default-project:ip-fabric:ip-       | 7        | 7     | 1             | 6               | 0                |
    | fabric.inet.0                                      |          |       |               |                 |                  |
    | default-domain:k8s-default:k8s-default-pod-network | 7        | 7     | 1             | 6               | 0                |
    | :k8s-default-pod-network.inet.0                    |          |       |               |                 |                  |
    | default-domain:k8s-default:k8s-default-service-    | 7        | 7     | 0             | 7               | 0                |
    | network:k8s-default-service-network.inet.0         |          |       |               |                 |                  |
    +----------------------------------------------------+----------+-------+---------------+-----------------+------------------+
    [root@ip-172-31-13-9 ~]# ./contrail-introspect-cli/ist.py --host 172.31.13.9 ctr route summary
    检查主机: 172.31.13.9
    +----------------------------------------------------+----------+-------+---------------+-----------------+------------------+
    | name                                               | prefixes | paths | primary_paths | secondary_paths | infeasible_paths |
    +----------------------------------------------------+----------+-------+---------------+-----------------+------------------+
    | default-domain:default-                            | 0        | 0     | 0             | 0               | 0                |
    | project:__link_local__:__link_local__.inet.0       |          |       |               |                 |                  |
    | default-domain:default-project:dci-                | 0        | 0     | 0             | 0               | 0                |
    | network:__default__.inet.0                         |          |       |               |                 |                  |
    | default-domain:default-project:dci-network:dci-    | 0        | 0     | 0             | 0               | 0                |
    | network.inet.0                                     |          |       |               |                 |                  |
    | default-domain:default-project:default-virtual-    | 0        | 0     | 0             | 0               | 0                |
    | network:default-virtual-network.inet.0             |          |       |               |                 |                  |
    | inet.0                                             | 0        | 0     | 0             | 0               | 0                |
    | default-domain:default-project:ip-fabric:ip-       | 7        | 7     | 1             | 6               | 0                |
    | fabric.inet.0                                      |          |       |               |                 |                  |
    | default-domain:k8s-default:k8s-default-pod-network | 7        | 7     | 3             | 4               | 0                |
    | :k8s-default-pod-network.inet.0                    |          |       |               |                 |                  |
    | default-domain:k8s-default:k8s-default-service-    | 7        | 7     | 1             | 6               | 0                |
    | network:k8s-default-service-network.inet.0         |          |       |               |                 |                  |
    +----------------------------------------------------+----------+-------+---------------+-----------------+------------------+
    [root@ip-172-31-13-9 ~]# 
     -> 因为两个控制器具有至少一个容器来自k8s-default-pod-network, 它们使用iBGP来交换前缀,因此它们具有同一个前缀
    
    
    在将第二个vrouter迁移到新的控制器之后:
    / # ping 10.47.255.250
    PING 10.47.255.250 (10.47.255.250): 56 data bytes
    64 bytes from 10.47.255.250: seq=0 ttl=63 time=1.750 ms
    64 bytes from 10.47.255.250: seq=1 ttl=63 time=0.815 ms
    64 bytes from 10.47.255.250: seq=2 ttl=63 time=0.851 ms
    64 bytes from 10.47.255.250: seq=3 ttl=63 time=0.809 ms
    (snip)
    64 bytes from 10.47.255.250: seq=34 ttl=63 time=0.853 ms
    64 bytes from 10.47.255.250: seq=35 ttl=63 time=0.848 ms
    64 bytes from 10.47.255.250: seq=36 ttl=63 time=0.833 ms
    64 bytes from 10.47.255.250: seq=37 ttl=63 time=0.832 ms
    64 bytes from 10.47.255.250: seq=38 ttl=63 time=0.910 ms
    64 bytes from 10.47.255.250: seq=42 ttl=63 time=2.071 ms
    64 bytes from 10.47.255.250: seq=43 ttl=63 time=0.826 ms
    64 bytes from 10.47.255.250: seq=44 ttl=63 time=0.853 ms
    64 bytes from 10.47.255.250: seq=45 ttl=63 time=0.851 ms
    64 bytes from 10.47.255.250: seq=46 ttl=63 time=0.853 ms
    64 bytes from 10.47.255.250: seq=47 ttl=63 time=0.851 ms
    64 bytes from 10.47.255.250: seq=48 ttl=63 time=0.855 ms
    64 bytes from 10.47.255.250: seq=49 ttl=63 time=0.869 ms
    64 bytes from 10.47.255.250: seq=50 ttl=63 time=0.833 ms
    64 bytes from 10.47.255.250: seq=51 ttl=63 time=0.859 ms
    64 bytes from 10.47.255.250: seq=52 ttl=63 time=0.866 ms
    64 bytes from 10.47.255.250: seq=53 ttl=63 time=0.840 ms
    64 bytes from 10.47.255.250: seq=54 ttl=63 time=0.841 ms
    64 bytes from 10.47.255.250: seq=55 ttl=63 time=0.854 ms
    ^C
    --- 10.47.255.250 ping statistics ---
    56 packets transmitted, 53 packets received, 5% packet loss
    round-trip min/avg/max = 0.799/0.888/2.071 ms
    / #
     -> 3 packet loss is seen (seq 38-42)
    
    
    [root@ip-172-31-13-9 ~]# ./contrail-introspect-cli/ist.py --host 172.31.19.25 ctr nei
    Introspect Host: 172.31.19.25
    +----------------------+--------------+----------+----------+-----------+-------------+------------+------------+-----------+
    | peer                 | peer_address | peer_asn | encoding | peer_type | state       | send_state | flap_count | flap_time |
    +----------------------+--------------+----------+----------+-----------+-------------+------------+------------+-----------+
    | ip-172-31-13-9.local | 172.31.13.9  | 64512    | BGP      | internal  | Established | in sync    | 0          | n/a       |
    +----------------------+--------------+----------+----------+-----------+-------------+------------+------------+-----------+
    [root@ip-172-31-13-9 ~]# ./contrail-introspect-cli/ist.py --host 172.31.13.9 ctr nei
    Introspect Host: 172.31.13.9
    +------------------------+---------------+----------+----------+-----------+-------------+------------+------------+-----------+
    | peer                   | peer_address  | peer_asn | encoding | peer_type | state       | send_state | flap_count | flap_time |
    +------------------------+---------------+----------+----------+-----------+-------------+------------+------------+-----------+
    | ip-172-31-19-25.local  | 172.31.19.25  | 64512    | BGP      | internal  | Established | in sync    | 0          | n/a       |
    | ip-172-31-25-102.local | 172.31.25.102 | 0        | XMPP     | internal  | Established | in sync    | 0          | n/a       |
    | ip-172-31-33-175.local | 172.31.33.175 | 0        | XMPP     | internal  | Established | in sync    | 0          | n/a       |
    +------------------------+---------------+----------+----------+-----------+-------------+------------+------------+-----------+
    [root@ip-172-31-13-9 ~]# 
     -> 新的控制器具有两个XMPP连接。
    
    [root@ip-172-31-13-9 ~]# ./contrail-introspect-cli/ist.py --host 172.31.19.25 ctr route summary
    检查主机:172.31.19.25
    +----------------------------------------------------+----------+-------+---------------+-----------------+------------------+
    | name                                               | prefixes | paths | primary_paths | secondary_paths | infeasible_paths |
    +----------------------------------------------------+----------+-------+---------------+-----------------+------------------+
    | default-domain:default-                            | 0        | 0     | 0             | 0               | 0                |
    | project:__link_local__:__link_local__.inet.0       |          |       |               |                 |                  |
    | default-domain:default-project:dci-                | 0        | 0     | 0             | 0               | 0                |
    | network:__default__.inet.0                         |          |       |               |                 |                  |
    | default-domain:default-project:dci-network:dci-    | 0        | 0     | 0             | 0               | 0                |
    | network.inet.0                                     |          |       |               |                 |                  |
    | default-domain:default-project:default-virtual-    | 0        | 0     | 0             | 0               | 0                |
    | network:default-virtual-network.inet.0             |          |       |               |                 |                  |
    | inet.0                                             | 0        | 0     | 0             | 0               | 0                |
    | default-domain:default-project:ip-fabric:ip-       | 0        | 0     | 0             | 0               | 0                |
    | fabric.inet.0                                      |          |       |               |                 |                  |
    | default-domain:k8s-default:k8s-default-pod-network | 0        | 0     | 0             | 0               | 0                |
    | :k8s-default-pod-network.inet.0                    |          |       |               |                 |                  |
    | default-domain:k8s-default:k8s-default-service-    | 0        | 0     | 0             | 0               | 0                |
    | network:k8s-default-service-network.inet.0         |          |       |               |                 |                  |
    +----------------------------------------------------+----------+-------+---------------+-----------------+------------------+
    [root@ip-172-31-13-9 ~]# ./contrail-introspect-cli/ist.py --host 172.31.13.9 ctr route summary
    检查主机:172.31.13.9
    +----------------------------------------------------+----------+-------+---------------+-----------------+------------------+
    | name                                               | prefixes | paths | primary_paths | secondary_paths | infeasible_paths |
    +----------------------------------------------------+----------+-------+---------------+-----------------+------------------+
    | default-domain:default-                            | 0        | 0     | 0             | 0               | 0                |
    | project:__link_local__:__link_local__.inet.0       |          |       |               |                 |                  |
    | default-domain:default-project:dci-                | 0        | 0     | 0             | 0               | 0                |
    | network:__default__.inet.0                         |          |       |               |                 |                  |
    | default-domain:default-project:dci-network:dci-    | 0        | 0     | 0             | 0               | 0                |
    | network.inet.0                                     |          |       |               |                 |                  |
    | default-domain:default-project:default-virtual-    | 0        | 0     | 0             | 0               | 0                |
    | network:default-virtual-network.inet.0             |          |       |               |                 |                  |
    | inet.0                                             | 0        | 0     | 0             | 0               | 0                |
    | default-domain:default-project:ip-fabric:ip-       | 7        | 7     | 2             | 5               | 0                |
    | fabric.inet.0                                      |          |       |               |                 |                  |
    | default-domain:k8s-default:k8s-default-pod-network | 7        | 7     | 4             | 3               | 0                |
    | :k8s-default-pod-network.inet.0                    |          |       |               |                 |                  |
    | default-domain:k8s-default:k8s-default-service-    | 7        | 7     | 1             | 6               | 0                |
    | network:k8s-default-service-network.inet.0         |          |       |               |                 |                  |
    +----------------------------------------------------+----------+-------+---------------+-----------------+------------------+
    [root@ip-172-31-13-9 ~]#
     -> 老的控制器不再具有前缀。
    
    
    在ISSU过程结束后,新的kube-manager 启动:
    [root@ip-172-31-19-25 ~]# kubectl get pod -o wide
    NAME                                  READY   STATUS    RESTARTS   AGE   IP              NODE                                               NOMINATED NODE
    cirros-deployment-75c98888b9-6qmcm    1/1     Running   0          34m   10.47.255.249   ip-172-31-25-102.ap-northeast-1.compute.internal   
    cirros-deployment-75c98888b9-lxq4k    1/1     Running   0          34m   10.47.255.250   ip-172-31-33-175.ap-northeast-1.compute.internal   
    cirros-deployment2-648b98685f-b8pxw   1/1     Running   0          15s   10.47.255.247   ip-172-31-25-102.ap-northeast-1.compute.internal   
    cirros-deployment2-648b98685f-nv7z9   1/1     Running   0          15s   10.47.255.248   ip-172-31-33-175.ap-northeast-1.compute.internal   
    [root@ip-172-31-19-25 ~]# 
     -> 通过新的IP创建容器(10.47.255.247, 10.47.255.248 是来自新控制器的新地址)
    
    [root@ip-172-31-13-9 ~]# ./contrail-introspect-cli/ist.py --host 172.31.19.25 ctr nei
    Introspect Host: 172.31.19.25
    +----------------------+--------------+----------+----------+-----------+--------+-----------------+------------+-----------------------------+
    | peer                 | peer_address | peer_asn | encoding | peer_type | state  | send_state      | flap_count | flap_time                   |
    +----------------------+--------------+----------+----------+-----------+--------+-----------------+------------+-----------------------------+
    | ip-172-31-13-9.local | 172.31.13.9  | 64512    | BGP      | internal  | Active | not advertising | 1          | 2019-Jun-23 05:37:02.614003 |
    +----------------------+--------------+----------+----------+-----------+--------+-----------------+------------+-----------------------------+
    [root@ip-172-31-13-9 ~]# ./contrail-introspect-cli/ist.py --host 172.31.13.9 ctr nei
    Introspect Host: 172.31.13.9
    +------------------------+---------------+----------+----------+-----------+-------------+------------+------------+-----------+
    | peer                   | peer_address  | peer_asn | encoding | peer_type | state       | send_state | flap_count | flap_time |
    +------------------------+---------------+----------+----------+-----------+-------------+------------+------------+-----------+
    | ip-172-31-25-102.local | 172.31.25.102 | 0        | XMPP     | internal  | Established | in sync    | 0          | n/a       |
    | ip-172-31-33-175.local | 172.31.33.175 | 0        | XMPP     | internal  | Established | in sync    | 0          | n/a       |
    +------------------------+---------------+----------+----------+-----------+-------------+------------+------------+-----------+
    [root@ip-172-31-13-9 ~]#
     -> 新控制器不再有iBGP路由到旧的控制器。旧控制器依然具有iBGP路由条目,虽然这个过程很快就要停止:)
    
    在停止了就的控制器后,配置:
    [root@ip-172-31-19-25 ~]# kubectl get pod -o wide
    NAME                                  READY   STATUS    RESTARTS   AGE   IP              NODE                                               NOMINATED NODE
    cirros-deployment-75c98888b9-6qmcm    1/1     Running   0          48m   10.47.255.249   ip-172-31-25-102.ap-northeast-1.compute.internal   
    cirros-deployment-75c98888b9-lxq4k    1/1     Running   0          48m   10.47.255.250   ip-172-31-33-175.ap-northeast-1.compute.internal   
    cirros-deployment2-648b98685f-b8pxw   1/1     Running   0          13m   10.47.255.247   ip-172-31-25-102.ap-northeast-1.compute.internal   
    cirros-deployment2-648b98685f-nv7z9   1/1     Running   0          13m   10.47.255.248   ip-172-31-33-175.ap-northeast-1.compute.internal   
    cirros-deployment3-68fb484676-ct9q9   1/1     Running   0          18s   10.47.255.245   ip-172-31-25-102.ap-northeast-1.compute.internal   
    cirros-deployment3-68fb484676-mxbzq   1/1     Running   0          18s   10.47.255.246   ip-172-31-33-175.ap-northeast-1.compute.internal   
    [root@ip-172-31-19-25 ~]# 
     -> 新容器依然可以被创建
    
    [root@ip-172-31-25-102 ~]# contrail-status 
    Pod      Service  Original Name           State    Id            Status         
    vrouter  agent    contrail-vrouter-agent  running  9a46a1a721a7  Up 33 minutes  
    vrouter  nodemgr  contrail-nodemgr        running  11fb0a7bc86d  Up 33 minutes  
    
    vrouter kernel module is PRESENT
    == Contrail vrouter ==
    nodemgr: active
    agent: active
    
    [root@ip-172-31-25-102 ~]# 
     -> 具有新控制器的vRouter工作良好
    
    

    e621c05e-8c5b-42cc-b0c7-0cae5e34f752-image.png

    向后兼容

    4a307599-cc6f-444c-8f49-3c720982a89f-image.png
    145a3df5-83c7-45a5-bcab-3fff7f54f6a6-image.png


Log in to reply