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

Re: [Xen-devel] [PATCH] libxl/netbsd: check num_exec in hotplug function



On Mon, Jul 04, 2016 at 04:56:33AM -0700, John Nemeth wrote:
> On Jul 4, 12:23pm, Wei Liu wrote:
> } On Mon, Jul 04, 2016 at 12:09:30PM +0100, Wei Liu wrote:
> } > On Mon, Jul 04, 2016 at 01:11:04AM -0700, John Nemeth wrote:
> } > > On Jul 2, 12:35pm, Wei Liu wrote:
> } > > } +        /*
> } > > } +         * If domain has a stubdom we don't have to execute hotplug 
> scripts
> } > > } +         * for emulated interfaces
> } > > } +         */
> } > > } +        if ((num_exec > 1) ||
> } > > 
> } > >      The function is called with num_exec set to 0 and 1, so this
> } > > should be:
> } > > 
> } > >            if ((num_exec != 0) ||
> } > 
> } > AIUI this is related to how network is setup because we would need to
> } > hotplug both the emulated nic in QEMU and the PV nic. Is this line
> } > causing problem for you?
> } > 
> } > Wei.
> 
>      Yes, when the script is called the second time, it fails when
> trying to add the interface to the bridge and returns an error.
> This results in xl aborting the domU creation process and tearing
> it down.  If the script is supposed to be called twice, then there
> needs to be some way to distinguish the calls and what is supposed
> to happen during each call so the script can be adjusted.  The
> change above allowed me to bring up a domU and work with it (including
> network).  However, I only tested a PV domU, not an HVM one, so
> QEMU wasn't involved.

I've already replied to the other thread with the reason why this needs to 
be num_exec != 0 instead of num_exec > 1, and to avoid further confusion I 
would recommend Wei to add a comment here when the patch is updated, since 
this is a NetBSD-specific behavior that's not shared with other Dom0s:

http://lists.xenproject.org/archives/html/xen-devel/2016-07/msg00178.html

Roger.

_______________________________________________
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®.