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"] | after reload config_db.json sflow going to disabled state #9473

Closed
ihorchekh opened this issue Dec 8, 2021 · 2 comments · Fixed by sonic-net/sonic-utilities#1964
Assignees
Labels
regression Triaged this issue has been triaged

Comments

@ihorchekh
Copy link

Description
After reload config_db.json sflow going to disabled state.
Command show feature status shows sflow in disabled state after config reload -y

Steps to reproduce the issue:

  1. Check that sflow enabled in config_db.json
    *if it has "state": "disabled" change to "enabled"
   "sflow": {
        "auto_restart": "enabled",
        "has_global_scope": "True",
        "has_per_asic_scope": "False",
        "has_timer": "False",
        "high_mem_alert": "disabled",
        "state": "enabled"
    },
  1. Reboot device
  2. Check show feature status
  3. Reload config: config reload -y
  4. Check show feature status

Actual result
Command show feature status shows sflow in disabled state after config reload -y

Expected result
Command show feature status shows sflow in enabled state after config reload -y

Output of show version:
SONiC.master.51908-dirty-20211117.173456

Output of show techsupport:
sonic_dump_r-tigon-11_20211208_150029.tar.gz

@zhangyanzhao zhangyanzhao added the Triaged this issue has been triaged label Dec 8, 2021
@zhangyanzhao
Copy link
Collaborator

Nvidia team will debug further according to comments from issue tirage meeting

@dgsudharsan
Copy link
Collaborator

config reload -y
Running command: rm -rf /tmp/dropstat-*
Disabling container monitoring ...
Stopping SONiC target ...
Running command: /usr/local/bin/sonic-cfggen -j /etc/sonic/config_db.json -j /etc/sonic/init_cfg.json --write-to-db
Running command: /usr/local/bin/db_migrator.py -o migrate
Running command: /usr/local/bin/sonic-cfggen -d -y /etc/sonic/sonic_version.yml -t /usr/share/sonic/templates/sonic-environment.j2,/etc/sonic/sonic-environment

In the above execution from latest master sonic-cfggen is taking config_db.json first followed by init_cfg.json which will make default values in init_cfg.json override user configuration values. In 202106 we find below is the order

if [ "$(systemctl is-enabled swss.service)" == "enabled" ]; then echo "hello"; fi

    if namespace is None:
        if os.path.isfile(INIT_CFG_FILE):
            command = "{} -j {} -j {} --write-to-db".format(SONIC_CFGGEN_PATH, INIT_CFG_FILE, file)

However, the order was reversed in this PR sonic-net/sonic-utilities#1781. Is there any specific reason for it? If not, can you please make the order as earlier so user config takes precedence over default?

arlakshm added a commit to sonic-net/sonic-utilities that referenced this issue Dec 9, 2021
What I did
Fixes sonic-net/sonic-buildimage#9473

How I did it
Preserve the old order of the config reload

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
judyjoseph pushed a commit to sonic-net/sonic-utilities that referenced this issue Jan 9, 2022
What I did
Fixes sonic-net/sonic-buildimage#9473

How I did it
Preserve the old order of the config reload

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
malletvapid23 added a commit to malletvapid23/Sonic-Utility that referenced this issue Aug 3, 2023
What I did
Fixes sonic-net/sonic-buildimage#9473

How I did it
Preserve the old order of the config reload

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Triaged this issue has been triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants