[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [patch] xen udev rule interfering with openvpn



On Wed, May 23, 2012 at 9:04 PM, Teck Choon Giam
<giamteckchoon@xxxxxxxxx> wrote:
> On Wed, May 23, 2012 at 5:37 PM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
>> On Wed, 2012-05-23 at 03:22 +0100, Teck Choon Giam wrote:
>>
>>> >
>>> > I think the reason this effects xm and not xl is that libxl uses
>>> > script=none to disable qemu-ifup while xend does not and instead ends up
>>> > using qemu-ifup which does some fiddling with the device too, including
>>> > bringing it up.
>>>
>>> Ok, so default for xend is using script=qemu-ifup if script is not
>>> set?  Am I right about this?
>>
>> Yes.
>
> Thanks for clarifying.
>
>>
>>> > The proper fix is probably to change xend, I'm a bit wary of this,
>>> > especially for a 4.1 backport, but the following looks right and works
>>> > for me. It's a bit more complex since in libxl we seem to only do this
>>> > for Linux (i.e. not NetBSD) and I guess we should do the same in xend
>>> > too.
>>>
>>> Err... if we are going to change default behaviour will we be
>>> affecting those users who is upgrading from xen-4.1 to xen-4.2?
>>
>> This was already a deliberate change made in xl, it does not effect the
>> guest config, only the mechanisms by which that configuration is
>> achieved. I think extending this to xend in order not to break xend in
>> 4.2 is worthwhile.
>
> Noted.
>
>>
>> I don't think we should be backporting any of this to 4.1 though.
>
> You mean your tap to -emu patch series including the latest fix patch
> you posted shouldn't be backporting to 4.1?  If this is so, I am fine
> since there isn't much difference for me as personally I kept few
> custom patches in own xen packages.  Of course whatever get into
> upstream is better though :p

Just an update.  I have run my tests with your fix patch in
xen-unstable changeset 25386:340062faf298 and all are working fine.

Thanks again.

Kindest regards,
Giam Teck Choon


>
>>
>>> If your fix patch is going into xen-unstable for sure, I will re-run
>>> my tests by then.  I hope it doesn't affect current domUs
>>> configuration (I mean we shouldn't need to change domU configuration)
>>> especially when users prefer to use xm then xl in xen-4.2.
>>
>> There should be no guest config change necessary.
>
> Noted.
>
>>
>> Ian.
>
> Thanks for taking time to provide fix and responses.
>
> Kindest regards,
> Giam Teck Choon
>
>
>
>>
>>>
>>> Thanks.
>>>
>>> Kindest regards,
>>> Giam Teck Choon
>>>
>>>
>>> >
>>> > Ian
>>> >
>>> > # HG changeset patch
>>> > # User Ian Campbell <ian.campbell@xxxxxxxxxx>
>>> > # Date 1337692747 -3600
>>> > # Node ID 426bbf58cea4559464b6e5d3ff0f65324a5f5926
>>> > # Parent  72ca5bc4eb6b91fa8dff51d439bd05f5586179df
>>> > xend: do not run a hotplug script from qemu on Linux
>>> >
>>> > The current vif-hotplug-common.sh for renaming the tap device is failing
>>> > because it is racing with this script and therefore the device is 
>>> > unexpectedly
>>> > up when we come to rename it.
>>> >
>>> > Fix this in the same way as libxl does, by disabling the script (only on
>>> > Linux).
>>> >
>>> > Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
>>> >
>>> > diff -r 72ca5bc4eb6b -r 426bbf58cea4 tools/python/xen/xend/image.py
>>> > --- a/tools/python/xen/xend/image.py    Tue May 22 11:29:50 2012 +0100
>>> > +++ b/tools/python/xen/xend/image.py    Tue May 22 14:19:07 2012 +0100
>>> > @@ -919,8 +919,13 @@ class HVMImageHandler(ImageHandler):
>>> >                        (nics, mac, model))
>>> >             vifname = "vif%d.%d-emu" % (self.vm.getDomid(), nics-1)
>>> >             ret.append("-net")
>>> > -            ret.append("tap,vlan=%d,ifname=%s,bridge=%s" %
>>> > -                       (nics, vifname, bridge))
>>> > +            if osdep.tapif_script is not None:
>>> > +                script=",script=%s,downscript=%s" % \
>>> > +                        (osdep.tapif_script, osdep.tapif_script)
>>> > +            else:
>>> > +                script=""
>>> > +            ret.append("tap,vlan=%d,ifname=%s,bridge=%s%s" %
>>> > +                       (nics, vifname, bridge, script))
>>> >
>>> >         if nics == 0:
>>> >             ret.append("-net")
>>> > diff -r 72ca5bc4eb6b -r 426bbf58cea4 tools/python/xen/xend/osdep.py
>>> > --- a/tools/python/xen/xend/osdep.py    Tue May 22 11:29:50 2012 +0100
>>> > +++ b/tools/python/xen/xend/osdep.py    Tue May 22 14:19:07 2012 +0100
>>> > @@ -30,6 +30,10 @@ _vif_script = {
>>> >     "SunOS": "vif-vnic"
>>> >  }
>>> >
>>> > +_tapif_script = {
>>> > +    "Linux": "no",
>>> > +}
>>> > +
>>> >  PROC_XEN_BALLOON = '/proc/xen/balloon'
>>> >  SYSFS_XEN_MEMORY = '/sys/devices/system/xen_memory/xen_memory0'
>>> >
>>> > @@ -257,6 +261,7 @@ def _get(var, default=None):
>>> >
>>> >  xend_autorestart = _get(_xend_autorestart)
>>> >  vif_script = _get(_vif_script, "vif-bridge")
>>> > +tapif_script = _get(_tapif_script)
>>> >  lookup_balloon_stat = _get(_balloon_stat, _linux_balloon_stat)
>>> >  get_cpuinfo = _get(_get_cpuinfo, _linux_get_cpuinfo)
>>> >  prefork = _get(_get_prefork, _default_prefork)
>>> >
>>> >
>>
>>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.