Skip to content

[test_bgp_multipath_relax] Changed path key due to Frr update#2787

Merged
bingwang-ms merged 1 commit intosonic-net:masterfrom
AndriiLozovyi:update_test_bgp_multipath_relax
Jan 14, 2021
Merged

[test_bgp_multipath_relax] Changed path key due to Frr update#2787
bingwang-ms merged 1 commit intosonic-net:masterfrom
AndriiLozovyi:update_test_bgp_multipath_relax

Conversation

@AndriiLozovyi
Copy link
Contributor

Signed-off-by: Andrii-Yosafat Lozovyi [email protected]

Description of PR

Summary: test_bgp_multipath_relax fails due to updated version of Frr 7.5, and absent keyword 'asPath' in output of cmd vtysh -c 'show ip bgp neighbor 10.0.0.31 adv json'

   "200.0.1.0\/26":{
      "addrPrefix":"200.0.1.0",
      "prefixLen":26,
      "network":"200.0.1.0\/26",
      "nextHop":"0.0.0.0",
      "weight":0,
      "path":"64001 64700",
      "bgpOriginCode":"i",
      "appliedStatusSymbols":{
        "*":true,
        ">":true
      }
    }
  }

E           RunAnsibleModuleFail: run module bgp_route failed, Ansible Results =>
E           {
E               "changed": false, 
E               "failed": true, 
E               "invocation": {
E                   "module_args": {
E                       "direction": "adv", 
E                       "neighbor": "10.0.0.31", 
E                       "prefix": null
E                   }
E               }, 
E               "msg": "cannot correctly parse BGP Routing facts!\n'asPath'"
E           }

Type of change

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

Approach

What is the motivation for this PR?

Fix test_bgp_multipath_relax and make it Pass.

How did you do it?

Changed keyword to 'path'

How did you verify/test it?

Run test_bgp_multipath_relax TC on topo t1

bgp/test_bgp_multipath_relax.py::test_bgp_multipath_relax PASSED

Any platform specific information?

SONiC.master.88-dirty-20210108.105001
Distribution: Debian 10.7
Kernel: 4.19.0-9-2-amd64
Build commit: dbc67184
Build date: Fri Jan 8 10:59:56 UTC 2021
Platform: x86_64-arista_7170_64c
HwSKU: Arista-7170-64C

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

Documentation

@AndriiLozovyi
Copy link
Contributor Author

@yxieca @wangxin could you please take a look?

@SavchukRomanLv
Copy link

SavchukRomanLv commented Jan 12, 2021

@bingwang-ms could you please take a look on this also, I believe the problem is the same.

@lguohan
Copy link
Contributor

lguohan commented Jan 12, 2021

thanks for the fix! since the same test is running for both master and 201911, can you make the test backward compatible? Thank you in advance. for example, check if 'path' key is there, if not then use 'asPath' key?

@lguohan lguohan self-requested a review January 12, 2021 14:09
@bingwang-ms
Copy link
Collaborator

thanks for the fix! since the same test is running for both master and 201911, can you make the test backward compatible? Thank you in advance. for example, check if 'path' key is there, if not then use 'asPath' key?

I have verified that in SONiC.20191130.58.

admin@str-a7060cx-acs-10:~$ vtysh -c 'show ip bgp neighbor 10.0.0.1 adv json'
{
  "bgpTableVersion":9861,
  "bgpLocalRouterId":"10.1.0.32",
  "defaultLocPrf":100,
  "localAS":65100,
  "bgpStatusCodes":{
    "suppressed":"s",
    "damped":"d",
    "history":"h",
    "valid":"*",
    "best":">",
    "multipath":"=",
    "internal":"i",
    "ribFailure":"r",
    "stale":"S",
    "removed":"R"
  },
  "bgpOriginCodes":{
    "igp":"i",
    "egp":"e",
    "incomplete":"?"
  },
  "advertisedRoutes":{
    "10.1.0.32\/32":{
      "addrPrefix":"10.1.0.32",
      "prefixLen":32,
      "network":"10.1.0.32\/32",
      "nextHop":"0.0.0.0",
      "metric":0,
      "weight":32768,
      "asPath":"",
      "path":"",
      "bgpOriginCode":"i",
      "appliedStatusSymbols":{
        "*":true,
        ">":true
      }
    },
    "100.1.0.17\/32":{
      "addrPrefix":"100.1.0.17",
      "prefixLen":32,
      "network":"100.1.0.17\/32",
      "nextHop":"0.0.0.0",
      "weight":0,
      "asPath":"64001",
      "path":"64001",
      "bgpOriginCode":"i",
      "appliedStatusSymbols":{
        "*":true,
        ">":true
      }
    },
    "100.1.0.18\/32":{
      "addrPrefix":"100.1.0.18",
      "prefixLen":32,
      "network":"100.1.0.18\/32",
      "nextHop":"0.0.0.0",
      "weight":0,
      "asPath":"64002",
      "path":"64002",
      "bgpOriginCode":"i",
      "appliedStatusSymbols":{
        "*":true,
        ">":true
      }
    },

We can see that both path and aspath exist. So I think it's OK to keep backward compatible.

@bingwang-ms
Copy link
Collaborator

@lguohan Can I merge this PR if you don't have other concerns?

@bingwang-ms bingwang-ms merged commit db52317 into sonic-net:master Jan 14, 2021
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…atically (sonic-net#14752)

src/sonic-utilities

* ece22b7d - (HEAD -> 202205, origin/202205) Revert "[GCU] Add PFC_WD RDMA validator  (sonic-net#2781)" (4 minutes ago) [Ying Xie]
* 7d16b184 - Remove the no use new line in show version (sonic-net#2792) (21 hours ago) [xumia]
* 3a880a2b - Support to display the SONiC OS Version in the command show version (sonic-net#2787) (21 hours ago) [xumia]
* a5199f75 - [voq][chassis][generate_dump] [BCM] Dump only the relevant BCM commands for fabric cards (sonic-net#2606) (21 hours ago) [saksarav-nokia]
* 2410d364 - Fixed a bug in "show vnet routes all" causing screen overrun. (sonic-net#2644) (sonic-net#2801) (
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