Closed dingrui37 closed 6 years ago
This dockerhub repo is the official one and the one I use for testing. There are 3 interesting docker images:
no-pi
is built with this Dockerfile (https://github.com/p4lang/behavioral-model/blob/master/Dockerfile.noPI): it is a pretty basic image and although it does include protobuf & gRPC, it does not support P4 Runtime.latest
is built with this Dockerfile (https://github.com/p4lang/behavioral-model/blob/master/Dockerfile): it has full support for P4 Runtime, and it probably is the image you want to use.stable
is similar to latest
but is built using the latest stable release (so right now it should be on the 1.10.x branch). One word of caution: there is no versioning for P4 Runtime (the p4lang/PI repo) yet, which means that there is no "stable" P4 Runtime version yet and the stable
bmv2 docker image may be using a non-compatible version of P4 Runtime. As a result you are probably better off using the latest
bmv2 docker image; I try to ensure that the top-of-tree for bmv2 & PI are compatible.I tried the latest version. It can be connected, but the set pipeline config the action is failed. Perhaps the bmv2 version is too old.
2018-02-09 13:35:06,578 | INFO | pool-46-thread-1 | RuntimeStub | 331 - org.opendaylight.p4plugin.runtime-impl - 0.1.0.SNAPSHOT | Set pipeline config exception, Status = Status{code=INVALID_ARGUMENT, description=Invalid SetForwardingPipeline action, cause=null}, Reason = INVALID_ARGUMENT: Invalid SetForwardingPipeline action
The bmv2 version on latest docker image:
root@94b42d119ba0:/behavioral-model# simple_switch_grpc --version
1.10.0-unknown
The bmv2 version on my local machine:
hll@hll:/home/opendaylight/p4lang/behavioral-model/mininet$ simple_switch_grpc --version
1.8.0-41c1f2ed
dr@dr:/home/opendaylight/P4/p4lang/behavioral-model$ simple_switch_grpc --version
1.9.0-0f53201b
As a result, I want to build image by myself with the Dockerfile.grpc file. Unfortunately, it is failed too, because of many network problems(As you know, we cannot access many networks in China and in private company network). Could you please build a image that support P4Runtime
and mininet, then I can pull it from Docker Hub, thank you very much. If you have a chance to China, I will invite you to taste Chinese food, haha. Thanks again.
sudo docker image build --tag p4lang/bmv2_grpc:1.0 -f Dockerfile.grpc .
....
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/universe/source/Sources Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.152 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/universe/source/Sources Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.152 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-backports/main/binary-amd64/Packages Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.152 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends git ca-certificates' returned a non-zero code: 100
dr@dr:/home/opendaylight/P4/p4lang/behavioral-model$
I believe you should use Dockerfile
, not Dockerfile.grpc
(I didn't mention Dockerfile.grpc
in my answer for a specific reason).
While I could build a new image, don't you think you would get the same error Invalid SetForwardingPipeline action
? Maybe you should try investigating this error first. If my memory serves me right, it is a pretty unambiguous error which means that you didn't set the action
field in the SetForwardingPipelineRequest
message: https://github.com/p4lang/PI/blob/master/proto/p4/p4runtime.proto#L469
The latest
image that you pull from dockergub cannot be too old; it includes the latest version of PI + bmv2.
I did not analyze the problem carefully, the SetForwardingPipelineConfigRequest
message has been changed, I will update my code.
I want to use bmv2 in my CI environment, I think using docker is the best choice. However, I have a few little questions. I searched "p4" on Docker Hub and found a repo. I want to know if this image is the official version? This Dockerfile is different from github. Should I build images with Dockerfile on github manually or download it directly from Docker Hub? Because of the lack of description of the tags, does the stable and latest support gRPC? Thanks.