sonic-net / sonic-buildimage

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

Sflow configurations cannot be removed with SONiC CLI commands #20327

Open mhen1 opened 2 months ago

mhen1 commented 2 months ago

Description

When configuring sflow on a switch, the entries of sflow in the redis db (SFLOW, SFLOW_SESSION, ...) are registered in the redis db and cannot be removed by using any cli commands (disabling sflow feature, disabling it on a specific interface or even killing the process).

Steps to reproduce the issue:

  1. Configure sflow on the switch, for example, sudo config sflow polling-interval 5 or config sflow interface enable Ethernet128

  2. Look at the configuration in the redis db (via sonic-cfggen -d --print-data): "SFLOW": { "global": { "admin_state": "down", "polling_interval": "5" } } "SFLOW_SESSION": { "Ethernet128": { "admin_state": "up" } },

  3. Deleting the configuration via CLI is impossible (disabling the feature in general or in the enabled interface).

Describe the results you received:

Enabling and disabling the feature only allows setting the admin state to up/down, but does not allow for removal of the configuration from the redis db.

Describe the results you expected:

Having an option to delete SFLOW configurations in redis db via CLI.

Output of show version:

Based on 202405 branch.

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

bingwang-ms commented 1 month ago

Enabling/Disabling the feature toggles the admin_state to up/down is by design. The existing configuration will not be removed.

AharonMalkin commented 2 weeks ago

@AharonMalkin