-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[hostcfgd] Fix Boolean String Evaluation #5248
[hostcfgd] Fix Boolean String Evaluation #5248
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 <[email protected]>
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 <[email protected]>
if has no installation config (WantedBy=, RequiredBy=, Also=, Alias= settings in the [Install] section
@tahmed-dev not able to completely follow PR description . |
@abdosi, This is correct, we do not want to enable snmp/telemetry .service. The issue was reported by systemd as follows:
|
Retest vsimage please |
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 <[email protected]>
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 <[email protected]>
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 [email protected]
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)