sonic-buildimage/dockers
pavel-shirshov 89184038fd
[docker-fpm-frr]: Start bgpd after zebra was started (#5038)
fixes https://github.com/Azure/sonic-buildimage/issues/5026
Explanation:
In the log from the issue I found:
```
I see following in the log
Jul 22 21:13:06.574831 vlab-01 WARNING bgp#bgpd[49]: [EC 33554499] sendmsg_nexthop: zclient_send_message() failed
```
Analyzing source code I found that the error message could be issues only when `zclient_send_rnh()` return less than 0.
```
	ret = zclient_send_rnh(zclient, command, p, exact_match,
			       bnc->bgp->vrf_id);
	/* TBD: handle the failure */
	if (ret < 0)
		flog_warn(EC_BGP_ZEBRA_SEND,
			  "sendmsg_nexthop: zclient_send_message() failed");
```
I checked [zclient_send_rnh()](88351c8f6d/lib/zclient.c (L654)) and found that this function will return the exit code which the function gets from [zclient_send_message()](88351c8f6d/lib/zclient.c (L266)) But the latter function could return not 0 in two cases:
1.	bgpd didn’t connect to the zclient socket yet [code](88351c8f6d/lib/zclient.c (L269))
2.	The socket was closed. But in this case we would receive the error message in the log. (And I can find the message in the log when we reboot sonic) [code](88351c8f6d/lib/zclient.c (L277))

Also I see from the logs that client connection was set later we had the issue in bgpd.

Bgpd.log
```
Jul 22 21:13:06.574831 vlab-01 WARNING bgp#bgpd[49]: [EC 33554499] sendmsg_nexthop: zclient_send_message() failed
```
Vs
Zebra.log
```
Jul 22 21:13:12.713249 vlab-01 NOTICE bgp#zebra[48]: client 25 says hello and bids fair to announce only static routes vrf=0
Jul 22 21:13:12.820352 vlab-01 NOTICE bgp#zebra[48]: client 30 says hello and bids fair to announce only bgp routes vrf=0
Jul 22 21:13:12.820352 vlab-01 NOTICE bgp#zebra[48]: client 33 says hello and bids fair to announce only vnc routes vrf=0
```
So in our case we should start zebra first. Wait until it is started and then start bgpd and other daemons.

**- How I did it**

I changed a graph to start daemons in the following order:
1. First start zebra
2. Then starts staticd and bgpd
3. Then starts vtysh -b and bgpeoi after bgpd is started.
2020-07-25 03:48:47 -07:00
..
docker-base [apt] Instruct apt-get to NOT check the "Valid Until" date in Release files (#3973) 2020-01-07 15:52:49 -08:00
docker-base-buster [build][arm] Adding a backport source to arm to resolve docker-base-stretch install redis-tools=5:5.0.3-3~bpo9+2 failure issue (#4950) 2020-07-15 12:23:20 -07:00
docker-base-stretch [build][arm] Adding a backport source to arm to resolve docker-base-stretch install redis-tools=5:5.0.3-3~bpo9+2 failure issue (#4950) 2020-07-15 12:23:20 -07:00
docker-basic_router Remove extra trailing newlines at EOF (#804) 2017-07-12 20:54:37 -07:00
docker-config-engine Remove unused packages in docker images and host (#2807) 2019-04-29 17:21:24 -07:00
docker-config-engine-buster [mgmt-framework]: convert mgmt-framework to use buster docker (#4480) 2020-04-28 15:57:13 -07:00
docker-config-engine-stretch [build]: Improve dockerfile instructions (#3048) 2019-06-22 11:26:23 -07:00
docker-database [sonic-buildimage] Changes to make network specific sysctl common for both host and docker namespace (#4838) 2020-07-12 18:08:51 +00:00
docker-dhcp-relay [dockers] Update critical_processes file syntax (#4831) 2020-06-25 21:18:21 -07:00
docker-fpm-frr [docker-fpm-frr]: Start bgpd after zebra was started (#5038) 2020-07-25 03:48:47 -07:00
docker-fpm-gobgp [dockers] Update critical_processes file syntax (#4831) 2020-06-25 21:18:21 -07:00
docker-fpm-quagga [dockers] Update critical_processes file syntax (#4831) 2020-06-25 21:18:21 -07:00
docker-iccpd [docker-iccpd]: Upgrade docker-iccpd to buster (#4984) 2020-07-18 00:12:59 -07:00
docker-lldp [docker] Correct the lldp-syncd program name in critical_process file. (#4862) 2020-06-28 11:08:30 -07:00
docker-nat [docker-nat]: upgrade docker-nat to buster (#4943) 2020-07-15 22:48:09 -07:00
docker-orchagent [orchagent]: Fix platform string export. (#4993) 2020-07-18 00:05:10 -07:00
docker-platform-monitor [dockers] update mellanox syncd and pmon to buster (#4818) 2020-07-18 03:46:15 -07:00
docker-ptf [docker-ptf] add gnmi python client (#4928) 2020-07-12 18:08:52 +00:00
docker-ptf-saithrift [docker-ptf-*]: Use buildimage infrastructure to build docker-ptf-* (#638) 2017-05-26 17:18:11 -07:00
docker-router-advertiser [dockers] Update critical_processes file syntax (#4831) 2020-06-25 21:18:21 -07:00
docker-sflow [docker-sflow]: upgrade docker-sflow on buster (#4904) 2020-07-12 18:08:52 +00:00
docker-snmp [dockers] Update critical_processes file syntax (#4831) 2020-06-25 21:18:21 -07:00
docker-sonic-mgmt [mgmt docker] move pycryptodome installation to the end of the docker building (#4917) 2020-07-12 18:08:52 +00:00
docker-sonic-mgmt-framework [mgmt-framework] Call sonic-cfggen Once (#4937) 2020-07-12 18:08:52 +00:00
docker-sonic-restapi [dockers] Update critical_processes file syntax (#4831) 2020-06-25 21:18:21 -07:00
docker-sonic-telemetry [telemetry] Fix telemetry vars template path (#4938) 2020-07-12 18:08:52 +00:00
docker-teamd [docker-team]: upgrade docker-teamd to buster (#4914) 2020-07-12 18:08:52 +00:00
dockerfile-macros.j2 Convert docker-snmp-sv2 to buster (#4529) 2020-05-14 10:23:37 -07:00