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

[config reload]Config Reload Enhancement #2693

Merged
merged 6 commits into from
Apr 11, 2023

Conversation

dgsudharsan
Copy link
Collaborator

What I did

Code changes for HLD: sonic-net/SONiC#1203
Removed the timer based checks for config reload
Added db_migrator to migrate from "has_timer" to "delayed"
Modified package-manager to migrate from "has_timer" to "delayed"

How I did it

Modified relevant files

How to verify it

Added UT to verify

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

qiluo-msft
qiluo-msft previously approved these changes Mar 18, 2023
@qiluo-msft qiluo-msft merged commit a1057b2 into sonic-net:master Apr 11, 2023
@xumia
Copy link
Collaborator

xumia commented Apr 12, 2023

@dgsudharsan , looks like the PR has an issue, when updating the sonic-utilities for the sonic-buildimage, the build failed, see PR sonic-net/sonic-buildimage#14619, and the build result: https://dev.azure.com/mssonic/build/_build/results?buildId=251574&view=logs&jobId=e2a1d004-6151-514d-dd3b-ba225f574bd9&j=e2a1d004-6151-514d-dd3b-ba225f574bd9&t=84643f3d-b87b-5e33-4d3a-7ffd9da7d441

2023-04-12T09:35:57.6208803Z + sudo LANG=C DOCKER_HOST= chroot ./fsroot-vs sonic-package-manager install --from-tarball target/docker-macsec.gz -y -v DEBUG --enable
2023-04-12T09:35:57.6209021Z sonic_yang(3):All Keys are not parsed in FEATURE
2023-04-12T09:35:57.6209200Z dict_keys(['dhcp_relay'])
2023-04-12T09:35:57.6209403Z sonic_yang(3):exceptionList:["'delayed'"]
2023-04-12T09:35:57.6209571Z sonic_yang(3):Data Loading Failed:All Keys are not parsed in FEATURE
2023-04-12T09:35:57.6209777Z dict_keys(['dhcp_relay'])
2023-04-12T09:35:57.6209940Z exceptionList:["'delayed'"]
2023-04-12T09:35:57.6210067Z Data Loading Failed
2023-04-12T09:35:57.6210181Z All Keys are not parsed in FEATURE
2023-04-12T09:35:57.6210357Z dict_keys(['dhcp_relay'])
2023-04-12T09:35:57.6210524Z exceptionList:["'delayed'"]
2023-04-12T09:35:57.6210646Z Traceback (most recent call last):
2023-04-12T09:35:57.6210914Z   File "/usr/local/lib/python3.9/dist-packages/sonic_yang_ext.py", line 1113, in loadData
2023-04-12T09:35:57.6211082Z     self._xlateConfigDB(xlateFile=xlateFile)
2023-04-12T09:35:57.6211354Z   File "/usr/local/lib/python3.9/dist-packages/sonic_yang_ext.py", line 731, in _xlateConfigDB
2023-04-12T09:35:57.6211520Z     self._xlateConfigDBtoYang(jIn, yangJ)
2023-04-12T09:35:57.6211864Z   File "/usr/local/lib/python3.9/dist-packages/sonic_yang_ext.py", line 717, in _xlateConfigDBtoYang
2023-04-12T09:35:57.6212116Z     self._xlateContainer(cmap['container'], yangJ[key][subkey], \
2023-04-12T09:35:57.6212398Z   File "/usr/local/lib/python3.9/dist-packages/sonic_yang_ext.py", line 696, in _xlateContainer
2023-04-12T09:35:57.6212591Z     raise(Exception("All Keys are not parsed in {}\n{}\nexceptionList:{}".format(table, \
2023-04-12T09:35:57.6212756Z Exception: All Keys are not parsed in FEATURE
2023-04-12T09:35:57.6212928Z dict_keys(['dhcp_relay'])
2023-04-12T09:35:57.6213106Z exceptionList:["'delayed'"]
2023-04-12T09:35:57.6213163Z 
    self.sy.loadData(self.configdbJsonIn)
  File "/usr/local/lib/python3.9/dist-packages/sonic_yang_ext.py", line 1123, in loadData
    raise SonicYangException("Data Loading Failed\n{}".format(str(e)))
sonic_yang_ext.SonicYangException: Data Loading Failed
All Keys are not parsed in FEATURE
dict_keys(['dhcp_relay'])
exceptionList:["'delayed'"]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/sonic-package-manager", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1134, in invoke
    Command.invoke(self, ctx)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/sonic_package_manager/main.py", line 149, in cli
    ctx.obj = PackageManager.get_manager()
  File "/usr/local/lib/python3.9/dist-packages/sonic_package_manager/manager.py", line 1006, in get_manager
    cfg_mgmt = config_mgmt.ConfigMgmt(source=INIT_CFG_JSON, sonicYangOptions=ly.LY_CTX_DISABLE_SEARCHDIR_CWD)
  File "/usr/local/lib/python3.9/dist-packages/config/config_mgmt.py", line 66, in __init__
    raise Exception('ConfigMgmt Class creation failed')
Exception: ConfigMgmt Class creation failed

@dgsudharsan
Copy link
Collaborator Author

@xumia This is due to a cyclic dependency with buildimage PR and I have updated sonic-buildimage PR with submodule update of sonic-utilities and sonic-host-services sonic-net/sonic-buildimage#13969. Once the above PR is merged you shouldn't see error

dgsudharsan added a commit to dgsudharsan/sonic-utilities that referenced this pull request May 26, 2023
Code changes for HLD: sonic-net/SONiC#1203
Removed the timer based checks for config reload
Added db_migrator to migrate from "has_timer" to "delayed"
Modified package-manager to migrate from "has_timer" to "delayed"

Modified relevant files

Added UT to verify
StormLiangMS pushed a commit that referenced this pull request Jun 10, 2023
Backporting #2693

What I did
Code changes for HLD: sonic-net/SONiC#1203
Removed the timer based checks for config reload
Added db_migrator to migrate from "has_timer" to "delayed"
Modified package-manager to migrate from "has_timer" to "delayed"

How I did it
Modified relevant files

How to verify it
Added UT to verify
maxliu37 pushed a commit to maxliu37/SONiC that referenced this pull request May 3, 2024
Update sonic-utilities submodule pointer to include the following:
* a1057b27 [config reload]Config Reload Enhancement ([#2693](sonic-net/sonic-utilities#2693))
* 04d0b34a [voq][chassis][generate_dump] [BCM] Dump only the relevant BCM commands for fabric cards ([#2606](sonic-net/sonic-utilities#2606))

Signed-off-by: dgsudharsan <sudharsand@nvidia.com>
maxliu37 pushed a commit to maxliu37/SONiC that referenced this pull request May 3, 2024
Update sonic-utilities submodule pointer to include the following:
* a1057b27 [config reload]Config Reload Enhancement ([#2693](sonic-net/sonic-utilities#2693))
* 04d0b34a [voq][chassis][generate_dump] [BCM] Dump only the relevant BCM commands for fabric cards ([#2606](sonic-net/sonic-utilities#2606))

Signed-off-by: dgsudharsan <sudharsand@nvidia.com>
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

4 participants