[hostcfgd] Fix Boolean String Evaluation#5248
Merged
tahmed-dev merged 2 commits intosonic-net:masterfrom Aug 27, 2020
Merged
Conversation
New attribute 'has_timer' introduced to init_cfg.json does not evaluate as Bool, rather it evaluates as string. This PR fixes this issue signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
jleveque
previously approved these changes
Aug 25, 2020
tahmed-dev
referenced
this pull request
Aug 25, 2020
Commit e484ae9 introduced systemd .timer unit to hostcfgd. However, when stopping service that has timer, there is possibility that timer is not running and the service would not be stopped. This PR address this situation by handling both .timer and .service units. signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
if has no installation config (WantedBy=, RequiredBy=, Also=, Alias= settings in the [Install] section
jleveque
reviewed
Aug 25, 2020
jleveque
approved these changes
Aug 25, 2020
Contributor
|
@tahmed-dev not able to completely follow PR description . |
Contributor
Author
@abdosi, This is correct, we do not want to enable snmp/telemetry .service. The issue was reported by systemd as follows: |
Contributor
|
Retest vsimage please |
abdosi
pushed a commit
that referenced
this pull request
Aug 27, 2020
New attribute 'has_timer' introduced to init_cfg.json does not evaluate as Bool, rather it evaluates as string. This PR fixes this issue. Also, this PR fixes an issue when there is system config unit (snmp, telemetry) that has no installation config (WantedBy=, RequiredBy=, Also=, Alias=) settings in the [Install] section. In the latter case, the .service should not be enabled. signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
Merged
3 tasks
santhosh-kt
pushed a commit
to santhosh-kt/sonic-buildimage
that referenced
this pull request
Feb 25, 2021
New attribute 'has_timer' introduced to init_cfg.json does not evaluate as Bool, rather it evaluates as string. This PR fixes this issue. Also, this PR fixes an issue when there is system config unit (snmp, telemetry) that has no installation config (WantedBy=, RequiredBy=, Also=, Alias=) settings in the [Install] section. In the latter case, the .service should not be enabled. signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New attribute 'has_timer' introduced to init_cfg.json does not evaluate
as Bool, rather it evaluates as string. This PR fixes this issue. Also,
this PR fixes an issue when there is system config unit (snmp. telemetry)
has no installation config (WantedBy=, RequiredBy=, Also=, Alias=) settings
in the [Install] section. In the latter case, the .service should not be enabled.
signed-off-by: Tamer Ahmed tamer.ahmed@microsoft.com
The issue appears to be stemming from config_db as the new has_timer is stored as string in the config_db
- Why I did it
To fix service start noticed during test.
- How I did it
Add code to properly evaluate newly added field
- How to verify it
config load_minigraph does not shoe lldp.timer as started.
- Which release branch to backport (provide reason below if selected)
N/A
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)