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

[fpmsyncd] Added CLI for Fpmsyncd Next Hop Table Enhancement #122

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ntt-omw
Copy link

@ntt-omw ntt-omw commented Oct 2, 2023

Why I did it

Implementing code changes for sonic-net/SONiC#1425

How to verify it

enable/disable nexthop group feature
  • Klish will call REST API to configure feature next-hop-group enable.
  • FEATURE|nexthop_group will be created in CONFIG_DB
    • template zebra.conf.j2 will generate zebra.conf with fpm use-next-hop-groups if FEATURE|nexthop_group exists in CONFIG_DB. Else, it will generate zebra.conf with no fpm use-next-hop-groups (default behavior)
  • Do config save comman and write to /etc/sonic/config_db.json
  • restart SONiC: virsh reboot sonic-nhg
  • /etc/frr/zebra.conf has fpm use-next-hop-groups instead of no fpm use-next-hop-groups
Klish CLI for feature nexthop_group
  • Enable: sonic(config)# feature next-hop-group enable
  • Disable: sonic(config)# no feature next-hop-group

Enable

admin@sonic:~$ sonic-cli

sonic# configure terminal

sonic(config)#
  end        Exit to EXEC mode
  exit       Exit from current mode
  feature    Configure additional feature
  interface  Select an interface
  ip         Global IP configuration subcommands
  mclag      domain
  no         To delete / disable commands in config mode

sonic(config)# feature
  next-hop-group  Next-hop Groups feature

sonic(config)# feature next-hop-group
  enable  Enable Next-hop Groups feature

sonic(config)# feature next-hop-group enable
  <cr>

Disable

sonic(config)# no
  feature  Disable additional feature
  ip       Global IP configuration subcommands
  mclag    domain

sonic(config)# no feature
  next-hop-group  Disable Next-hop Groups feature

sonic(config)# no feature next-hop-group
  <cr>

@ntt-omw ntt-omw changed the title [fpmsyncd] Added CLI for Fpmsyncd Next Hop Table Enhancement #107 [fpmsyncd] Added CLI for Fpmsyncd Next Hop Table Enhancement Oct 2, 2023
Signed-off-by: Kanji Nakano <kanji.nakano@ntt.com>
Signed-off-by: Kanji Nakano <kanji.nakano@ntt.com>
@nakano-omw
Copy link

Hi @ayelrod It has been reviewed in Routing WG. Could we merge the PR ?

<COMMAND name="feature next-hop-group" help="Next-hop Groups feature"></COMMAND>
<COMMAND name="feature next-hop-group enable" help="Enable Next-hop Groups feature">
<ACTION>
python3 $SONIC_CLI_ROOT/sonic-cli-feature.py configure_sonic_nexthop_groups 1

Choose a reason for hiding this comment

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

In the HLD it is mentioned that the enable disable cannot be changed in run time. Then why do we have a CLI which can modify it? If it doesn't take effect we should have a log message asking the user to save and reboot

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.

None yet

4 participants