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

SONiC YANG model for RADIUS. #12749

Merged
merged 4 commits into from
Jan 12, 2023
Merged

SONiC YANG model for RADIUS. #12749

merged 4 commits into from
Jan 12, 2023

Conversation

shdasari
Copy link
Contributor

@shdasari shdasari commented Nov 18, 2022

Why I did it

Added SONiC YANG model for RADIUS.
Fixes #12477

How I did it

Added the RADIUS and RADIUS_SERVER tables for global and per RADIUS server configuration. RADIUS statistics reside in COUNTERS_DB and are not part of the configuration. These are not a part of this PR.

How to verify it

Compiled sonic_yang_mgmt-1.0-py3-none-any.whl.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205

Description for the changelog

SONiC YANG model for RADIUS.

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 18, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@lguohan lguohan added the YANG YANG model related changes label Nov 19, 2022
@ganglyu
Copy link
Contributor

ganglyu commented Nov 22, 2022

Would you please update doc/Configuration.md?

@shdasari
Copy link
Contributor Author

Updated Configuration.md.

@zhangyanzhao
Copy link
Collaborator

@isabelmsft @praveen-li @qiluo-msft can you please help to review this PR? Thanks.

@isabelmsft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list.

@sonic-net sonic-net deleted a comment from azure-pipelines bot Dec 9, 2022
@isabelmsft
Copy link
Contributor

@shdasari Looks like build is failing, can we make sure to pass the PR checker?

@shdasari
Copy link
Contributor Author

shdasari commented Dec 9, 2022

@shdasari Looks like build is failing, can we make sure to pass the PR checker?

Sure, let me get it resolved.

Checked, and it looks like "make configure" is failing and this does not have anything to do with the YANG changes.

  • docker create --name sonic-slave-bullseye-6f382ea8eee --entrypoint /bin/bash sonic-slave-bullseye:6f382ea8eee
    Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
  • docker cp -L sonic-slave-bullseye-6f382ea8eee:/etc/os-release target/versions/dockers/sonic-slave-bullseye/
    Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
  • docker cp -L sonic-slave-bullseye-6f382ea8eee:/usr/local/share/buildinfo/pre-versions target/versions/dockers/sonic-slave-bullseye/
    Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
  • docker cp -L sonic-slave-bullseye-6f382ea8eee:/usr/local/share/buildinfo/post-versions target/versions/dockers/sonic-slave-bullseye/
    Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
  • IMAGENAME=sonic-slave-bullseye:6f382ea8eee
  • j2 files/build_templates/build_docker_cache.j2
  • docker tag sonic-slave-bullseye:6f382ea8eee tmp-sonic-slave-bullseye:6f382ea8eee
    Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
  • DOCKER_BUILDKIT=1
  • docker build -f sonic-slave-bullseye/Dockerfile.cleanup --target output -o target/vcache/sonic-slave-bullseye sonic-slave-bullseye
    failed to dial gRPC: cannot connect to the Docker daemon. Is 'docker daemon' running on this host?: dial unix /var/run/docker.sock: connect: connection refused
  • DOCKER_BUILDKIT=1
  • docker build -f sonic-slave-bullseye/Dockerfile.cleanup --no-cache --target final --tag sonic-slave-bullseye:6f382ea8eee sonic-slave-bullseye
    failed to dial gRPC: cannot connect to the Docker daemon. Is 'docker daemon' running on this host?: dial unix /var/run/docker.sock: connect: connection refused
  • docker rmi tmp-sonic-slave-bullseye:6f382ea8eee
    Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
  • docker container rm sonic-slave-bullseye-6f382ea8eee
    Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
    make[1]: *** [Makefile.work:539: configure] Error 1
    make[1]: Leaving directory '/data/myagent/_work/27/s'
    make: *** [Makefile:93: configure] Error 2
    ##[error]Bash exited with code '2'.
    Finishing: Make configure

Not sure if this has anything to do with privileges.

@shdasari
Copy link
Contributor Author

shdasari commented Dec 9, 2022

/azp run all

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 12749 in repo sonic-net/sonic-buildimage

@zhangyanzhao
Copy link
Collaborator

@shdasari can you please help to check the build failure? Once the build passed, we can merge.

@wen587
Copy link
Contributor

wen587 commented Dec 16, 2022

I suspect libyang backlink issue.

Take this failed test as example: test_find_ref_paths__path_is_table__returns_ref_paths

