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

RCA is When we are deleting the agent-id, hsflowd is referring to eth0 #9766

Conversation

Gokulnath-Raja
Copy link
Contributor

Why I did it
For sflow_bug#13407: After migration of hsflowd version v2.0.51-26, When we are deleting the agent-id, hsflowd is referring for the eth0 interface and expecting samples in that interface.
(This is with the updated hsflowd , When you start hsflowd with no explicit agent-id configured, it will run an "election" to decide which IP address to adopt.)

How I did it
Modified the script to check for mgmt_ip.

How to verify it
Post upgrade to latest version of hsflowd, run the script and make sure that it passes.

Signed-off-by: Gokulnath-Raja Gokulnath_R@dell.com
Co-authored-by: mohanapriya-meganathan mohanapriya.m1@dell.com

Back port request

  • 201911
  • 202012
  • 202205

Script Log
test_sflow_log.txt

…e eth0 interface and expecting samples in that interface.

(This is with the updated hsflowd , When you start hsflowd with no explicit agent-id configured, it will run an "election" to decide which IP address to adopt.)
Signed-off-by: Gokulnath-Raja <Gokulnath_R@dell.com>
Co-authored-by: mohanapriya-meganathan <mohanapriya.m1@dell.com>
@@ -474,7 +474,7 @@ def testDelAgent(self, duthost, partial_ptf_runner):
# Verify whether the samples are received with previously configured agent ip
partial_ptf_runner(
polling_int=20,
agent_id=var['lo_ip'],
agent_id=var['mgmt_ip'],
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a change of behavior. Is this documented in the hsflowd release notes?

Choose a reason for hiding this comment

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

As per this commit , When dynamic agent or agentIP override is removed, revert to automati… · sflow/host-sflow@7cb2b83 (github.com) and as per the discussion sflow/host-sflow#49 (comment) , whenever the agent-id is removed, agent IP address chosen should be unique persistent and reachable and it can reach to the collector IP. Currently when we are executing this script we got this below error,
image

After upgrading to 2.0.41, when the agent-id is deleted, it is expecting the management ip is the next preferred elected address to reach to the collector as per this script. So, we modified as per the behavior.
Attached the failed logs for more information.
test_sflow.log

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like a hsflowd behavioral change. As long as it is documented, I am fine. @prsunny @padmanarayana FYI

@dgsudharsan
Copy link
Contributor

@yxieca @prsunny Can you please review and signoff?

@prsunny prsunny merged commit ade55bc into sonic-net:master Sep 14, 2023
12 checks passed
@nhe-NV
Copy link
Contributor

nhe-NV commented Oct 11, 2023

I see the test failed after this PR is merged. opened a issue: #10291

mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Oct 24, 2023
…e eth0 interface and expecting samples in that interface. (sonic-net#9766)

(This is with the updated hsflowd , When you start hsflowd with no explicit agent-id configured, it will run an "election" to decide which IP address to adopt.)
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202305: #10446

mssonicbld pushed a commit that referenced this pull request Oct 25, 2023
…e eth0 interface and expecting samples in that interface. (#9766)

(This is with the updated hsflowd , When you start hsflowd with no explicit agent-id configured, it will run an "election" to decide which IP address to adopt.)
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Jan 25, 2024
…e eth0 interface and expecting samples in that interface. (sonic-net#9766)

(This is with the updated hsflowd , When you start hsflowd with no explicit agent-id configured, it will run an "election" to decide which IP address to adopt.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants