メモのページ - チラシの裏メモ 3枚目

通信技術や気になった事を黙々とメモし続ける

SONiCのWarm Bootの動作確認

前回の「SONiCを少しかじってみた」ではSONiCをVirtualBoxにデプロイし、Cumulus VXとの間でBGPを張らせた。
そして今回はSONiCに実装されているWarm Boot機能の動作確認をし、SONiCの再起動(Cold Boot)と通信断の時間を比較してみた。


SONiCのWarm Bootについて
SONiCではWarm Bootはバージョン201811にて実装された。
Warm Boot機能により、SONiC内部のデータプレーンに影響を与えることなく、SONiCソフトウェアを再起動させる事になっている。
Warm BootはJuniperやCiscoのデバイスでも実行可能である。
Warm Bootの利点。電源投入後のOS起動のように機器内部のフラッシュメモリからイメージをコピーして解凍する必要がない為、通常運用の状態になるまでの時間が短縮される。
SONiCにおけるWarm Bootの目的は、データプレーンに影響を与える事無く、SONiCソフトウェアや個々のプロセスやSONiC内部のDockerコンテナを再起動およびアップグレードが出来るようにする事である。

SONiCにおけるWarm Bootの挙動は、大まかに以下のような流れである。
1.Warm BootスクリプトはApp DBとASIC DBをディスクに保存。
2.Redisは再起動後にApp DBと ASIC DBを復元。
3.OA(Orchestration Agent)はApp DBを読み取り、新しいASIC DBをコンパイルする。
4.Sync DBは新旧のASIC DBを比較し、ASICに比較内容を適用する。
5.アプリケーションが並行してウェイクアップする。
 ・App DBに段階的な変更を加える可能性有り。
 ・OAは通常どおりに着信し、ASIC DBを更新する。
 ・Sync DBはASIC DBをハードウェアに同期し続ける。

SONiCの内部で動作するDockerコンテナやデータベース等に関しては、下記のリンク先(SONiC System Architecture)を参照。
SONiCのWarm Boot時の挙動に関しては、下記のリンク先(SONiC – Reliability,Manageability and Extensibility)を参照。
SONiCで言うコンテナ/Dockerコンテナとは、「SONiCのDockerコンテナ」ではなく「SONiCの内部で動作する各機能のDockerコンテナ」を指す。


今回はSONiCのWarm Bootの検証として、SONiCの内部で動作しているBGPのDockerコンテナをコマンドで再起動させ、Cold Boot時より通信断の時間が短い事を確認。
BGPコンテナの再起動中は数秒程度の通信断という想定だが、果たして結果は?
尚、ここで言うBGPコンテナとはSONiCにQuaggaまたはFRRを提供するコンテナを指す。 コンテナの名称は使用されているルーティングプロトコル(BGP)にちなんで付けられているが、実際はBGPだけでなくOSPFやIS-ISも実行可能である。


当方の環境
ホストOS:Windows10 64bit版 / RAM: 8GB / CPU: Intel Core i5 M460 2.53GHz
Oracle Virtualbox:6.1.18
ゲストOS 1:Cumulus VX 4.2.1 (Leaf)
ゲストOS 2:Cumulus VX 4.2.1 (Leaf)
ゲストOS 3:SONiC.202012.18-0c178399 (Spine)


構成図
IP Clos(っぽい)構成は本来であればLeafとSpineとの間の物理リンクは1本づつである。
※図をクリックすると拡大表示します



各機器の設定内容
Spineスイッチ(jpmtkvmsw98)のConfigは以下のとおり。
BGPの設定のみ抜粋。

