Re: [ovs-dev] Cannot connect to vhost-user socket created on Openvswitch with DPDK
On Thu, Nov 26, 2015 at 11:26 AM, Aaron Conole wrote: > Ryan Yang writes: > > On Wed, Nov 25, 2015 at 10:53 PM, Aaron Conole > wrote: > > > >> Ryan Yang writes: > >> > Hello All, > >> > > >> > I am trying to connect to vhost-user socket created on openvswitch > with > >> > DPDK but kept receiving following error: > >> > > >> > error: internal error: process exited while connecting to monitor: > >> > 2015-11-25T19:19:02.192794Z qemu-kvm: -chardev > >> > socket,id=charnet2,path=/usr/local/var/run/openvswitch/vhost-user-1: > >> Failed > >> > to connect to socket: Permission denied > >> > 2015-11-25T19:19:02.193226Z qemu-kvm: -chardev > >> > socket,id=charnet2,path=/usr/local/var/run/openvswitch/vhost-user-1: > >> > chardev: opening backend "socket" failed > >> > > >> > I already made sure that the user and group are both root since I am > >> using > >> > root privilege and also have vhost-user socket created: > >> > >> Just to make sure, you qemu is running as root, too? > >> > > > > Yes, I am running it as root. > > > >> > >> > srwxr-x---. 1 root root0 Nov 25 09:02 capabilities.monitor.sock > >> > drwxr-xr-x. 3 root root 4096 Nov 25 10:05 channel > >> > drwxrwxrwx. 2 root root 4096 Nov 17 21:35 dump > >> > drwx--x--x. 2 root root 4096 Nov 3 21:59 nvram > >> > drwxr-xr-x. 2 root root 4096 Nov 17 21:35 save > >> > drwxr-xr-x. 2 root root 4096 Nov 17 21:35 snapshot > >> > [root@localhost qemu]# pwd > >> > /var/lib/libvirt/qemu > >> > [root@localhost qemu]# > >> > > >> > -rw-r--r--. 1 root root 6 Nov 25 07:07 ovs-vswitchd.pid > >> > -rw-r--r--. 1 root root 197120 Nov 25 07:18 vdisk.img > >> > srwxr-xr-x. 1 root root 0 Nov 26 02:11 vhost-user-1 > >> > [root@localhost openvswitch]# > >> > >> If I read this right, you have a vhost socket in /var/lib/libvirt/qemu, > >> but according to the following: > >> > > > > Sorry forgot to print the path, it's in /usr/local/var/run/openvswitch. > > > >> > >> > And following is the XML that I manually added for vhost-user > interface > >> > creation: > >> > > >> > > >> >>> > path='/usr/local/var/run/openvswitch/vhost-user-1' modd > >> > e='client'/> > >> > > >> > > >> > > >> > >> You've said that the vhost socket is in /usr/local/var/run/openvswitch? > >> Yes. > > I noticed your xml (I've reformatted it) says: > path='/usr/local/var/run/openvswitch/vhost-user-1' > modde='client'/> > > One property I see is modde, is that a typo from transferring to your > mail client? > > Here's a working example I have (for reference): > > > > mode='client'/> > > function='0x0'/> > > > I don't think that the tag is needed. > > The mode is okay because it is caused because of accessing terminal via console, and the address tag is also appended after saving the config. Another question is that, when I do 'virsh start', it actually executes qemu-kvm but not qemu-system-x86_64, does it matter? ___ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] Cannot connect to vhost-user socket created on Openvswitch with DPDK
Ryan Yang writes: > On Wed, Nov 25, 2015 at 10:53 PM, Aaron Conole wrote: > >> Ryan Yang writes: >> > Hello All, >> > >> > I am trying to connect to vhost-user socket created on openvswitch with >> > DPDK but kept receiving following error: >> > >> > error: internal error: process exited while connecting to monitor: >> > 2015-11-25T19:19:02.192794Z qemu-kvm: -chardev >> > socket,id=charnet2,path=/usr/local/var/run/openvswitch/vhost-user-1: >> Failed >> > to connect to socket: Permission denied >> > 2015-11-25T19:19:02.193226Z qemu-kvm: -chardev >> > socket,id=charnet2,path=/usr/local/var/run/openvswitch/vhost-user-1: >> > chardev: opening backend "socket" failed >> > >> > I already made sure that the user and group are both root since I am >> using >> > root privilege and also have vhost-user socket created: >> >> Just to make sure, you qemu is running as root, too? >> > > Yes, I am running it as root. > >> >> > srwxr-x---. 1 root root0 Nov 25 09:02 capabilities.monitor.sock >> > drwxr-xr-x. 3 root root 4096 Nov 25 10:05 channel >> > drwxrwxrwx. 2 root root 4096 Nov 17 21:35 dump >> > drwx--x--x. 2 root root 4096 Nov 3 21:59 nvram >> > drwxr-xr-x. 2 root root 4096 Nov 17 21:35 save >> > drwxr-xr-x. 2 root root 4096 Nov 17 21:35 snapshot >> > [root@localhost qemu]# pwd >> > /var/lib/libvirt/qemu >> > [root@localhost qemu]# >> > >> > -rw-r--r--. 1 root root 6 Nov 25 07:07 ovs-vswitchd.pid >> > -rw-r--r--. 1 root root 197120 Nov 25 07:18 vdisk.img >> > srwxr-xr-x. 1 root root 0 Nov 26 02:11 vhost-user-1 >> > [root@localhost openvswitch]# >> >> If I read this right, you have a vhost socket in /var/lib/libvirt/qemu, >> but according to the following: >> > > Sorry forgot to print the path, it's in /usr/local/var/run/openvswitch. > >> >> > And following is the XML that I manually added for vhost-user interface >> > creation: >> > >> > >> > > > path='/usr/local/var/run/openvswitch/vhost-user-1' modd >> > e='client'/> >> > >> > >> > >> >> You've said that the vhost socket is in /usr/local/var/run/openvswitch? >> Yes. I noticed your xml (I've reformatted it) says: One property I see is modde, is that a typo from transferring to your mail client? Here's a working example I have (for reference): I don't think that the tag is needed. ___ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] Cannot connect to vhost-user socket created on Openvswitch with DPDK
On Wed, Nov 25, 2015 at 10:53 PM, Aaron Conole wrote: > Ryan Yang writes: > > Hello All, > > > > I am trying to connect to vhost-user socket created on openvswitch with > > DPDK but kept receiving following error: > > > > error: internal error: process exited while connecting to monitor: > > 2015-11-25T19:19:02.192794Z qemu-kvm: -chardev > > socket,id=charnet2,path=/usr/local/var/run/openvswitch/vhost-user-1: > Failed > > to connect to socket: Permission denied > > 2015-11-25T19:19:02.193226Z qemu-kvm: -chardev > > socket,id=charnet2,path=/usr/local/var/run/openvswitch/vhost-user-1: > > chardev: opening backend "socket" failed > > > > I already made sure that the user and group are both root since I am > using > > root privilege and also have vhost-user socket created: > > Just to make sure, you qemu is running as root, too? > Yes, I am running it as root. > > > srwxr-x---. 1 root root0 Nov 25 09:02 capabilities.monitor.sock > > drwxr-xr-x. 3 root root 4096 Nov 25 10:05 channel > > drwxrwxrwx. 2 root root 4096 Nov 17 21:35 dump > > drwx--x--x. 2 root root 4096 Nov 3 21:59 nvram > > drwxr-xr-x. 2 root root 4096 Nov 17 21:35 save > > drwxr-xr-x. 2 root root 4096 Nov 17 21:35 snapshot > > [root@localhost qemu]# pwd > > /var/lib/libvirt/qemu > > [root@localhost qemu]# > > > > -rw-r--r--. 1 root root 6 Nov 25 07:07 ovs-vswitchd.pid > > -rw-r--r--. 1 root root 197120 Nov 25 07:18 vdisk.img > > srwxr-xr-x. 1 root root 0 Nov 26 02:11 vhost-user-1 > > [root@localhost openvswitch]# > > If I read this right, you have a vhost socket in /var/lib/libvirt/qemu, > but according to the following: > Sorry forgot to print the path, it's in /usr/local/var/run/openvswitch. > > > And following is the XML that I manually added for vhost-user interface > > creation: > > > > > >> path='/usr/local/var/run/openvswitch/vhost-user-1' modd > > e='client'/> > > > > > > > > You've said that the vhost socket is in /usr/local/var/run/openvswitch? > Yes. > > Tried all of the above but still has no luck. It would be really > > appreciated if anyone could help with this issue. Thanks again! > > I have actually been working on some patches for the ovs-ctl script to > use the -vhost_sock_dir directive and put sockets in a sgid > directory. They're not ready yet, but I could put the WIP up somewhere for > you to look and see if they give you some help. > > Thanks for the help! I also see there is a fix from version 1.2.18, not sure if this is the cause. virt-aa-helper: Fix permissions for vhost-user socket files (Michal Dubiel) ___ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] Cannot connect to vhost-user socket created on Openvswitch with DPDK
Ryan Yang writes: > Hello All, > > I am trying to connect to vhost-user socket created on openvswitch with > DPDK but kept receiving following error: > > error: internal error: process exited while connecting to monitor: > 2015-11-25T19:19:02.192794Z qemu-kvm: -chardev > socket,id=charnet2,path=/usr/local/var/run/openvswitch/vhost-user-1: Failed > to connect to socket: Permission denied > 2015-11-25T19:19:02.193226Z qemu-kvm: -chardev > socket,id=charnet2,path=/usr/local/var/run/openvswitch/vhost-user-1: > chardev: opening backend "socket" failed > > I already made sure that the user and group are both root since I am using > root privilege and also have vhost-user socket created: Just to make sure, you qemu is running as root, too? > srwxr-x---. 1 root root0 Nov 25 09:02 capabilities.monitor.sock > drwxr-xr-x. 3 root root 4096 Nov 25 10:05 channel > drwxrwxrwx. 2 root root 4096 Nov 17 21:35 dump > drwx--x--x. 2 root root 4096 Nov 3 21:59 nvram > drwxr-xr-x. 2 root root 4096 Nov 17 21:35 save > drwxr-xr-x. 2 root root 4096 Nov 17 21:35 snapshot > [root@localhost qemu]# pwd > /var/lib/libvirt/qemu > [root@localhost qemu]# > > -rw-r--r--. 1 root root 6 Nov 25 07:07 ovs-vswitchd.pid > -rw-r--r--. 1 root root 197120 Nov 25 07:18 vdisk.img > srwxr-xr-x. 1 root root 0 Nov 26 02:11 vhost-user-1 > [root@localhost openvswitch]# If I read this right, you have a vhost socket in /var/lib/libvirt/qemu, but according to the following: > And following is the XML that I manually added for vhost-user interface > creation: > > >path='/usr/local/var/run/openvswitch/vhost-user-1' modd > e='client'/> > > > You've said that the vhost socket is in /usr/local/var/run/openvswitch? > Tried all of the above but still has no luck. It would be really > appreciated if anyone could help with this issue. Thanks again! I have actually been working on some patches for the ovs-ctl script to use the -vhost_sock_dir directive and put sockets in a sgid directory. They're not ready yet, but I could put the WIP up somewhere for you to look and see if they give you some help. ___ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
