ipdk-io / ipdk

Infrastructure Programmer Development Kit (IPDK) is an open source, vendor agnostic framework of drivers and APIs for infrastructure offload and management that runs on a CPU, IPU, DPU or switch.
Apache License 2.0
185 stars 68 forks source link

Seeing failures running example scenario #127

Open 5abeel opened 2 years ago

5abeel commented 2 years ago

This is the first time I am trying the containerized build and following the instructions from this page: https://github.com/ipdk-io/ipdk/blob/main/build/networking/README_DOCKER.md

Running on a Fedora 33 system, I have skipped the initial optional Vagrant setup. Installed docker, qemu, nested virtualization etc Initial build of container and launching it was ok. I can see the two ovs processes running on the container.

In the Step2 of the page, I tried the ipdk demo first which resulted in numerous errors, so tried the manual process. First command fails with the following error.

[root@localhost ~]# ipdk connect
fatal: not a git repository (or any of the parent directories): .git
Loaded /root/ipdk/build/networking/scripts/ipdk_default.env
Loaded /root/.ipdk/ipdk.env
[root@0a02925905b5 scripts]# ps -ef | grep ovs
root          42       1  0 07:53 ?        00:00:00 ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock --remote=db:Open_vSwitch,Open_vSwitch,manager_options --pidfile --detach
root          46       1  4 07:53 ?        00:00:00 ovs-vswitchd --pidfile --detach --no-chdir --mlockall --log-file=/tmp/logs/ovs-vswitchd.log
root          86      67  0 07:53 pts/1    00:00:00 grep --color=auto ovs
[root@0a02925905b5 scripts]# exit
exit
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# ipdk execute --- gnmi-cli set "device:virtual-device,name:net_vhost0,host:host1,device-type:VIRTIO_NET,queues:1,socket-path:/tmp/intf/vhost-user-0,port-type:LINK"
fatal: not a git repository (or any of the parent directories): .git
Loaded /root/ipdk/build/networking/scripts/ipdk_default.env
Loaded /root/.ipdk/ipdk.env
Return grpc errno (14), Reason: failed to connect to all addresses
[root@localhost ~]#

One other potential problem i've noticed with my setup is even after installing kvm reports a 'command not found' error. Cant seem to find a solution online. However, I can use 'qemu-kvm' and that works fine.

mestery commented 2 years ago

What happens if you login to the container and run the gnmi-cli command? Do you still see the same error? And if so, what do the error logs in /tmp indicate?

5abeel commented 2 years ago

Same error

[root@0a02925905b5 logs]# gnmi-cli set "device:virtual-device,name:net_vhost0,host:host1,device-type:VIRTIO_NET,queues:1,socket-path:/tmp/intf/vhost-user-0,port-type:LINK"
Return grpc errno (14), Reason: failed to connect to all addresses
[root@0a02925905b5 logs]#

I dont see any activity in the /tmp/logs folder. Following are the last lines of the two log files

[root@0a02925905b5 logs]# tail -f ovs-vswitchd.log
2022-04-06T07:53:20.238Z|00001|vlog|INFO|opened log file /tmp/logs/ovs-vswitchd.log
2022-04-06T07:53:20.252Z|00002|ovs_numa|INFO|Discovered 24 CPU cores on NUMA node 0
2022-04-06T07:53:20.252Z|00003|ovs_numa|INFO|Discovered 24 CPU cores on NUMA node 1
2022-04-06T07:53:20.252Z|00004|ovs_numa|INFO|Discovered 2 NUMA nodes and 48 CPU cores
2022-04-06T07:53:20.463Z|00005|reconnect|INFO|unix:/usr/local/var/run/openvswitch/db.sock: connecting...
2022-04-06T07:53:20.463Z|00006|reconnect|INFO|unix:/usr/local/var/run/openvswitch/db.sock: connected
2022-04-06T07:53:20.472Z|00007|bridge|INFO|ovs-vswitchd (Open vSwitch) 2.16.90
2022-04-06T07:53:34.898Z|00008|memory|INFO|199732 kB peak resident set size after 14.7 seconds
2022-04-06T07:53:34.898Z|00009|memory|INFO|idl-cells:18

^C
[root@0a02925905b5 logs]# tail -f p4server_test.0a02925905b5.root.log.INFO.20220406-075320.46
Log file created at: 2022/04/06 07:53:20
Running on machine: 0a02925905b5
Running duration (h:mm:ss): 0:00:00
Log line format: [IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
I20220406 07:53:20.481941    58 p4_service_interface.cc:86] P4 server: listen port created ...

^C
mestery commented 2 years ago

I've seen this before. If you stop and then restart the ipdk container, does the gnmi-cli work after that?

jokuniew commented 2 years ago

I've created VM with vagrant (Virtualbox), tried to set up vhost-user ports in ipdk demo and got the same error setting vhost_dev = true.Return grpc errno (14), Reason: failed to connect to all addresses