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

[frr-mgmt-framework] "auth_password" in the BGP_NEIGHBOR table cannot be restored correctly #19946

Open
puffc opened this issue Aug 19, 2024 · 6 comments · May be fixed by #20249
Open

[frr-mgmt-framework] "auth_password" in the BGP_NEIGHBOR table cannot be restored correctly #19946

puffc opened this issue Aug 19, 2024 · 6 comments · May be fixed by #20249
Assignees
Labels
DELL Triaged this issue has been triaged

Comments

@puffc
Copy link
Contributor

puffc commented Aug 19, 2024

Description

According to the current frrcfgd design, the "auth_password" in the BGP_NEIGHBOR table is converted into the following FRR command:

config_db:

    "BGP_NEIGHBOR": {
        "Vrf1|100.64.1.13": {
            "admin_status": "true",
            "auth_password": "U2FsdGVkX18exaLFN1FUBk3ILAbWxem3VI9MR5IBv7vZ94ppayc8ZtNdBwKajazF",
            "local_asn": 65025,
            "asn": "65020"

bgpd.conf:

...
 neighbor 100.64.1.13 password U2FsdGVkX18exaLFN1FUBk3ILAbWxem3VI9MR5IBv7vZ94ppayc8ZtNdBwKajazF encrypted

However, the generated neighbor password command cannot be restored because the "encrytped" option is not supported by the current version of FRR.
Related PR #5142

Steps to reproduce the issue:

  1. Add BGP neighbor and auth_password into the config_db
  2. sudo config reload -y
  3. The neighbor password is not restored.

Describe the results you received:

Cannot find the neighbor password in the frr running-config.

sonic(config-router)# neighbor 100.64.1.13 password U2FsdGVkX18exaLFN1FUBk3ILAbWxem3VI9MR5IBv7vZ94ppayc8ZtNdBwKajazF encrypted
% Unknown command: neighbor 100.64.1.13 password U2FsdGVkX18exaLFN1FUBk3ILAbWxem3VI9MR5IBv7vZ94ppayc8ZtNdBwKajazF encrypted

Describe the results you expected:

The neighbor password configured in the config_db should be restored.

Output of show version:

(paste your output here)

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

@gechiang gechiang added DELL Triaged this issue has been triaged labels Aug 28, 2024
@venkatmahalingam
Copy link
Collaborator

@puffc what FRR version was used for this testing 8.5.4?

@puffc
Copy link
Contributor Author

puffc commented Sep 3, 2024

@puffc what FRR version was used for this testing 8.5.4?

Yes, 8.5.4.

@puffc
Copy link
Contributor Author

puffc commented Sep 3, 2024

@venkatmahalingam BTW, according to my knowledge, the "encrytped" option can only be used on Broadcom Enterprise SONiC.

@venkatmahalingam
Copy link
Collaborator

@puffc
Copy link
Contributor Author

puffc commented Sep 4, 2024

@puffc Remove encrypted keyword from the below lines as FRR expects the MD5 password by default, we no longer need it.

https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-frr-mgmt-framework/frrcfgd/frrcfgd.py#L1797

https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-frr-mgmt-framework/templates/bgpd/bgpd.conf.db.nbr_or_peer.j2#L47

Thanks! Should I raise a PR to include your recommendation?

@venkatmahalingam
Copy link
Collaborator

yes, please, hope this works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DELL Triaged this issue has been triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants