From: Ian Jackson Subject: Re: calling vif hotplug scripts more than once Date: Tue, 8 Jul 2014 17:49:40 +0100 Message-ID: <21436.8484.33089.306912@mariner.uk.xensource.com> References: <20140708151329.GA5637@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140708151329.GA5637@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Olaf Hering Cc: xen-devel@lists.xen.org, Ian Campbell , Roger Pau =?utf-8?Q?Monn=C3=A9?= List-Id: xen-devel@lists.xenproject.org Olaf Hering writes ("calling vif hotplug scripts more than once"): > > There is a regression in libxl in its handling of hotplug scripts. Its > not clear to me how to solve it. > > If in a Windows VM the network interface is disabled and reenabled in > the "Network and Sharing Center", the backend remains in state 2 and the > vif is not reconnected to the bridge. With xend all that was done via > udev. If run_hotplug_scripts in /etc/xen/xl.conf is set to 0 it works as > well. Surely the problem is just that the backend isn't going back to the operational state. I don't see why this would need the hotplug script to run again. > Looking through libxl it appears that libxl__device_nic_add -> > libxl__wait_device_connection -> device_backend_callback -> > device_hotplug does all the work. Unfortunately, device_backend_callback > unregisters the watch, so no further events will be received. It seems > device_backend_callback should call device_hotplug, and then register > yet another watch to wait for state changes so that it eventually > catches such a disable/enable event from the guest. > > Since all that is generic code, it seems this use case was not > considered. It looks like a one-shot approach to me. With xl, there is no daemon process which could do this waiting. Ian.