Skip to content
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 CLI commands to configure Banner and display current configuration #3021

Merged
merged 5 commits into from
Oct 26, 2024

Conversation

SviatoslavBoichuk
Copy link
Contributor

What I did

Added CLI commands for Banner feature according to HLD: sonic-net/SONiC#1361

How I did it

Added CLI commands to:

  1. Enable/disable Banner feature
  2. Configure Banner messages: login/motd/logout
  3. Related show command

How to verify it

Manual testing

Previous command output (if the output of a command-line utility has changed)

N/A

New command output (if the output of a command-line utility has changed)

N/A

@liat-grozovik liat-grozovik changed the title Added CLI commands to configure Banner and display current configuration [Banner] Added CLI commands to configure Banner and display current configuration Dec 3, 2023
@liat-grozovik
Copy link
Collaborator

@SviatoslavBoichuk i am missing command reference guide updates. please update it based on the new proposed CLI commands

@SviatoslavBoichuk
Copy link
Contributor Author

@SviatoslavBoichuk i am missing command reference guide updates. please update it based on the new proposed CLI commands

Added Commands to Command Reference Quide.

@SviatoslavBoichuk SviatoslavBoichuk force-pushed the dev-banner-feature branch 3 times, most recently from 1bc8ea7 to 85db9b5 Compare December 19, 2023 07:42

config_db = ConfigDBConnector()
config_db.connect()
config_db.mod_entry(swsscommon.CFG_BANNER_MESSAGE_TABLE_NAME, 'global',
Copy link
Contributor

@qiluo-msft qiluo-msft Feb 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CFG_BANNER_MESSAGE_TABLE_NAME

Why not use FEATURE table? #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FEATURE table was designed for SONiC App extensions features. The Banner feature is not the case...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see many features are not SONiC App extensions feature there.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see many features are not SONiC App extensions feature there.

Sure. But we need to keep separate. In that case, it is much easier to handle. In hostcfgd we have a logic to handle FEATURE table changes. It would be overload to add additional logic to handle the banner there.
So for that, we added a new table and new subscriber in hostcfgd to handle it separately. The code looks much clearer and it is consistent over other features: NTP, RSYSLOG, SSH, etc.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@qiluo-msft FEATURE table in general is associated with an application with a docker today. We have a dedicated application featured which listens to feature table and enables system services. We also have coppmgr using this logic to enable traps. Adding entry to feature table when there is no associated docker will lead to errors in some flows and currently it is not supported. Hence in this scenario it is advisable to use a separate table.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@qiluo-msft please see @dgsudharsan answer. I agree with him

@fastiuk
Copy link
Contributor

fastiuk commented Apr 22, 2024

The test is failing because sonic-net/sonic-swss-common#826 should be merged first

@fastiuk fastiuk force-pushed the dev-banner-feature branch from 42eea90 to f8f1510 Compare April 27, 2024 21:24
Copy link

linux-foundation-easycla bot commented Apr 27, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@liat-grozovik
Copy link
Collaborator

@qiluo-msft kindly review the comments and lets close the review loop.
@fastiuk please followup on PR checkers. lets ensure all passing

@fastiuk
Copy link
Contributor

fastiuk commented May 7, 2024

@qiluo-msft kindly review the comments and lets close the review loop.
@fastiuk please followup on PR checkers. lets ensure all passing

Checkers are not passing because sonic-swss-common PR must be merged first

@fastiuk fastiuk closed this May 8, 2024
@fastiuk fastiuk reopened this May 8, 2024
@fastiuk fastiuk force-pushed the dev-banner-feature branch 2 times, most recently from 93b6e22 to 9bdd4ca Compare May 14, 2024 20:21
@fastiuk
Copy link
Contributor

fastiuk commented May 14, 2024

@qiluo-msft conflicts were resolved. Please re-review/approve.

fastiuk added 3 commits May 20, 2024 01:13
Signed-off-by: Yevhen Fastiuk <yfastiuk@nvidia.com>
Signed-off-by: Yevhen Fastiuk <yfastiuk@nvidia.com>
Signed-off-by: Yevhen Fastiuk <yfastiuk@nvidia.com>
@fastiuk fastiuk force-pushed the dev-banner-feature branch from 9bdd4ca to 7a7f9f7 Compare May 19, 2024 22:17
@fastiuk
Copy link
Contributor

fastiuk commented May 20, 2024

@qiluo-msft rebased with the master. Please re-review/approve.

@fastiuk
Copy link
Contributor

fastiuk commented May 30, 2024

@qiluo-msft , gentle reminder :)

@fastiuk
Copy link
Contributor

fastiuk commented Jun 3, 2024

@qiluo-msft , gentle reminder :)

@fastiuk
Copy link
Contributor

fastiuk commented Aug 28, 2024

@qiluo-msft , gentle reminder :)
Please approve this as well, as 2 out of 4 were merged already

@jhli-cisco
Copy link
Contributor

@SviatoslavBoichuk , we are interested in the banner feature. can it be merged anytime soon?

@fastiuk
Copy link
Contributor

fastiuk commented Sep 9, 2024

@SviatoslavBoichuk , we are interested in the banner feature. can it be merged anytime soon?

It should be merged soon. We are waiting for the review/approve

qiluo-msft
qiluo-msft previously approved these changes Sep 16, 2024
@jhli-cisco
Copy link
Contributor

@SviatoslavBoichuk can this be merged soon as it's been approved?

@fastiuk
Copy link
Contributor

fastiuk commented Oct 7, 2024

@qiluo-msft rebased, please merge

@fastiuk
Copy link
Contributor

fastiuk commented Oct 14, 2024

@qiluo-msft could you please merge it? It was approved by you, I fixed all conflicts and it passed the CI here

@fastiuk
Copy link
Contributor

fastiuk commented Oct 20, 2024

@qiluo-msft gentle reminder to merge

@fastiuk
Copy link
Contributor

fastiuk commented Oct 21, 2024

@qiluo-msft gentle reminder to merge, it is waiting for more than two weeks

@qiluo-msft qiluo-msft merged commit b2b9734 into sonic-net:master Oct 26, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants