Description
Upon changing the Cable length for an interface in config db, buffer_profile is not dynamically created and applied to the interface
Steps to reproduce the issue:
- change cable length for an interface in config db
- create and apply buffer profiles
- Check whether the buffer_profiles got changed for the particular port
Describe the results you received:
- Initial Config :
- Interface : Ethernet1 connected to Spine router
- Localhost : Leafrouter
- Speed : 10000
- Cable length : 300m
- Buffer profile : pg_lossless_10000_300m_profile
127.0.0.1:6379[4]> hget DEVICE_METADATA|localhost type
"LeafRouter"
127.0.0.1:6379[4]> hget PORT|Ethernet1 "speed"
"10000"
127.0.0.1:6379[4]> hgetall "DEVICE_NEIGHBOR|Ethernet1"
1) "name"
2) "ARISTA02T2"
3) "port"
4) "Ethernet1"
127.0.0.1:6379[4]> hget "DEVICE_NEIGHBOR_METADATA|ARISTA02T2" type
"SpineRouter"
127.0.0.1:6379[4]> hget "CABLE_LENGTH|AZURE" Ethernet1
"300m"
127.0.0.1:6379[4]> hgetall "BUFFER_PG|Ethernet1|3-4"
1) "profile"
2) "[BUFFER_PROFILE|pg_lossless_10000_300m_profile]"
- Change the neighbor , create buffer.json file and apply
- Now Ethernet1 is conneced to Tor Router
- create Buffer templates and apply to db
- Check Cable _length and buffer profiles. Here the cable length is changed in db t0 40m , but the Buffer_profile is not selected accordingly. it still holds pg_lossless_10000_300m_profile
127.0.0.1:6379[4]> hget "DEVICE_NEIGHBOR_METADATA|ARISTA02T0" type
"ToRRouter"
127.0.0.1:6379[4]> hset "DEVICE_NEIGHBOR|Ethernet1" "name" "ARISTA02T0"
(integer) 0
sonic-cfggen -d -t /usr/share/sonic/device/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers.json.j2 >/tmp/buffers.json
sonic-cfggen -j /tmp/buffers.json --write-to-db
127.0.0.1:6379[4]> hget "CABLE_LENGTH|AZURE" Ethernet1
"40m"
127.0.0.1:6379[4]> hgetall "BUFFER_PG|Ethernet1|3-4"
1) "profile"
2) "[BUFFER_PROFILE|pg_lossless_10000_300m_profile]"
- When there is change in speed , then using new cable length and speed , the buffer profile gets created . Now 40g_40m profile gets selected
127.0.0.1:6379[4]> hgetall "PORT|Ethernet1"
1) "speed"
2) "10000"
127.0.0.1:6379[4]> hset "PORT|Ethernet1" "speed" 40000
(integer) 0
127.0.0.1:6379[4]> hget "CABLE_LENGTH|AZURE" Ethernet1
"40m"
127.0.0.1:6379[4]> hgetall "BUFFER_PG|Ethernet1|3-4"
1) "profile"
2) "[BUFFER_PROFILE|pg_lossless_40000_40m_profile]"
127.0.0.1:6379[4]>
Describe the results you expected:
When there is change in cable length , the buffer_profile should change accordingly , even though speed is not changed
Output of show version:
showroot@sonic-s6100-01:~# show ver
SONiC Software Version: SONiC.HEAD.159-e69ce25
Distribution: Debian 9.4
Kernel: 4.9.0-5-amd64
Build commit: e69ce25
Build date: Sun Apr 1 12:22:17 UTC 2018
Built by: johnar@jenkins-worker-3
Docker images:
REPOSITORY TAG IMAGE ID SIZE
docker-syncd-brcm-orig latest 21deed7a9544 358.2 MB
docker-syncd-brcm HEAD.159-e69ce25 21deed7a9544 358.2 MB
docker-orchagent-brcm HEAD.159-e69ce25 4402f3397c62 287 MB
docker-orchagent-brcm latest 4402f3397c62 287 MB
docker-lldp-sv2 HEAD.159-e69ce25 bd270863a533 297.1 MB
docker-lldp-sv2 latest bd270863a533 297.1 MB
docker-dhcp-relay HEAD.159-e69ce25 2c61bc6343b1 280.1 MB
docker-dhcp-relay latest 2c61bc6343b1 280.1 MB
docker-database HEAD.159-e69ce25 29a43900455a 278.7 MB
docker-database latest 29a43900455a 278.7 MB
docker-teamd HEAD.159-e69ce25 54378e02e9c3 284.1 MB
docker-teamd latest 54378e02e9c3 284.1 MB
docker-snmp-sv2 HEAD.159-e69ce25 2221dc781ffb 319.2 MB
docker-snmp-sv2 latest 2221dc781ffb 319.2 MB
docker-router-advertiser HEAD.159-e69ce25 5875de6f3bcb 276.4 MB
docker-router-advertiser latest 5875de6f3bcb 276.4 MB
docker-platform-monitor HEAD.159-e69ce25 5a8efa12f3c0 298.3 MB
docker-platform-monitor latest 5a8efa12f3c0 298.3 MB
docker-fpm-quagga HEAD.159-e69ce25 d0832f4b4d35 290.6 MB
docker-fpm-quagga latest d0832f4b4d35 290.6 MB
docker-syncd-brcm-rpc 1 727b7c7712b8 581.9 MB
docker-syncd-brcm-rpc latest 727b7c7712b8 581.9 MB
docker-syncd-brcm latest 727b7c7712b8 581.9 MB
Description
Upon changing the Cable length for an interface in config db, buffer_profile is not dynamically created and applied to the interface
Steps to reproduce the issue:
Describe the results you received:
Describe the results you expected:
When there is change in cable length , the buffer_profile should change accordingly , even though speed is not changed
Output of
show version: