-
Notifications
You must be signed in to change notification settings - Fork 85
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
[Banner] Added BannerCfg class to hostcfgd to handle Banner messages #79
[Banner] Added BannerCfg class to hostcfgd to handle Banner messages #79
Conversation
@SviatoslavBoichuk please handle conflict. Please also add description of the code changes and motivation |
2634ef3
to
3225706
Compare
Fixed conflicts, updated PR description |
3225706
to
6039845
Compare
key: DB table's key that was triggered change. | ||
data: Read table data. | ||
""" | ||
# Handling state, login/logout and MOTD messages. Data should be a dict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "state" is used by "banner-config.service". Hostcfgd responsible only to track DB changes for BANNER table and restart banner service once user modified banner messages or feature state. The banner service (please see PR: sonic-net/sonic-buildimage#16957) will apply new Banners to Linux only if feature state == enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How to disable the feature? In normal deployment, if people do not want use this feature, would like to disable it completely, minimize teh CPU wasted relating to this feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To disable the feature - you can use CLI command: config banner state disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the feature is disabled, we expected that no extra daemon started, minimal CPU wasted in this script. In this case, is the service "banner-config" still running?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the feature is disabled, we expected that no extra daemon started, minimal CPU wasted in this script. In this case, is the service "banner-config" still running?
The banner-config systemd service - is running in one-shot mode - it will be run at least once on init stage - doesn't matter if feature is disabled. Regarding hostcfgd daemon - banner functionality will run as part of daemon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@qiluo-msft is that thread resolved?
/azp run sonic-net.sonic-host-services |
Azure Pipelines successfully started running 1 pipeline(s). |
The test is failing because sonic-net/sonic-swss-common#826 should be merged first |
6039845
to
b718247
Compare
Still failing because of sonic-net/sonic-swss-common#826 |
Signed-off-by: Yevhen Fastiuk <[email protected]>
Signed-off-by: Yevhen Fastiuk <[email protected]>
b718247
to
8c8143d
Compare
@qiluo-msft , added a new unit test. Didn't touch a code. Please re-review/approve |
@qiluo-msft , gentle reminder :) |
1 similar comment
@qiluo-msft , gentle reminder :) |
@qiluo-msft , gentle reminder :) |
Hi @SviatoslavBoichuk we are interested in the banner feature. can it be merged anytime soon? |
Please resolve the conflict |
@qiluo-msft rebased. Please merge |
@qiluo-msft could you please merge it? It was approved by you, I rebased and it passed the CI here |
@qiluo-msft gentle reminder to merge |
Why I did it
Added Banner feature related hostcfgd service according to HLD: sonic-net/SONiC#1361
This PR depends on the following PR: sonic-net/sonic-swss-common#826
How I did it
Added BannerCfg service to hostcfgd. It handles Config DB changes and restart "banner-config" systemd service which will update banners.
How to verify it
Manual test