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

gRIBI grpcurl: Failed to resolve symbol "gribi.gRIBI" #37

Open
liulk opened this issue Mar 29, 2022 · 1 comment
Open

gRIBI grpcurl: Failed to resolve symbol "gribi.gRIBI" #37

liulk opened this issue Mar 29, 2022 · 1 comment

Comments

@liulk
Copy link

liulk commented Mar 29, 2022

Reported by @nandanarista:

I did some digging and found at least one problem with reflection[1] for gRIBI (in general, not specific to EOS, problem occurs in gribigo[2] as well)

Focussing on the error below, I suspected it had something to do with reflection.

Method name not found
Failed to find method gribi.Flush in proto files.

I used

./grpcurl -H 'username: admin' -plaintext 127.0.0.1:6040 describe
Failed to resolve symbol "gribi.gRIBI": Symbol not found: gribi.gRIBI
caused by: File not found: github.com/openconfig/ygot/proto/ywrapper/ywrapper.proto

Some googling led me to a very helpful post [3] which says that

What that means is that the name (and relative path) used to compile a proto with protoc must exactly match how all other files will import it.

ywrapper.proto itself is compiled [4] using just the relative // source: ywrapper.proto, but gribi_aft.proto is importing it as import "github.com/openconfig/ygot/proto/ywrapper/ywrapper.proto”;

If my understanding of [3] is correct, the fix is to either regenerate ywrapper's go bindings to use the full github… path or change gribi_aft.proto to import ywrapper without the full github... path and regenerate the go bindings.

I tried both the grpcurl describe and grpc_cli call on gribigo after adding reflection to it, and I see the same problem.

My suggestion is that you file a bug and someone (maybe Nathaniel or Rob) fix this so that reflection (grpcurl describe) works with gribigo , update the generated go bindings on GitHub, and when that’s done, I can rebuild EOS’s gribi server to fix it in EOS and have it included in a later code drop.

[1] https://github.com/grpc/grpc-go/blob/master/Documentation/server-reflection-tutorial.md#grpc-server-reflection-tutorial
[2] https://github.com/openconfig/gribigo 
[3] https://github.com/fullstorydev/grpcurl/issues/22#issuecomment-375274465 
[4] https://github.com/openconfig/ygot/blob/master/proto/ywrapper/ywrapper.pb.go#L25
[5] https://github.com/openconfig/gribi/blob/master/v1/proto/gribi_aft/gribi_aft.proto#L13

@dopufol
Copy link

dopufol commented Mar 15, 2024

I am seeing this issue as well and reflection is important for us. can you take a look at this problem?
Failed to list methods for service "gribi.gRIBI": file "v1/proto/gribi_aft/gribi_aft.proto" included an unresolvable reference to ".ywrapper.BytesValue"

the solution is suggested by @liulk above

this is similar to
openconfig/gnmi#95
openconfig/gnsi#176

@xw-g @robshakir

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