From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= Subject: Re: Custom block script started twice for root block but only stopped once Date: Tue, 13 Nov 2012 17:49:59 +0100 Message-ID: <50A27A37.2090506@citrix.com> References: <1352363172.12977.87.camel@hastur.hellion.org.uk> <509D22E6.2090005@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <509D22E6.2090005@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Sylvain Munaut , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On 09/11/12 16:36, Roger Pau Monn=E9 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 h= otplug script: /etc/xen/scripts/block add [...] libxl: debug: libxl_device.c:919:device_hotplug: for-domain: 47 - calling h= otplug script: /etc/xen/scripts/block add [...] libxl: debug: libxl_device.c:919:device_hotplug: for-domain: 47 - calling h= otplug script: /etc/xen/scripts/vif-bridge online [...] libxl: debug: libxl_device.c:919:device_hotplug: for-domain: 46 - calling h= otplug script: /etc/xen/scripts/vif-bridge online [...] And the destruction: [...] libxl: debug: libxl_device.c:919:device_hotplug: for-domain: 47 - calling h= otplug script: /etc/xen/scripts/block remove [...] libxl: debug: libxl_device.c:919:device_hotplug: for-domain: 47 - calling h= otplug script: /etc/xen/scripts/vif-bridge offline [...] libxl: debug: libxl_device.c:919:device_hotplug: for-domain: 46 - calling h= otplug script: /etc/xen/scripts/block remove [...] libxl: debug: libxl_device.c:919:device_hotplug: for-domain: 46 - calling h= otplug 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?