Skip to content

[fdb] Add New Line Between V4/V6 Addresses In FDb Template#2109

Merged
liat-grozovik merged 1 commit intosonic-net:masterfrom
stepanblyschak:fdb_template-fix
Aug 17, 2020
Merged

[fdb] Add New Line Between V4/V6 Addresses In FDb Template#2109
liat-grozovik merged 1 commit intosonic-net:masterfrom
stepanblyschak:fdb_template-fix

Conversation

@stepanblyschak
Copy link
Contributor

@stepanblyschak stepanblyschak commented Aug 14, 2020

vlan interface has now IPv6 address, so fdb.j2 renders all fdb info in one line and fdb_info.txt parser logic fails with below error. To fix this issue, a new line added between addresses in the template.

Otherwise, fdb_mac_expire test fails:
expire_test.FdbMacExpireTest ... ERROR",
"",
"======================================================================",
"ERROR: fdb_mac_expire_test.FdbMacExpireTest",
"----------------------------------------------------------------------",
"Traceback (most recent call last):",
" File "ptftests/fdb_mac_expire_test.py", line 35, in runTest",
" self.populateFdb()",
" File "ptftests/fdb_mac_expire_test.py", line 23, in populateFdb",
" self.fdb = fdb.Fdb(self.fdb_info)",
" File "ptftests/fdb.py", line 18, in init",
" self._vlan_dict[prefix] = [int(i) for i in entry[1].split()]",
"ValueError: invalid literal for int() with base 10: 'fc02:1000::/64'",
"",
"----------------------------------------------------------------------",

because, v4 and v6 in rendered template is on the same line, while test
will expect it on another line.

Signed-off-by: Stepan Blyschak [email protected]

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

Otherwise, fdb_mac_expire test fails:
expire_test.FdbMacExpireTest ... ERROR",
"",
"======================================================================",
"ERROR: fdb_mac_expire_test.FdbMacExpireTest",
"----------------------------------------------------------------------",
"Traceback (most recent call last):",
"  File \"ptftests/fdb_mac_expire_test.py\", line 35, in runTest",
"    self.populateFdb()",
"  File \"ptftests/fdb_mac_expire_test.py\", line 23, in populateFdb",
"    self.fdb = fdb.Fdb(self.fdb_info)",
"  File \"ptftests/fdb.py\", line 18, in __init__",
"    self._vlan_dict[prefix] = [int(i) for i in entry[1].split()]",
"ValueError: invalid literal for int() with base 10: 'fc02:1000::/64'",
"",
"----------------------------------------------------------------------",

because, v4 and v6 in rendered template is on the same line, while test
will expect it on another line.

Signed-off-by: Stepan Blyschak <[email protected]>
Copy link
Contributor

@tahmed-dev tahmed-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest change the title to what the PR does and in the details adds why rationale.

Title could be '[fdb] Add New Line Between V4/V6 Addresses In FDb Template'

@stepanblyschak stepanblyschak changed the title [fdb.j2] fix template, since Vlan has more than one IP address [fdb] Add New Line Between V4/V6 Addresses In FDb Template Aug 16, 2020
@bingwang-ms
Copy link
Collaborator

#2103 addressed the same issue. Only IPv4 address is collected. Which method do you prefer?

@liat-grozovik liat-grozovik merged commit 11d03dc into sonic-net:master Aug 17, 2020
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
includes:

320591a [DualToR] Handle race condition between tunnel_decap and mux orchestrator (sonic-net#2114)
5027a8f Handling Invalid CRM configuration gracefully (sonic-net#2109)
0b120fa [ci]: use native arm64 and armhf pool (sonic-net#2013)
394e88a Don't handle buffer pool watermark during warm reboot reconciling (sonic-net#1987)
9008a01 patch for issue sonic-net#1971 - enable Rx Drop handling for cisco-8000 (sonic-net#2041)
2723ee3 create debug_shell_enable config to enable debug shell (sonic-net#2060)
d7be0b9 [request parser] Add unit tests for request parser for multiple values (sonic-net#1766)
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
a6d35de Handling Invalid CRM configuration gracefully (sonic-net#2109)
d6559e6 [Mellanox] '_8lane' not added to Mellanox 5xxx models with 800G (sonic-net#2090)
45551b2 [vnetorch] Advertise vnet tunnel routes (sonic-net#2058)
ed58d2f Add initial value for weight in overlay nexthops (sonic-net#2096)
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
6562ad3 (HEAD -> 202111, origin/202111) [sfpshow][recycle_port] sfpshow script needs to skip recycle ports (sonic-net#2109)
f184a61 Update `config mirror_session` CLI to support heximal gre type value (sonic-net#2095)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants