Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 188465 - net-misc/vde-2.1.6-r1 together with qemu/kvm sockets in the wrong directory
Summary: net-misc/vde-2.1.6-r1 together with qemu/kvm sockets in the wrong directory
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Nico Baggus
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-11 12:45 UTC by Jochen Schlick
Modified: 2009-03-24 14:19 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jochen Schlick 2007-08-11 12:45:26 UTC
Hi,

vde shows some strange behavior when vde_switch is started without the -m and -g command line options. 
Without a modified /etc/init.d/vde script:
  --exec /usr/bin/vde_switch -- -tap ${VDE_TAP} -sock /var/run/vde.ctl -daemon
the sockets vde.ctl.xxxxx will be placed directly in the /var/run - directory and not in the /var/run/vde.ctl/ directory! The result in my case is that my qemu/kvm guests are not able to communicate to the net...

When I add "-m 770" and "-g kvm" (because I use qemu/kvm) and "-M /var/run/vde.mgmt" (because I like to control my vlans using unixterm) to the vde_switch line in /etc/init.d/vde everything works.

I think these options should have their concerning env.var in /etc/conf.d/vde


########################## here my modified /etc/conf.d/vde:

# load the tun module
VDE_MODPROBE_TUN="yes"
# virtual tap networking device to be used for vde
VDE_TAP="tap0"
# mode and group for the socket
VDE_SOCK_CHMOD="770"
#
# instead of VDE_SOCK_CHOWN now VDE_SOCK_GROUP
#VDE_SOCK_CHOWN=":qemu"
VDE_SOCK_GROUP="qemu"
#
VDE_SOCK_CTLDIR="/var/run/vde.ctl"
VDE_SOCK_MGMT="/var/run/vde.mgmt"
#
#

#################################### here the modified part of /etc/init.d/vde:
start() {
        ebegin "Starting vde"
        [ "${VDE_MODPROBE_TUN}" == "yes" ] && modprobe tun
        start-stop-daemon --start --quiet \
                --exec /usr/bin/vde_switch -- -tap ${VDE_TAP} \
                -m ${VDE_SOCK_CHMOD} \
                -g ${VDE_SOCK_GROUP} \
                -sock ${VDE_SOCK_CTLDIR} \
                -M ${VDE_SOCK_MGMT} -daemon
        eend $? "Failed to start vde"
        chmod -R ${VDE_SOCK_CHMOD}  ${VDE_SOCK_CTLDIR}
        chown -R :${VDE_SOCK_GROUP} ${VDE_SOCK_CTLDIR}
        chmod -R ${VDE_SOCK_CHMOD}  ${VDE_SOCK_MGMT}
        chown -R :${VDE_SOCK_GROUP} ${VDE_SOCK_MGMT}
}

Reproducible: Always
Comment 1 Jochen Schlick 2007-08-12 15:07:58 UTC
I thought the modified config/startscript solves the problem but after a reboot I had the same problem(no working network) again when I start qemu/kvm using the following line. :-(

vdeq qemu-system-x86_64 \
        -net nic,macaddr=52:54:00:00:EE:A2 \
        -net vde,sock=/var/run/vde.ctl \
        -m 256 -localtime \
        -soundhw all \
        -boot c \
        -hda fedora32.img \
        1>fc32.log 2>fc32.err &


Further investigation shows that vde_switch must have some problems with a still existing /var/run/vde.ctl directory + files in this directory from former runs (normally this directory is automatically deleted). So I have to remove a eventually existing /var/run/vde.ctl directory before I can run vde_switch.

This behavior is reproducible: 
Kill vde_switch after last guest was terminated and then restart vde with /etc/init.d/vde restart. Start a new qemu guest and then no working network at all. 


Note: 
the mode variable in qemu/vdeq.c is sometimes not initialized. And the vdeq -m parameter for mode settings" may conflict with qemu's -m parameter.
Comment 2 Nico Baggus 2007-08-20 18:04:56 UTC
Just back from holiday, expect some more later this week/early next week.
Comment 3 Torsten Grote 2007-10-02 09:34:43 UTC
paludis complains that there are no whitespaces in the DEPEND String after '(' and before ')'
Comment 4 Torsten Grote 2007-10-02 09:36:18 UTC
I'm awfully sorry for posting in the wrong bug :(
Comment 5 Johan Bergström 2008-09-07 13:48:05 UTC
I had similar issues which were fixed by the recent ebuild bump (vde-2.2.2). Give it a try!
Comment 6 Johan Bergström 2009-02-26 10:23:55 UTC
Can anyone else reproduce this in recent ebuilds? I can't. Please close otherwise..
Comment 7 Daniel Gryniewicz (RETIRED) gentoo-dev 2009-03-24 14:19:59 UTC
This is working with 2.2.2, as far as I can tell.