2022-12-15T07:27:30.8137237Z E         ['/ACL_TABLE/DATAACL/ports/0',
2022-12-15T07:27:30.8137717Z E          '/ACL_TABLE/EVERFLOW/ports/0',
2022-12-15T07:27:30.8138209Z E          '/ACL_TABLE/EVERFLOWV6/ports/0',
2022-12-15T07:27:30.8138709Z E          '/ACL_TABLE/EVERFLOWV6/ports/1',
2022-12-15T07:27:30.8139216Z E       -  '/ACL_TABLE/NO-NSW-PACL-V4/ports/0',
2022-12-15T07:27:30.8139561Z E       ?                                     ^
2022-12-15T07:27:30.8139812Z E       
2022-12-15T07:27:30.8140252Z E       +  '/ACL_TABLE/NO-NSW-PACL-V4/ports/0']
2022-12-15T07:27:30.8140585Z E       ?                                     ^
2022-12-15T07:27:30.8141019Z E       
2022-12-15T07:27:30.8141499Z E       -  '/VLAN_MEMBER/Vlan1000|Ethernet0',       <<=== missing VLAN_MEMBER 
2022-12-15T07:27:30.8142026Z E       -  '/VLAN_MEMBER/Vlan1000|Ethernet4',       <<=== missing VLAN_MEMBER
2022-12-15T07:27:30.8142539Z E       -  '/VLAN_MEMBER/Vlan1000|Ethernet8']       <<=== missing VLAN_MEMBER

After adding this YANG model, it loses VLAN_MEMBER ref path.
Though the RADIUS yang model is not related to this test, it breaks the ref pathfinding for other YANG models.

I am afraid GCU feature will be broken if we merge this PR.

I think @li-pingmao is working to upgrade libyang to libyang2. But libyang2 is missing many APIs that sonic_yang has been using. So the work is not completed yet.

@qiluo-msft for vis.

@ganglyu
Copy link
Contributor

ganglyu commented Dec 16, 2022

I suspect libyang backlink issue.

Take this failed test as example: test_find_ref_paths__path_is_table__returns_ref_paths

2022-12-15T07:27:30.8137237Z E         ['/ACL_TABLE/DATAACL/ports/0',
2022-12-15T07:27:30.8137717Z E          '/ACL_TABLE/EVERFLOW/ports/0',
2022-12-15T07:27:30.8138209Z E          '/ACL_TABLE/EVERFLOWV6/ports/0',
2022-12-15T07:27:30.8138709Z E          '/ACL_TABLE/EVERFLOWV6/ports/1',
2022-12-15T07:27:30.8139216Z E       -  '/ACL_TABLE/NO-NSW-PACL-V4/ports/0',
2022-12-15T07:27:30.8139561Z E       ?                                     ^
2022-12-15T07:27:30.8139812Z E       
2022-12-15T07:27:30.8140252Z E       +  '/ACL_TABLE/NO-NSW-PACL-V4/ports/0']
2022-12-15T07:27:30.8140585Z E       ?                                     ^
2022-12-15T07:27:30.8141019Z E       
2022-12-15T07:27:30.8141499Z E       -  '/VLAN_MEMBER/Vlan1000|Ethernet0',       <<=== missing VLAN_MEMBER 
2022-12-15T07:27:30.8142026Z E       -  '/VLAN_MEMBER/Vlan1000|Ethernet4',       <<=== missing VLAN_MEMBER
2022-12-15T07:27:30.8142539Z E       -  '/VLAN_MEMBER/Vlan1000|Ethernet8']       <<=== missing VLAN_MEMBER

After adding this YANG model, it loses VLAN_MEMBER ref path. Though the RADIUS yang model is not related to this test, it breaks the ref pathfinding for other YANG models.

I am afraid GCU feature will be broken if we merge this PR.

I think @li-pingmao is working to upgrade libyang to libyang2. But libyang2 is missing many APIs that sonic_yang has been using. So the work is not completed yet.

@qiluo-msft for vis.

Only armhf pipeline detects this error, does it mean libyang behavior is different on armhf platform?

prefix lag;
}

import sonic-vlan {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @shdasari , you may need to comment out vlan import. As it will break libyang backlinks. Issue can be tracked here: #9312

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, will upload a new set of diffs with the changes commented out.

@mssonicbld
Copy link
Collaborator

@shdasari PR conflicts with 202205 branch

@yxieca
Copy link
Contributor

yxieca commented Feb 9, 2023

@adyeung can you help ping @shdasari to create 202205 PR?

@adyeung
Copy link
Collaborator

adyeung commented Feb 10, 2023

shdasari will post a new PR for 202205

@isabelmsft isabelmsft mentioned this pull request Apr 6, 2023
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need Yang for RADIUS_SERVER, RADIUS tables
10 participants