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

Re: [Xen-devel] Custom block script started twice for root block but only stopped once



On 09/11/12 16:36, Roger Pau Monné wrote:
> On 08/11/12 09:26, Ian Campbell wrote:
>> On Fri, 2012-11-02 at 10:37 +0000, Sylvain Munaut wrote:
>>> Hi,
>>>
>>> I'm using a custom block script in my xen setup and when started, it
>>> creates a new device node pointing to some network resources.
>>>
>>> Now I noticed that the script is called twice for the root block, the
>>> first time for pygrub most likely, but is only stopped once ... I
>>> don't mind creating two devices node, but then I need to destroy both
>>> ...
>>>
>>> Is this a known issue ?
>>
>> Not one I've heard. Running "xl -vvv create" might provide some logs
>> which give an idea what is going on, likewise the logging
>> in /var/log/xen/...
>>
>> Roger -- any ideas?
> 
> Yes, I've been able to reproduce the error when using stubdoms, I'm
> currently working on a fix. Have you seen this when using stubdomains
> Sylvain?

I've been thinking about this, and I think it's the right thing to do to
call hotplug scripts twice when using stubdomains. Each script gets
called for the corresponding PV interface of each guest. Here is a
stripped trace of the creation of a guest with a stubdomain:

[...]
libxl: debug: libxl_device.c:919:device_hotplug: for-domain: 46 - calling 
hotplug script: /etc/xen/scripts/block add
[...]
libxl: debug: libxl_device.c:919:device_hotplug: for-domain: 47 - calling 
hotplug script: /etc/xen/scripts/block add
[...]
libxl: debug: libxl_device.c:919:device_hotplug: for-domain: 47 - calling 
hotplug script: /etc/xen/scripts/vif-bridge online
[...]
libxl: debug: libxl_device.c:919:device_hotplug: for-domain: 46 - calling 
hotplug script: /etc/xen/scripts/vif-bridge online
[...]

And the destruction:

[...]
libxl: debug: libxl_device.c:919:device_hotplug: for-domain: 47 - calling 
hotplug script: /etc/xen/scripts/block remove
[...]
libxl: debug: libxl_device.c:919:device_hotplug: for-domain: 47 - calling 
hotplug script: /etc/xen/scripts/vif-bridge offline
[...]
libxl: debug: libxl_device.c:919:device_hotplug: for-domain: 46 - calling 
hotplug script: /etc/xen/scripts/block remove
[...]
libxl: debug: libxl_device.c:919:device_hotplug: for-domain: 46 - calling 
hotplug script: /etc/xen/scripts/vif-bridge offline
[...]

So hotplug script gets called twice for both creation and
destruction. Can you run a guest creation/destruction with
-vvv and provide the output?

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