sonic-net / sonic-buildimage

Scripts which perform an installable binary image build for SONiC
Other
701 stars 1.35k forks source link

[sflow] Command 'config sflow agent-id del' not applied immediately #6952

Open Hedgehog-Guru opened 3 years ago

Hedgehog-Guru commented 3 years ago

Description After the changing IP address used by sflow agent-id and trying to remove it, sflow continues using the previous IP address till the reboot.

Steps to reproduce the issue

  1. Enable sflow;
  2. Configure some reachable collector (via management interface for example);
  3. Check agent-id in exported sflow packets (IP address form switch mgmt0 interface);
  4. Configure agent-id referenced to any other L3 interface'
    config sflow agent-id add Vlan2
  1. Check agent-id in exported sflow packets (IP form new interface configured);

  2. Remove agent-id configuration;

    config sflow agent-id del
  3. Check agent-id in exported sflow packets;

Describe the results you received

The IP address from the previously configured interface is still used

Describe the results you expected Configuration should be applied immediately after cli input.

Output of show version

SONiC Software Version: SONiC.SONIC.202012.10-d26a4af_Internal
Distribution: Debian 10.7
Kernel: 4.19.0-9-2-amd64
Build commit: d26a4aff
Build date: Thu Feb  4 15:28:36 UTC 2021
Built by: sw-r2d2-bot@r-build-sonic-ci02

Platform: x86_64-mlnx_msn3700-r0
HwSKU: ACS-MSN3700
ASIC: mellanox
ASIC Count: 1
Serial Number: MT1852X03965
Uptime: 17:13:23 up  2:20,  3 users,  load average: 2.99, 1.30, 1.04

Docker images:
REPOSITORY                    TAG                                IMAGE ID            SIZE
docker-syncd-mlnx             SONIC.202012.10-d26a4af_Internal   b0775c41d0d0        542MB
docker-syncd-mlnx             latest                             b0775c41d0d0        542MB
docker-snmp                   SONIC.202012.10-d26a4af_Internal   bf1942e39970        438MB
docker-snmp                   latest                             bf1942e39970        438MB
docker-teamd                  SONIC.202012.10-d26a4af_Internal   4b51426a4f11        408MB
docker-teamd                  latest                             4b51426a4f11        408MB
docker-sonic-mgmt-framework   SONIC.202012.10-d26a4af_Internal   c4ed2967823f        616MB
docker-sonic-mgmt-framework   latest                             c4ed2967823f        616MB
docker-nat                    SONIC.202012.10-d26a4af_Internal   6f83852abace        411MB
docker-nat                    latest                             6f83852abace        411MB
docker-router-advertiser      SONIC.202012.10-d26a4af_Internal   d1c9b2a3ba6d        398MB
docker-router-advertiser      latest                             d1c9b2a3ba6d        398MB
docker-platform-monitor       SONIC.202012.10-d26a4af_Internal   2f9ba3b87a75        689MB
docker-platform-monitor       latest                             2f9ba3b87a75        689MB
docker-lldp                   SONIC.202012.10-d26a4af_Internal   57b6b48acc19        437MB
docker-lldp                   latest                             57b6b48acc19        437MB
docker-database               SONIC.202012.10-d26a4af_Internal   0c698fd3d04f        397MB
docker-database               latest                             0c698fd3d04f        397MB
docker-orchagent              SONIC.202012.10-d26a4af_Internal   86241aa41334        425MB
docker-orchagent              latest                             86241aa41334        425MB
docker-dhcp-relay             SONIC.202012.10-d26a4af_Internal   5fa3d131c72f        404MB
docker-dhcp-relay             latest                             5fa3d131c72f        404MB
docker-sonic-telemetry        SONIC.202012.10-d26a4af_Internal   36d5740d7971        471MB
docker-sonic-telemetry        latest                             36d5740d7971        471MB
docker-fpm-frr                SONIC.202012.10-d26a4af_Internal   a34711f7665f        425MB
docker-fpm-frr                latest                             a34711f7665f        425MB
docker-sflow                  SONIC.202012.10-d26a4af_Internal   166cfe57ddd3        408MB
docker-sflow                  latest                             166cfe57ddd3        408MB

sonic_dump_qa-anconda-test10_20210210_171312.tar.gz

padmanarayana commented 3 years ago

This is expected behavior. As mentioned in the HLD, the hsflowd uses simple heuristics to select the agent-id. The agent-id is sticky (even after deletion) until sflow is re-enabled...

anshuv-mfst commented 3 years ago

For changing the behavior, please file an enhancement request.