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

Device ID for SONiC Virtual Switch with P4RT #232

Open
pantmal opened this issue Jun 21, 2024 · 2 comments
Open

Device ID for SONiC Virtual Switch with P4RT #232

pantmal opened this issue Jun 21, 2024 · 2 comments

Comments

@pantmal
Copy link

pantmal commented Jun 21, 2024

Hello everyone, I am new to SONiC and I would like some assistance regarding some config related operations. This issue is more of a theoretical question regarding SONiC and PINS and not directly related to the sonic-pins repo, but I hope someone from here may be able to assist.

I have used the sonic-buildimage repo to create a custom SONiC Virtual Switch image. I have used the flag INCLUDE_P4RT = y so I may have a P4 runtime container.

I have deployed this VS using GNS3 and I am able to connect to the switch and the P4RT gRPC port with the P4 runtime shell with: python3 -m p4runtime_sh --grpc-addr <Switch-IP>:9559.

However when I connect I am receiving the following error:

CRITICAL:root:P4Runtime RPC error (FAILED_PRECONDITION): Switch does not have a Device ID. Has a config been pushed?

I understand that the P4 runtime shell needs the Device ID to complete the connection, but it has not been set. Can someone assist me with this issue? How am I supposed to set the Device ID and push the config in question? Can this operation be performed by GNS3? I can't see any related option in the sonic-buildimage repo.

Any assistance would be greatly appreciated.

(On another note, I have noticed that the P4rt container does not run by default and needs to be enabled manually with: /usr/bin/p4rt.sh start. Is this behavior expected?)

@shengminhe
Copy link

I also encountered the same problem, did you solve it?

@pantmal
Copy link
Author

pantmal commented Jun 25, 2024

No, I wasn't able to solve it thus far. I have given you a detailed response of my findings in the other issue I created: sonic-net/sonic-buildimage#19328 (comment)

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

No branches or pull requests

2 participants