sonic-buildimage/dockers
pavel-shirshov 16e54340b7
[docker-frr]: Use egrep with regexp to match correct TSA rules (#6403)
**- Why I did it**
Earlier today we found a bug in the SONiC TSA implementation.
TSC shows incorrect output (see below) in case we have a route-map which contains TSA route-map as a prefix.
```
admin@str-s6100-acs-1:~$ TSC
Traffic Shift Check:
System Mode: Not consistent
```
The reason is that TSC implementation has too loose regexps in TSA utilities, which match wrong route-map entries:
For example, current TSC matches following
```
route-map TO_BGP_PEER_V4 permit 200
route-map TO_BGP_PEER_V6 permit 200
```
But it should match only
```
route-map TO_BGP_PEER_V4 permit 20
route-map TO_BGP_PEER_V4 deny 30
route-map TO_BGP_PEER_V6 permit 20
route-map TO_BGP_PEER_V6 deny 30
```

**- How I did it**
I fixed it by using egrep with `^` and `$` regexp markers which match begin and end of the line.

**- How to verify it**
1. Add follwing entry to FRR config:
```
str-s6100-acs-1# 
str-s6100-acs-1# conf t
str-s6100-acs-1(config)# route-map TO_BGP_PEER_V4 permit 200 
str-s6100-acs-1(config-route-map)# end
```
2. Use the TSC command and check output. It should show normal.
```
admin@str-s6100-acs-1:~$ TSC
Traffic Shift Check:
System Mode: Normal```
2021-01-14 11:09:16 -08:00
..
docker-base [rsyslog]: Explicitly set the notify mode for rsyslog imfile module (#6351) 2021-01-06 00:00:18 -08:00
docker-base-buster Updated imfile configuration for supervisord logs (#6368) 2021-01-06 18:47:36 -08:00
docker-base-stretch Updated imfile configuration for supervisord logs (#6368) 2021-01-06 18:47:36 -08:00
docker-basic_router [supervisord]: use abspath as supervisord entrypoint (#5995) 2020-11-22 21:18:44 -08:00
docker-config-engine [docker-base-buster][docker-config-engine-buster] No longer install Python 2 (#6162) 2020-12-25 21:29:25 -08:00
docker-config-engine-buster [docker-base-buster][docker-config-engine-buster] No longer install Python 2 (#6162) 2020-12-25 21:29:25 -08:00
docker-config-engine-stretch [docker-base-buster][docker-config-engine-buster] No longer install Python 2 (#6162) 2020-12-25 21:29:25 -08:00
docker-database [docker-base-buster][docker-config-engine-buster] No longer install Python 2 (#6162) 2020-12-25 21:29:25 -08:00
docker-dhcp-relay First cut image update for kubernetes support. (#5421) 2020-12-22 08:01:33 -08:00
docker-fpm-frr [docker-frr]: Use egrep with regexp to match correct TSA rules (#6403) 2021-01-14 11:09:16 -08:00
docker-fpm-gobgp [supervisord]: use abspath as supervisord entrypoint (#5995) 2020-11-22 21:18:44 -08:00
docker-fpm-quagga [Python] Align files in root dir, dockers/ and files/ with PEP8 standards (#6109) 2020-12-03 15:57:50 -08:00
docker-iccpd [supervisord]: use abspath as supervisord entrypoint (#5995) 2020-11-22 21:18:44 -08:00
docker-lldp [docker-lldp]: sonic advertise meaningful SysDescription instead of debian (#6114) 2021-01-06 12:24:57 -08:00
docker-macsec [docker-macsec]: MACsec container and wpa_supplicant component (#5700) 2021-01-10 10:39:59 -08:00
docker-nat [Python] Align files in root dir, dockers/ and files/ with PEP8 standards (#6109) 2020-12-03 15:57:50 -08:00
docker-orchagent [ipinip.json.j2] align mellanox configuration dst_ip with other platforms (#6304) 2020-12-28 20:53:12 -08:00
docker-platform-monitor [Platform][nokia]: python3-smbus package add with python3 and jinja fixes (#6416) 2021-01-12 15:05:06 -08:00
docker-ptf [docker-ptf]: Updating Python-based GNMI client (#6216) 2020-12-17 22:12:04 -08: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 First cut image update for kubernetes support. (#5421) 2020-12-22 08:01:33 -08:00
docker-sflow [Python] Align files in root dir, dockers/ and files/ with PEP8 standards (#6109) 2020-12-03 15:57:50 -08:00
docker-snmp [snmp]: updated to support snmp config from redis configdb (#6134) 2021-01-05 13:43:29 -08:00
docker-sonic-mgmt [docker-sonic-mgmt]: Upgrade Tgen API from 0.0.42 to 0.0.70 (#6275) 2020-12-24 01:53:31 -08:00
docker-sonic-mgmt-framework [docker-base-buster][docker-config-engine-buster] No longer install Python 2 (#6162) 2020-12-25 21:29:25 -08:00
docker-sonic-restapi [supervisord]: use abspath as supervisord entrypoint (#5995) 2020-11-22 21:18:44 -08:00
docker-sonic-telemetry First cut image update for kubernetes support. (#5421) 2020-12-22 08:01:33 -08:00
docker-teamd [supervisord]: use abspath as supervisord entrypoint (#5995) 2020-11-22 21:18:44 -08:00
dockerfile-macros.j2 [sonic-config-engine] Clean up dependencies, pin versions; install Python 3 package in Buster container (#5656) 2020-10-26 13:48:50 -07:00