[config reload] Fixing config reload when timer based services are disabled#2200
Conversation
…sabled Signed-off-by: Sudharsan Dhamal Gopalarathnam <[email protected]>
86e203c to
ee44cb2
Compare
config/main.py
Outdated
| if not _delay_timers_elapsed(): | ||
| click.echo("Relevant services are not up. Retry later or use -f to avoid system checks") | ||
| return | ||
| sys.exit(1) |
There was a problem hiding this comment.
All these three error conditions are identical which are meant to signal config reload is not ready to be executed. The appropriate error message would give user the hint why it is not ready. I believe since they are for the same behavior the same exit code should be used.
Please let me know your thoughts.
There was a problem hiding this comment.
Could you define a constant for "config reload is not ready to be executed" return code?
|
@qiluo-msft Can we merge this? |
…s are disabled (#2201) Porting of #2200 into 202111 - What I did Fixed config reload when timer based delayed services are disabled. When they are disabled, the property property=LastTriggerUSecMonotonic returns "0". This will cause config reload to fail even though all enabled services are up. - How I did it Fixed the delayed services logic to check if the services are enabled before getting the property LastTriggerUSecMonotonic . Additionally fixed the return codes when config reload fails due to system checks - How to verify it Added UT to verify it. Modified sonic-mgmt tests to verify it additionally. Signed-off-by: Sudharsan Dhamal Gopalarathnam <[email protected]>
|
@dgsudharsan this change cannot be cherry-picked cleanly to 202205 branch, as result, I also cannot cherry-pick sonic-net/sonic-swss#2143 into 202205 at this time. |
@yxieca I will raise a PR for 202205. But can you explain me how this PR is affecting the sonic-swss PR you mentioned? |
…sabled (sonic-net#2200) - What I did Fixed config reload when timer based delayed services are disabled. When they are disabled, the property property=LastTriggerUSecMonotonic returns "0". This will cause config reload to fail even though all enabled services are up. - How I did it Fixed the delayed services logic to check if the services are enabled before getting the property LastTriggerUSecMonotonic . Additionally fixed the return codes when config reload fails due to system checks - How to verify it Added UT to verify it. Modified sonic-mgmt tests to verify it additionally. Signed-off-by: Sudharsan Dhamal Gopalarathnam <[email protected]>
Here is the PR #2226 |
…sabled (#2200) (#2226) - What I did Fixed config reload when timer based delayed services are disabled. When they are disabled, the property property=LastTriggerUSecMonotonic returns "0". This will cause config reload to fail even though all enabled services are up. - How I did it Fixed the delayed services logic to check if the services are enabled before getting the property LastTriggerUSecMonotonic . Additionally fixed the return codes when config reload fails due to system checks - How to verify it Added UT to verify it. Modified sonic-mgmt tests to verify it additionally. Signed-off-by: Sudharsan Dhamal Gopalarathnam <[email protected]>
…sabled (#2200) (#2226) - What I did Fixed config reload when timer based delayed services are disabled. When they are disabled, the property property=LastTriggerUSecMonotonic returns "0". This will cause config reload to fail even though all enabled services are up. - How I did it Fixed the delayed services logic to check if the services are enabled before getting the property LastTriggerUSecMonotonic . Additionally fixed the return codes when config reload fails due to system checks - How to verify it Added UT to verify it. Modified sonic-mgmt tests to verify it additionally. Signed-off-by: Sudharsan Dhamal Gopalarathnam <[email protected]>
Signed-off-by: Sudharsan Dhamal Gopalarathnam [email protected]
DO NOT MERGE UNTIL sonic-net/sonic-mgmt#5783 IS MERGED
What I did
Fixed config reload when timer based delayed services are disabled. When they are disabled, the property property=LastTriggerUSecMonotonic returns "0". This will cause config reload to fail even though all enabled services are up.
How I did it
Fixed the delayed services logic to check if the services are enabled before getting the property LastTriggerUSecMonotonic . Additionally fixed the return codes when config reload fails due to system checks
How to verify it
Added UT to verify it. Modified sonic-mgmt tests to verify it additionally.
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)