openconfig / ondatra

54 stars 37 forks source link

Data type mismatch error while running RT1.3 test #57

Closed cprabha closed 1 year ago

cprabha commented 1 year ago

Hi,

We are getting below error while running RT1.3 test with latest ondatra repo. Please could you check .

route_propagation_test.go:317: Await(t) on ate(10.48.16.92) at &{{NetworkInstance_Protocol_Bgp_Rib_AfiSafi_Ipv4Unicast_Neighbor_AdjRibInPre_Route true 0xc0020e1650 0x8b92b00 0x8b92ba0 0xc00212bf20 true}}: error receiving gNMI response: failed to render notifications: cannot represent field value [0xc001e70f60] as TypedValue for path /network-instances/network-instance[name=port2]/protocols/protocol[identifier=BGP][name=0]/bgp/rib/attr-sets/attr-set[index=0]/as-path/as-segment: invalid type ptr in leaflist

Script link: https://github.com/openconfig/featureprofiles/blob/main/feature/bgp/addpath/ate_tests/route_propagation_test/route_propagation_test.go

Code:

if prefix.v4 != "" { _, found := gnmi.Watch(t, ate, rib.AfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST).Ipv4Unicast(). Neighbor(tc.ate.Port2Neighbor). AdjRibInPre(). Route(prefix.v4, 0). AttrIndex().State(), 1time.Minute, func(i ygnmi.Value[uint64]) bool { return i.IsPresent() }).Await(t)

Thanks, Prabha

greg-dennis commented 1 year ago

This is effectively the same issue as https://github.com/openconfig/ondatra/issues/45 We are still waiting on this PR https://github.com/openconfig/public/pull/750#issuecomment-1334429655 But we can do a temporary workaround that is a workaround for the time being.

cprabha commented 1 year ago

Thanks Greg for sharing the details. Please could you share the workaround.

greg-dennis commented 1 year ago

The latest merge should fix this issue. Please let me know if it does not.

cprabha commented 1 year ago

Hi Greg,

I have taken latest go.mod (github.com/openconfig/ondatra v0.0.0-20221202185001-1b90e33d211b) and still seeing issue. Please could you let me know the workaround, i will update my locate repo .

Thanks, Prabha

greg-dennis commented 1 year ago

@cprabha, I meant that the latest Ondatra commit has the fix. Can you update Ondatra independently of featureprofiles and try it? I can proceed to update featureprofiles separately.

cprabha commented 1 year ago

Hi Greg,

I have taken "git clone https://github.com/openconfig/ondatra" and updated all files in "/root//go/pkg/mod/github.com/openconfig/ondatra@v0.0.0-20221202185001-1b90e33d211b " .

Script is still failing, is there anything we need to update apart from ondatra files?

Thanks, Prabha

greg-dennis commented 1 year ago

In your featureprofiles directory, can you run?

go get -u github.com/openconfig/ondatra
go mod tidy
cprabha commented 1 year ago

Hi Greg,

I tried steps which have shared and able to update ondatra repo. But observed ATE RIB call did not retrieve prefix information , ( I could see ATE has received routes ). and test keeps failing but not with data type mismatch instead prefix not found error.

Thanks, Prabha

cprabha commented 1 year ago

Hi Greg,

Is there a older version ondatra repo which does not have these changes ? which i can update in my go.mod and get passed log for this script ?

Thanks, Prabha

cprabha commented 1 year ago

Hi Greg,

please could you help with this ?

Thanks, Prabha

greg-dennis commented 1 year ago

@cprabha, I'm going to need more information to determine whether there is any problem here. Nothing changed with respect to the other logic, and the unit tests and other integration tests are still passing on our end. Could you please file a new issue that includes at least (1) logging the path the value of rib.AfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST).Ipv4Unicast().Neighbor(tc.ate.Port2Neighbor).AdjRibInPre().Route(prefix.v4, 0).AttrIndex() so I can see the fully-qualified path; and (2) a screenshot of the learned info / received routes by the ATE. Thanks!

cprabha commented 1 year ago

Thanks @greg-dennis I have opened https://github.com/openconfig/ondatra/issues/59 with the error and path details. Please check.

Thanks, Prabha