sonic-sairedis icon indicating copy to clipboard operation
sonic-sairedis copied to clipboard

Fix for [EVPN] When MAC moves from remote end point to local, ASIC DB fields are not updated properly for the mac #11503Update NotificationProcessor.cpp

Open anilkpan opened this issue 2 years ago • 16 comments

Issue: When a mac moves from remote to local, the local mac is set in ASIC db using hset, which updates common fields, but does not remove fields specific to remote mac.

Fix: In case of a mac move event, remove the existing FDB entry from ASIC DB first and then set the new one.

anilkpan avatar Aug 30 '22 22:08 anilkpan

@kcudnik Can you please review?

dgsudharsan avatar Aug 31 '22 04:08 dgsudharsan

I will work on adding the PTF test for mac move. ETA end of the month.

anilkpan avatar Sep 02 '22 20:09 anilkpan

please satisfy code coverage via unittests

kcudnik avatar Sep 13 '22 12:09 kcudnik

I will work on adding the PTF test for mac move. ETA end of the month.

Hi @anilkpan Not sure if PTF tests will satisfy the coverage. I believe you need to add gtest here. Can you please check?

dgsudharsan avatar Sep 14 '22 19:09 dgsudharsan

yes i was suggesting to add tests unittests here

kcudnik avatar Sep 15 '22 07:09 kcudnik

I will work on adding the PTF test for mac move. ETA end of the month.

Hi @anilkpan Not sure if PTF tests will satisfy the coverage. I believe you need to add gtest here. Can you please check?

@dgsudharsan, i will start working on adding the unittest next week.

anilkpan avatar Sep 16 '22 23:09 anilkpan

@anilkpan Can you please provide ETA for UT?

dgsudharsan avatar Sep 28 '22 20:09 dgsudharsan

@dgsudharsan, I have coded the gtest for this scenario. Is there a document that describes how to run the tests locally?

anilkpan avatar Sep 28 '22 22:09 anilkpan

@dgsudharsan, I have coded the gtest for this scenario. Is there a document that describes how to run the tests locally?

@kcudnik Can you please help here?

dgsudharsan avatar Oct 08 '22 16:10 dgsudharsan

@dgsudharsan, I have coded the gtest for this scenario. Is there a document that describes how to run the tests locally?

@kcudnik Can you please help here?

to run locally go to the desired directory and type "make check" and it will run all tests

kcudnik avatar Oct 09 '22 17:10 kcudnik

@dgsudharsan, I have coded the gtest for this scenario. Is there a document that describes how to run the tests locally?

@kcudnik Can you please help here?

to run locally go to the desired directory and type "make check" and it will run all tests

Thanks @kcudnik, i will try this.

anilkpan avatar Oct 11 '22 21:10 anilkpan

@kcudnik, 'make check' seems to need libsaimetadata.so.0, which was not built. Any ideas what I am missing?

make check-TESTS make[1]: Entering directory '/home/anilkpandey/sonic-buildimage/src/sonic-sairedis/lib' /home/anilkpandey/sonic-buildimage/src/sonic-sairedis/lib/.libs/tests: error while loading shared libraries: libsaimetadata.so.0: cannot open shared object file: No such file or directory FAIL: tests

1 of 1 test failed

Makefile:1592: recipe for target 'check-TESTS' failed

anilkpan avatar Oct 17 '22 18:10 anilkpan

hmm, it should be build, can you type "make" first in top directory to build everyting ?

kcudnik avatar Oct 17 '22 18:10 kcudnik

@anilkpan Can you please provide ETA of adding the coverage?

dgsudharsan avatar Oct 28 '22 17:10 dgsudharsan

@dgsudharsan, I plan to add the test by end of next week.

anilkpan avatar Oct 28 '22 21:10 anilkpan

need to check why the test is failing, will take few more days.

anilkpan avatar Nov 04 '22 23:11 anilkpan

@anilkpan Is there any update on this PR?

dgsudharsan avatar Nov 21 '22 16:11 dgsudharsan

@dgsudharsan, The test is failing. Is the syslog or the core dump available for the test run so that I can debug the failure?

anilkpan avatar Nov 21 '22 21:11 anilkpan

@dgsudharsan, The test is failing. Is the syslog or the core dump available for the test run so that I can debug the failure?

@vivekrnv Can you please help here?

dgsudharsan avatar Nov 23 '22 04:11 dgsudharsan

@dgsudharsan, The test is failing. Is the syslog or the core dump available for the test run so that I can debug the failure?

Hi, There must be a test binary/executable found after you run make. invoke the binary with gdb to drop into a shell. Set breakpoints in you code and debug. Additionally you can use --gtest_filter to only run the test you want to check.

vivekrnv avatar Nov 23 '22 05:11 vivekrnv

@anilkpan Were you able to proceed? Can you please provide ETA?

dgsudharsan avatar Dec 01 '22 16:12 dgsudharsan

Thanks @vivekrnv. @dgsudharsan, I have added the fix, checks look good so far.

anilkpan avatar Dec 02 '22 23:12 anilkpan

@kcudnik Can we merge this?

dgsudharsan avatar Dec 13 '22 23:12 dgsudharsan

Request for 202211 branch

dgsudharsan avatar Dec 14 '22 00:12 dgsudharsan

@prsunny @yxieca Can we add label for 202205 and 202211 for this PR?

dgsudharsan avatar Dec 15 '22 02:12 dgsudharsan

@anilkpan, @dgsudharsan this change cannot be cherry-picked cleanly. Please open new PR.

yxieca avatar Dec 15 '22 19:12 yxieca

@anilkpan Can you please raise a separate PR for 202205?

dgsudharsan avatar Dec 16 '22 19:12 dgsudharsan

@dgsudharsan, working on it, ETA 12/22

anilkpan avatar Dec 16 '22 23:12 anilkpan

@dgsudharsan, created PR https://github.com/sonic-net/sonic-sairedis/pull/1173 on 202205 branch.

anilkpan avatar Dec 19 '22 19:12 anilkpan