admin@jpmtkvmsw98:~$ show runningconfig all
{
    "BGP_NEIGHBOR": {
        "10.0.0.1": {
            "admin_status": "up",
            "asn": "65099",
            "holdtime": "180",
            "keepalive": "60",
            "local_addr": "10.0.0.0",
            "name": "CUMULUS-VX-99-PATH1",
            "nhopself": "0",
            "rrclient": "0"
        },
        "10.0.0.11": {
            "admin_status": "up",
            "asn": "65097",
            "holdtime": "180",
            "keepalive": "60",
            "local_addr": "10.0.0.10",
            "name": "CUMULUS-VX-97-PATH3",
            "nhopself": "0",
            "rrclient": "0"
        },
        "10.0.0.3": {
            "admin_status": "up",
            "asn": "65099",
            "holdtime": "180",
            "keepalive": "60",
            "local_addr": "10.0.0.2",
            "name": "CUMULUS-VX-99-PATH2",
            "nhopself": "0",
            "rrclient": "0"
        },
        "10.0.0.5": {
            "admin_status": "up",
            "asn": "65099",
            "holdtime": "180",
            "keepalive": "60",
            "local_addr": "10.0.0.4",
            "name": "CUMULUS-VX-99-PATH3",
            "nhopself": "0",
            "rrclient": "0"
        },
        "10.0.0.7": {
            "admin_status": "up",
            "asn": "65097",
            "holdtime": "180",
            "keepalive": "60",
            "local_addr": "10.0.0.6",
            "name": "CUMULUS-VX-97-PATH1",
            "nhopself": "0",
            "rrclient": "0"
        },
        "10.0.0.9": {
            "admin_status": "up",
            "asn": "65097",
            "holdtime": "180",
            "keepalive": "60",
            "local_addr": "10.0.0.8",
            "name": "CUMULUS-VX-97-PATH2",
            "nhopself": "0",
            "rrclient": "0"
        },
        "10.1.1.97": {
            "admin_status": "up",
            "asn": "65097",
            "holdtime": "180",
            "keepalive": "60",
            "local_addr": "10.1.1.97",
            "name": "CUMULUS-VX-97-LO",
            "nhopself": "0",
            "rrclient": "0"
        },
        "10.1.1.99": {
            "admin_status": "up",
            "asn": "65099",
            "holdtime": "180",
            "keepalive": "60",
            "local_addr": "10.1.1.98",
            "name": "CUMULUS-VX-99-LO",
            "nhopself": "0",
            "rrclient": "0"
        }
    },
:
省略
:
    },
    "DEVICE_METADATA": {
        "localhost": {
            "bgp_asn": "65098",
            "buffer_model": "traditional",
            "default_bgp_status": "up",
            "default_pfcwd_status": "disable",
            "hostname": "jpmtkvmsw98",
            "hwsku": "Force10-S6000",
            "mac": "52:54:00:12:34:56",
            "platform": "x86_64-kvm_x86_64-r0",
            "type": "LeafRouter"
        }
    },
    "FEATURE": {
        "bgp": {
            "auto_restart": "enabled",
            "has_global_scope": "False",
            "has_per_asic_scope": "True",
            "has_timer": "False",
            "high_mem_alert": "disabled",
            "state": "enabled"
:
    "PORT": {
        "Ethernet0": {
            "admin_status": "up",
            "alias": "fortyGigE0/0",
            "index": "0",
            "lanes": "25,26,27,28",
            "mtu": "9100",
            "speed": "40000"
        },
        "Ethernet4": {
            "admin_status": "up",
            "alias": "fortyGigE0/4",
            "index": "1",
            "lanes": "29,30,31,32",
            "mtu": "9100",
            "speed": "40000"
        },
        "Ethernet8": {
            "admin_status": "up",
            "alias": "fortyGigE0/8",
            "index": "2",
            "lanes": "33,34,35,36",
            "mtu": "9100",
            "speed": "40000"
        },
        "Ethernet12": {
            "admin_status": "up",
            "alias": "fortyGigE0/12",
            "index": "3",
            "lanes": "37,38,39,40",
            "mtu": "9100",
            "speed": "40000"
        },
        "Ethernet16": {
            "admin_status": "up",
            "alias": "fortyGigE0/16",
            "index": "4",
            "lanes": "45,46,47,48",
            "mtu": "9100",
            "speed": "40000"
        },
        "Ethernet20": {
            "admin_status": "up",
            "alias": "fortyGigE0/20",
            "index": "5",
            "lanes": "41,42,43,44",
            "mtu": "9100",
            "speed": "40000"
        },
:


Leafスイッチ(jpmtkvmsw99)のConfigは以下のとおり。
BGPおよびインタフェースの設定を抜粋。

cumulus@jpmtkvmsw99:mgmt:~$ net show configuration
:
省略
:
router bgp 65099
  bgp router-id 10.1.1.99
  bgp bestpath as-path multipath-relax
  timers bgp 60 180
  neighbor 10.0.0.0 remote-as 65098
  neighbor 10.0.0.2 remote-as 65098
  neighbor 10.0.0.4 remote-as 65098
  neighbor 10.1.1.98 remote-as 65098

  address-family ipv4 unicast
    network 10.1.1.99/32
    network 192.168.99.0/24

line vty

interface lo
  # The primary network interface
  address 10.1.1.99/32

interface eth0
  address 192.168.3.250/24
  vrf mgmt

interface swp1
  address 10.0.0.1/31
  alias DEV=jpmtkvmsw98 IF=Eth0
  mtu 9100

interface swp2
  address 10.0.0.3/31
  alias DEV=jpmtkvmsw98 IF=Eth4
  mtu 9100

interface swp3
  address 10.0.0.5/31
  alias DEV=jpmtkvmsw98 IF=Eth8
  mtu 9100

interface swp4
  address 192.168.99.1/24
  alias LAN_Segment

interface mgmt
  address 127.0.0.1/8
  address ::1/128
  vrf-table auto
:


Leafスイッチ(jpmtkvmsw97)のConfigは以下のとおり。
BGPおよびインタフェースの設定を抜粋。

cumulus@jpmtkvmsw97:mgmt:~$ net show config
:
省略
:
router bgp 65097
  bgp router-id 10.1.1.97
  bgp bestpath as-path multipath-relax
  timers bgp 60 180
  neighbor 10.0.0.6 remote-as 65098
  neighbor 10.0.0.8 remote-as 65098
  neighbor 10.0.0.10 remote-as 65098
  neighbor 10.1.1.98 remote-as 65098

  address-family ipv4 unicast
    network 10.1.1.97/32
    network 192.168.97.0/24

line vty

interface lo
  address 10.1.1.97/32
  # The primary network interface

interface eth0
  address 192.168.3.249/24
  vrf mgmt

interface swp1
  address 10.0.0.7/31
  alias DEV=jpmtkvmsw98 IF=eth12
  mtu 9100

interface swp2
  address 10.0.0.9/31
  alias DEV=jpmtkvmsw98 IF=eth16
  mtu 9100

interface swp3
  address 10.0.0.11/31
  alias DEV=jpmtkvmsw98 IF=eth20
  mtu 9100

interface swp4
  address 192.168.97.1/24
  alias LAN_Segment

interface mgmt
  address 127.0.0.1/8
  address ::1/128
  alias UNUSED
  vrf-table auto
:



確認方法
上記の構成図中で言うと、jpmtkvmsw99からjpmtkvmsw98経由でjpmtkvmsw97にPingを実行。
その間にBGPコンテナを再起動させ、Pingの断時間を計測。

1.SONiCのBGPテーブルの確認
jpmtkvmsw99からjpmtkvmsw97に対し1秒間隔でPing連射。その間にBGPコンテナ再起動前のBGPテーブルを確認。

cumulus@jpmtkvmsw99:mgmt:~$ ping 10.1.1.97
vrf-wrapper.sh: switching to vrf "default"; use '--no-vrf-switch' to disable
PING 10.1.1.97 (10.1.1.97) 56(84) bytes of data.
64 bytes from 10.1.1.99: icmp_seq=1 ttl=63 time=1.43 ms
64 bytes from 10.1.1.99: icmp_seq=2 ttl=63 time=1.50 ms
64 bytes from 10.1.1.99: icmp_seq=3 ttl=63 time=1.46 ms
64 bytes from 10.1.1.99: icmp_seq=4 ttl=63 time=1.43 ms
64 bytes from 10.1.1.99: icmp_seq=5 ttl=63 time=1.39 ms
:
:


以下はSONiC側のBGPテーブルの内容。
2台のLeafスイッチ(jpmtkvmsw99とjpmtkvmsw97)との間でBGPピアの関係が確立出来ている。

admin@jpmtkvmsw98:~$ show ip bgp summary

IPv4 Unicast Summary:
BGP router identifier 10.1.1.98, local AS number 65098 vrf-id 0
BGP table version 7
RIB entries 9, using 1728 bytes of memory
Peers 7, using 152712 KiB of memory
Peer groups 2, using 128 bytes of memory


Neighbhor      V     AS    MsgRcvd    MsgSent    TblVer    InQ    OutQ  Up/Down    State/PfxRcd    NeighborName
-----------  ---  -----  ---------  ---------  --------  -----  ------  ---------  --------------  -------------------
10.0.0.1       4  65099          8          6         0      0       0  00:00:50   2               CUMULUS-VX-99-PATH1
10.0.0.3       4  65099         10          9         0      0       0  00:01:05   2               CUMULUS-VX-99-PATH2
10.0.0.5       4  65099         10          8         0      0       0  00:01:03   2               CUMULUS-VX-99-PATH3
10.0.0.7       4  65097          6          7         0      0       0  00:00:56   2               CUMULUS-VX-97-PATH1
10.0.0.9       4  65097          6          7         0      0       0  00:00:56   2               CUMULUS-VX-97-PATH2
10.0.0.11      4  65097          6          7         0      0       0  00:00:56   2               CUMULUS-VX-97-PATH3
10.1.1.99      4  65099          0          0         0      0       0  never      Active          CUMULUS-VX-99-LO

Total number of neighbors 7
admin@jpmtkvmsw98:~$


以下はCumulus VX側(jpmtkvmsw99)のBGPテーブルの内容。
Spineスイッチ(jpmtkvmsw98)との間でBGPピアの関係が確立出来ている。

cumulus@jpmtkvmsw99:mgmt:~$ net show bgp summary
show bgp ipv4 unicast summary
=============================
BGP router identifier 10.1.1.99, local AS number 65099 vrf-id 0
BGP table version 6
RIB entries 9, using 1728 bytes of memory
Peers 4, using 85 KiB of memory

Neighbor              V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd
jpmtkvmsw98(10.0.0.0) 4      65098         7         9        0    0    0 00:01:36            3
jpmtkvmsw98(10.0.0.2) 4      65098         9        10        0    0    0 00:01:51            3
jpmtkvmsw98(10.0.0.4) 4      65098         8        10        0    0    0 00:01:49            3
10.1.1.98             4      65098         0         0        0    0    0    never       Active

Total number of neighbors 4


以下はCumulus VX側(jpmtkvmsw97)のBGPテーブルの内容。
Spineスイッチ(jpmtkvmsw98)との間でBGPピアの関係が確立出来ている。

cumulus@jpmtkvmsw97:mgmt:~$ net show bgp summary
show bgp ipv4 unicast summary
=============================
BGP router identifier 10.1.1.97, local AS number 65097 vrf-id 0
BGP table version 5
RIB entries 9, using 1728 bytes of memory
Peers 4, using 85 KiB of memory

Neighbor               V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd
jpmtkvmsw98(10.0.0.6)  4      65098         9         8        0    0    0 00:02:05            3
jpmtkvmsw98(10.0.0.8)  4      65098         9         8        0    0    0 00:02:05            3
jpmtkvmsw98(10.0.0.10) 4      65098         9         8        0    0    0 00:02:04            3
10.1.1.98              4      65098         0         0        0    0    0    never       Active

Total number of neighbors 4


2.SONiC側でsystemctl status bgp.serviceコマンドを打ち、BGPコンテナの状態を確認。
BGPサービスのステータスはactive (running)でBGPコンテナは正常に動作している事が分かる。

admin@jpmtkvmsw98:~$ systemctl status bgp.service
● bgp.service - BGP container
   Loaded: loaded (/lib/systemd/system/bgp.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2021-02-14 13:06:55 JST; 3min 50s ago
 Main PID: 1178 (bgp.sh)
    Tasks: 3 (limit: 2357)
   Memory: 17.6M
   CGroup: /system.slice/bgp.service
           tq1178 /bin/bash /usr/local/bin/bgp.sh wait
           tq1179 /bin/bash /usr/bin/bgp.sh wait
           mq1180 python3 /usr/local/bin/container wait bgp
admin@jpmtkvmsw98:~$


3.そして、systemctl restart bgp.serviceコマンドを打ち、BGPコンテナを再起動させた。
コマンドの実行後20秒前後でプロンプトが返ってくる。
その間もCumulus VXはPingを打ち続けている。

admin@jpmtkvmsw98:~$ sudo systemctl restart bgp.service
admin@jpmtkvmsw98:~$ 


4.通信断発生中の、BGPテーブルの内容
Tera Termをもう1枚立ち上げてSONiCにSSHログイン。そしてBGPテーブルの内容を確認。
BGPコンテナが立ち上がっていない状態では、BGPテーブル等BGPの状態確認のコマンドが叩けないようだ。
systemctl start bgp.serviceコマンドを打ち、手動でBGPを立ち上げる必要が有る。

admin@jpmtkvmsw98:~$ show ip bgp summary
Error response from daemon: Container cda6e6daf09cb1092040979cfc8a0660d1145c5b65229f0dac641132de42ee3b is not running
Usage: show ip bgp summary [OPTIONS]
Try "show ip bgp summary -h" for help.

Error: bgp summary from bgp container not in json format
admin@jpmtkvmsw98:~$


以下はCumulus VX側(jpmtkvmsw99)のBGPテーブルの内容。
ステータスがActiveで止まっている。

cumulus@jpmtkvmsw99:mgmt:~$ net show bgp summary
show bgp ipv4 unicast summary
=============================
BGP router identifier 10.1.1.99, local AS number 65099 vrf-id 0
BGP table version 6
RIB entries 9, using 1728 bytes of memory
Peers 4, using 85 KiB of memory

Neighbor              V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd
jpmtkvmsw98(10.0.0.0) 4      65098        21        20        0    0    0 00:00:10       Active
jpmtkvmsw98(10.0.0.2) 4      65098        24        22        0    0    0 00:00:10       Active
jpmtkvmsw98(10.0.0.4) 4      65098        23        22        0    0    0 00:00:10       Active
10.1.1.98             4      65098         0         0        0    0    0    never       Active

Total number of neighbors 4


以下はCumulus VX側(jpmtkvmsw97)のBGPテーブルの内容。
こちらも、上のjpmtkvmsw99と同じく、ステータスがActiveで止まっている。

cumulus@jpmtkvmsw97:mgmt:~$ net show bgp summary
show bgp ipv4 unicast summary
=============================
BGP router identifier 10.1.1.97, local AS number 65097 vrf-id 0
BGP table version 5
RIB entries 9, using 1728 bytes of memory
Peers 4, using 85 KiB of memory

Neighbor               V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd
jpmtkvmsw98(10.0.0.6)  4      65098        22        18        0    0    0 00:00:14       Active
jpmtkvmsw98(10.0.0.8)  4      65098        22        18        0    0    0 00:00:14       Active
jpmtkvmsw98(10.0.0.10) 4      65098        22        18        0    0    0 00:00:14       Active
10.1.1.98              4      65098         0         0        0    0    0    never       Active

Total number of neighbors 4


5.Pingが再び通り始めた後、SONiCにてBGPテーブルを確認。
BGPコンテナの再起動前と同じく、2台のLeafスイッチ(jpmtkvmsw99とjpmtkvmsw97)との間でBGPピアの関係が確立出来ている。

admin@jpmtkvmsw98:~$ show ip bgp summary

IPv4 Unicast Summary:
BGP router identifier 10.1.1.98, local AS number 65098 vrf-id 0
BGP table version 5
RIB entries 9, using 1728 bytes of memory
Peers 7, using 152712 KiB of memory
Peer groups 2, using 128 bytes of memory

Neighbhor      V     AS    MsgRcvd    MsgSent    TblVer    InQ    OutQ  Up/Down    State/PfxRcd    NeighborName
-----------  ---  -----  ---------  ---------  --------  -----  ------  ---------  --------------  -------------------
10.0.0.1       4  65099          6          9         0      0       0  00:00:18   2               CUMULUS-VX-99-PATH1
10.0.0.3       4  65099          6          9         0      0       0  00:00:18   2               CUMULUS-VX-99-PATH2
10.0.0.5       4  65099          6          9         0      0       0  00:00:18   2               CUMULUS-VX-99-PATH3
10.0.0.7       4  65097          6          9         0      0       0  00:00:18   2               CUMULUS-VX-97-PATH1
10.0.0.9       4  65097          6          9         0      0       0  00:00:18   2               CUMULUS-VX-97-PATH2
10.0.0.11      4  65097          6          9         0      0       0  00:00:18   2               CUMULUS-VX-97-PATH3
10.1.1.99      4  65099          0          0         0      0       0  never      Active          CUMULUS-VX-99-LO

Total number of neighbors 7
admin@jpmtkvmsw98:~$


以下はCumulus VX側(jpmtkvmsw99)のBGPテーブルの内容。
Spineスイッチ(jpmtkvmsw98)との間でBGPピアの関係が確立出来た。

cumulus@jpmtkvmsw99:mgmt:~$ net show bgp summary
show bgp ipv4 unicast summary
=============================
BGP router identifier 10.1.1.99, local AS number 65099 vrf-id 0
BGP table version 6
RIB entries 9, using 1728 bytes of memory
Peers 4, using 85 KiB of memory

Neighbor              V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd
jpmtkvmsw98(10.0.0.0) 4      65098        30        26        0    0    0 00:00:19            3
jpmtkvmsw98(10.0.0.2) 4      65098        33        28        0    0    0 00:00:19            3
jpmtkvmsw98(10.0.0.4) 4      65098        32        28        0    0    0 00:00:19            3
10.1.1.98             4      65098         0         0        0    0    0    never       Active

Total number of neighbors 4


以下はCumulus VX側(jpmtkvmsw97)のBGPテーブルの内容。
こちらもSpineスイッチ(jpmtkvmsw98)との間でBGPピアの関係が確立出来た。

cumulus@jpmtkvmsw97:mgmt:~$ net show bgp summary
show bgp ipv4 unicast summary
=============================
BGP router identifier 10.1.1.97, local AS number 65097 vrf-id 0
BGP table version 5
RIB entries 9, using 1728 bytes of memory
Peers 4, using 85 KiB of memory

Neighbor               V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd
jpmtkvmsw98(10.0.0.6)  4      65098        31        24        0    0    0 00:00:21            3
jpmtkvmsw98(10.0.0.8)  4      65098        31        24        0    0    0 00:00:21            3
jpmtkvmsw98(10.0.0.10) 4      65098        31        24        0    0    0 00:00:21            3
10.1.1.98              4      65098         0         0        0    0    0    never       Active

Total number of neighbors 4


SONiC側でsystemctl status bgp.serviceコマンドを打ち、BGPコンテナの状態を確認。
BGPコンテナの再起動前と同じく、BGPサービスのステータスはactive (running)でBGPコンテナは正常に動作している事が分かる。

admin@jpmtkvmsw98:~$ systemctl status bgp.service
● bgp.service - BGP container
   Loaded: loaded (/lib/systemd/system/bgp.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2021-02-14 13:15:50 JST; 27s ago
  Process: 4991 ExecStartPre=/usr/local/bin/bgp.sh start (code=exited, status=0/SUCCESS)
 Main PID: 5069 (bgp.sh)
    Tasks: 3 (limit: 2357)
   Memory: 17.6M
   CGroup: /system.slice/bgp.service
           tq5069 /bin/bash /usr/local/bin/bgp.sh wait
           tq5070 /bin/bash /usr/bin/bgp.sh wait
           mq5071 python3 /usr/local/bin/container wait bgp
admin@jpmtkvmsw98:~$


...ちなみに上記の実験を何度も何度も試行すると、以下のログを吐きBGPコンテナが正常に起動しなくなる。
systemctl restart bgp.serviceコマンド確認すると、failのステータス。
自分の環境では5回以降で多発した。

admin@jpmtkvmsw98:~$ sudo systemctl restart bgp.service
Job for bgp.service failed.
See "systemctl status bgp.service" and "journalctl -xe" for details.
admin@jpmtkvmsw98:~$

admin@jpmtkvmsw98:~$ systemctl status bgp.service
● bgp.service - BGP container
   Loaded: loaded (/lib/systemd/system/bgp.service; enabled; vendor preset: enabled)
   Active: failed (Result: start-limit-hit) since Sun 2021-02-14 11:26:58 JST; 2min 53s ago
  Process: 4762 ExecStartPre=/usr/local/bin/bgp.sh start (code=exited, status=0/SUCCESS)
  Process: 4832 ExecStart=/usr/local/bin/bgp.sh wait (code=exited, status=0/SUCCESS)
  Process: 5875 ExecStop=/usr/local/bin/bgp.sh stop (code=exited, status=0/SUCCESS)
 Main PID: 4832 (code=exited, status=0/SUCCESS)
admin@jpmtkvmsw98:~$


この段階でBGPピアにてnet show bgp summaryコマンドを叩くと、Activeで止まりBGPピアを張れていない事が分かる。

cumulus@jpmtkvmsw99:mgmt:~$ net show bgp summary
show bgp ipv4 unicast summary
=============================
BGP router identifier 10.1.1.99, local AS number 65099 vrf-id 0
BGP table version 8
RIB entries 3, using 576 bytes of memory
Peers 4, using 85 KiB of memory

Neighbor              V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd
jpmtkvmsw98(10.0.0.0) 4      65098        41        33        0    0    0 00:06:57       Active
jpmtkvmsw98(10.0.0.2) 4      65098        42        33        0    0    0 00:06:57       Active
jpmtkvmsw98(10.0.0.4) 4      65098        42        33        0    0    0 00:06:57       Active
10.1.1.98             4      65098         0         0        0    0    0    never       Active

Total number of neighbors 4



確認結果
上記の手順を3回試行した結果、3回全てで通信断が発生した。
通信断時間はそれぞれ 22秒、15秒、19秒だった。
あれれ? 思っていたより長い印象だが、NSF(Non Stop Forwarding)ではないからこんなものなのかな。


Cold Boot実行時
最後に、jpmtkvmsw99からjpmtkvmsw97に対し1秒間隔でPing連射しながら、SONiCにてsudo rebootコマンドを打ち、SONiCを再起動させてみた。
こちらも3回実行した。通信断の発生時間は147秒、156秒、142秒といった感じで2分30秒前後も発生した。
確かに、SONiCの再起動時と比較するとBGPコンテナの再起動時の方が断時間は圧倒的に短い。


参照先など
開発者および先達の皆さまに感謝。
https://azure.github.io/SONiC/ SONiC
https://github.com/Azure/SONiC/wiki/Configuration SONiC Configuration
https://cumulusnetworks.com/ Cumulus Linux
https://github.com/Azure/SONiC/blob/master/doc/warm-reboot/swss_warm_restart.md
https://github.com/Azure/SONiC/blob/master/doc/warm-reboot/SONiC_Warmboot.md
https://github.com/Azure/SONiC/wiki/Architecture SONiC System Architecture
https://www.youtube.com/watch?v=TjD7PEB3jvg SONiC – Reliability,Manageability and Extensibility

https://debslink.hatenadiary.jp/entry/20210131/1612091391 SONiCを少しかじってみた
https://debslink.hatenadiary.jp/entry/20201206/1607231451 Virtualbox + Cumulus VXでIP Clos構成を組んでみた
https://debslink.hatenadiary.jp/entry/20210822/1629600666 SONiCとCumulus LinuxでBGP unnumbered
https://debslink.hatenadiary.jp/entry/20210902/1630584311 SONiCとCumulus LinuxでBGP/EVPN/VXLAN
https://debslink.hatenadiary.jp/entry/20210912/1631418907 SONiCとCumulus Linuxで4byte ASなBGP + IP Clos構成
https://debslink.hatenadiary.jp/entry/20220122/1642852049 SONiCでL2 MC-LAGを組んでみた