Closed nguptaopensds closed 4 years ago
@kumarashit @himanshuvar @pravinran @wisererik @sushanthakumar If you people have any information and comments regarding this issue please submit here
Detailed description of issue : Problem statement: In GRPC client server architecture, the protobuf file is shared which enables them to communicate with each other.In this case, SODA Dock and Controller are separate microservices which has their own proto files and for communication they send/recieve the common structs to gRPC for creating a handshake. The problem is even though the projects are separate, they still have to maintain a continuity in proto in assigning the field number for an attribute. For example:
Here are struct from controller and dock proto for CreateVolumeOpts: Controller- model.proto message CreateVolumeOpts { // The uuid of the volume, optional when creating. string id = 1; // The name of the volume, required. string name = 2; // The requested capacity of the volume, required. int64 size = 3; // The description of the volume, optional. string description = 4; // When create volume from snapshot, this field is required. string snapshotId = 5; // The locality that volume belongs to, required. string availabilityZone = 6; // The service level that volume belongs to, required. // TODO: This item will be replace by profile, don't use it. string profileId = 7; // The uuid of the pool on which volume will be created, required. string poolId = 8; // The name of the pool on which volume will be created, required. string poolName = 9; } Dock - model.proto message CreateVolumeOpts { // The uuid of the volume, optional when creating. string id = 1; // The name of the volume, required. string name = 2; // The requested capacity of the volume, required. int64 size = 3; // The description of the volume, optional. string description = 4; // When create volume from snapshot, this field is required. string snapshotId = 5; // The locality that volume belongs to, required. string availabilityZone = 6; // The uuid of the pool on which volume will be created, required. string poolId = 8; // The name of the pool on which volume will be created, required. string poolName = 9; } Here if attribute "poolID" is tagged field number 8 in controller proto, similarly we had to assign 8 in dock as well missing field number 7 in the struct. This is not a right practice to assign field number in proto as it should be sequential.
Solutions analysis:
To solve the above problems we can have a few ways:
Conclusion: We can optimize SODA Dock and SODA Controller where we can check for the client server agreement for these services. If Controller is using/wrapping the dock grpc client, this grpcs client should be capable enough to send the right information/messages to the dock grpc server.
Won't fix
Is this a BUG REPORT or FEATURE REQUEST?: BUG
What happened: The modules SODA dock and SODA controller has been separated out from the hotpot project. After that segregation also, there are some inter-dependencies in gRPC client server communication and protobuf files, which leads to the build and CI issues. Plus the projects are not totally independent.
What you expected to happen: Both the projects/modules should run successfully after separation without any dependency on the other. The proto file should not be dependent on what version of gRPC we use in the project. Basically the communication between dock and controller should be successful and independent.
How to reproduce it (as minimally and precisely as possible): Just try to make a build with different gRPC versions , there will be a failure in protobuf file.
Anything else we need to know?: Need to come up with a generic solution to remove this dependency
Environment:
uname -a
):