[P4-dev] p4runtime (related to dev-day python code) error

Zeeshan Lakhani zeeshan.lakhani at gmail.com
Tue Jan 30 14:51:01 EST 2018


We're working on a test harness with containernet/mininet to work along
with the p4runtime to test our code. We ran into an very specific error
that we'd love to get more explanation on. We've started with examples from
the last Developer Day, specifically advanced_tunnel.p4. Everything works
swell in the VM. However, in calling SetForwardingPipelineConfig for the
second switch, e.g. below

``` s1 = p4runtime.bmv2.Bmv2SwitchConnection('s1', address='127.0.0.1:50051
')
    s2 = p4runtime.bmv2.Bmv2SwitchConnection('s2', address='127.0.0.1:50052
')

    # Install the P4 program on the switches
    s1.SetForwardingPipelineConfig(p4info=p4info_helper.p4info,
                                   bmv2_json_file_path=bmv2_file_path)
    print ("Installed P4 Program using SetForwardingPipelineConfig on %s" %
s1.name)

    s2.SetForwardingPipelineConfig(p4info=p4info_helper.p4info,
                                   bmv2_json_file_path=bmv2_file_path)
    print ("Installed P4 Program using SetForwardingPipelineConfig on %s" %
s2.name)```

... we get this grpc error traceback (*after s1 is correctly configured*):

```
Installed P4 Program using SetForwardingPipelineConfig on s1
Traceback (most recent call last):
  File "test.py", line 203, in <module>
    main(args.p4info, args.bmv2_json)
  File "test.py", line 156, in main
    bmv2_json_file_path=bmv2_file_path)
  File "../p4runtime/switch.py", line 49, in SetForwardingPipelineConfig
    self.client_stub.SetForwardingPipelineConfig(request)
  File "/usr/local/lib/python2.7/site-packages/grpc/_channel.py", line 507,
in __call__
    return _end_unary_response_blocking(state, call, False, deadline)
  File "/usr/local/lib/python2.7/site-packages/grpc/_channel.py", line 455,
in _end_unary_response_blocking
    raise _Rendezvous(state, None, None, deadline)
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with
(StatusCode.UNKNOWN, Error when assigning device)>
```

Looking at both requests (switch.py in p4runtime_lib) and configs,
everything should work the same, but we're wondering if anyone has
encountered this error, as what's given is a bit hard to interpret. Maybe
there's a good place for us to look and debug as well.

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20180130/c62c737a/attachment-0002.html>


More information about the P4-dev mailing list