-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 Enhancement #1203
Config Reload Enhancement #1203
Conversation
@dgsudharsan can you please add how this works along with ZTP? ZTP might use some of the GNMI services during reload cases. |
@skg-net I don't think it is going to affect ZTP. In the ZTP too, there will be swss initialization, followed by PortInitDone message posted to APP_DB. Once it is received, all the delayed services include telemetry and mgmt-framework should start. Even today they start in a delayed fashion (3m 30 seconds) but with this change, they should be starting soon after port initialization. |
@zhangyanzhao this HLD is ready for weeks now and already passed community review. what is next? |
…fig reload enhancement (#7558) ### Approach #### What is the motivation for this PR? Modifying config reload tests to align with latest config reload enhancement according to HLD sonic-net/SONiC#1203 #### How did you do it? Removed the timer based checks #### How did you verify/test it? Run the tests with config reload enhamcenet changes
#### 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
Code changes for config reload Enhancement sonic-net/SONiC#1203. Enhancing config reload to sequence the services and faster system initialization. Immediately restart the critical services during config reload. The non critical should be started only after all the ports are initialized. Services can be configured to be started immediately or delayed. This can be using a field in FEATURE table. The existing timers should be removed by this event driven approach. This flow is applicable in case of all reboots (warm/fast/cold) as well as config reload.
#### Why I did it Implementing code changes for sonic-net/SONiC#1203 #### How I did it Removed the timers and delayed target since the delayed services would start based on event driven approach. Cleared port table during config reload and cold reboot scenario. Modified yang model, init_cfg.json to change has_timer to delayed #### How to verify it Running regression
Code changes for config reload Enhancement sonic-net/SONiC#1203. Enhancing config reload to sequence the services and faster system initialization. Immediately restart the critical services during config reload. The non critical should be started only after all the ports are initialized. Services can be configured to be started immediately or delayed. This can be using a field in FEATURE table. The existing timers should be removed by this event driven approach. This flow is applicable in case of all reboots (warm/fast/cold) as well as config reload. Conflicts: tests/hostcfgd/hostcfgd_test.py tests/hostcfgd/test_vectors.py
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
Code changes for config reload Enhancement sonic-net/SONiC#1203. Enhancing config reload to sequence the services and faster system initialization. Immediately restart the critical services during config reload. The non critical should be started only after all the ports are initialized. Services can be configured to be started immediately or delayed. This can be using a field in FEATURE table. The existing timers should be removed by this event driven approach. This flow is applicable in case of all reboots (warm/fast/cold) as well as config reload.
Implementing code changes for sonic-net/SONiC#1203 Removed the timers and delayed target since the delayed services would start based on event driven approach. Cleared port table during config reload and cold reboot scenario. Modified yang model, init_cfg.json to change has_timer to delayed Running regression
Backporting #45 Code changes for config reload Enhancement sonic-net/SONiC#1203. Enhancing config reload to sequence the services and faster system initialization. Immediately restart the critical services during config reload. The non critical should be started only after all the ports are initialized. Services can be configured to be started immediately or delayed. This can be using a field in FEATURE table. The existing timers should be removed by this event driven approach. This flow is applicable in case of all reboots (warm/fast/cold) as well as config reload.
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
Implementing code changes for sonic-net/SONiC#1203 Removed the timers and delayed target since the delayed services would start based on event driven approach. Cleared port table during config reload and cold reboot scenario. Modified yang model, init_cfg.json to change has_timer to delayed Running regression
Backporting #13969 Why I did it Implementing code changes for sonic-net/SONiC#1203 Work item tracking Microsoft ADO (number only): How I did it Removed the timers and delayed target since the delayed services would start based on event driven approach. Cleared port table during config reload and cold reboot scenario. Modified yang model, init_cfg.json to change has_timer to delayed How to verify it Added UT to verify
@dgsudharsan Can you please update the Quality Metric (Alpha/Beta/GA) for the feature either in this PR comments or in HLD itself based on https://github.com/sonic-net/SONiC/blob/master/doc/SONiC%20feature%20quality%20definition.md |
Config Reload Enhancements PR sonic-net/SONiC#1203 does not completely remove TIMERs from SONiC Package Manager infra. This PR is intended to complete the original changes. `Systemd` TIMERs infra was replaced by `hostcfgd` service management. That was done to improve reliability of service management. #### What I did * Removed redundant TIMERs infra #### How I did it * Updated SPM auto generation logic #### How to verify it 1. Install application extension ```bash spm install --from-tarball <app_ext_path> ``` 2. Make sure `delayed` flag is set ```bash docker image inspect <app_ext_image> | jq '.[].Config.Labels["com.azure.sonic.manifest"]' | python -c 'import sys,ast; print(ast.literal_eval(sys.stdin.read()))' | jq .service.delayed true ``` 3. Check no TIMERs were generated
Config Reload Enhancements PR sonic-net/SONiC#1203 does not completely remove TIMERs from SONiC Package Manager infra. This PR is intended to complete the original changes. `Systemd` TIMERs infra was replaced by `hostcfgd` service management. That was done to improve reliability of service management. #### What I did * Removed redundant TIMERs infra #### How I did it * Updated SPM auto generation logic #### How to verify it 1. Install application extension ```bash spm install --from-tarball <app_ext_path> ``` 2. Make sure `delayed` flag is set ```bash docker image inspect <app_ext_image> | jq '.[].Config.Labels["com.azure.sonic.manifest"]' | python -c 'import sys,ast; print(ast.literal_eval(sys.stdin.read()))' | jq .service.delayed true ``` 3. Check no TIMERs were generated
Config Reload Enhancements PR sonic-net/SONiC#1203 does not completely remove TIMERs from SONiC Package Manager infra. This PR is intended to complete the original changes. `Systemd` TIMERs infra was replaced by `hostcfgd` service management. That was done to improve reliability of service management. #### What I did * Removed redundant TIMERs infra #### How I did it * Updated SPM auto generation logic #### How to verify it 1. Install application extension ```bash spm install --from-tarball <app_ext_path> ``` 2. Make sure `delayed` flag is set ```bash docker image inspect <app_ext_image> | jq '.[].Config.Labels["com.azure.sonic.manifest"]' | python -c 'import sys,ast; print(ast.literal_eval(sys.stdin.read()))' | jq .service.delayed true ``` 3. Check no TIMERs were generated
Design to address the issue sonic-net/sonic-buildimage#12071
Enhancing config reload to sequence the services and faster system initialization.