Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sflow] Fix ansible test problems caused by enabling sflow #1252

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

[sflow] Fix ansible test problems caused by enabling sflow #1252

wants to merge 1 commit into from

Commits on Apr 10, 2020

  1. [sflow] Fix ansible test problems caused by enabling sflow

    What I did
    To fix the issue that adding sflow packet-sample rule will cause COPP write error log repeatedly.
    
    Why I did it
    After adding the sflow packet-sample rule in COPP config, COPP will repeatedly write error log when user changes the config each time. Until sflow enable. The error log will cause loganalyzer of pytest-ansible raise the error then all test will be failed. By SAI definition and sflow HLD, the rule (SAI_HOSTIF_TRAP_TYPE_SAMPLEPACKET) used to create genlink for hsflowd not used to trap packet to CPU. So it can be directly set without waiting sflow enable. (By current code logic it doesn't consider to undo when sflow changed from enable to disable. It shall be not correct.)
    
    How I verified it
    Add the rule in copp json file.
    * When sflow is disable, confirm no any packet will be trap to CPU.
    * Confirmed no error log when any config changed.
    * Run COPP ansible and result is passed.
    * Enable sflow global, the packet-sampling is work, colloector recevied sflow packet. Then dislabe, the collector will not received sflow packet.
    * Confirmed interface enable / disable is work. The collector can received sflow packet when enable, and vice versa.
    * Confirmed counter sampling is work too.
    
    Details if related
    
    Signed-off-by: Fred Yu fred_yu@edge-core.com
    fredyu190011 committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    f9aeb47 View commit details
    Browse the repository at this point in the history