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

Re: Network script is invoked twice - in parallel!



On Sat, May 06, 2023 at 03:42:15PM +0200, Sven Köhler wrote:
> Hi all,
> 
> I observe that my networking script is invoked twice - in parallel! - when I
> execute "xl create ..." or reboot a domU.
> I added the following the beginning/end of my script:
> 
> > echo "$$ ${command} ${dev} ${ip} | $@" >>/tmp/xen.log
> > ...
> > echo "$$ done" >>/tmp/xen.log
> 
> 
> The output is:
> 
> > 1575914 online vif34.0 195.x.x.x 2a01:x:x:x:x::2/66 | online type_if=vif
> > 1575916 online vif34.0 195.x.x.x 2a01:x:x:x:x::2/66 | online type_if=vif
> > 1575914 done
> > 1575916 done
> 
> 
> I am using Xen 4.17.1.
> 
> How can I prevent that from happening? The script fails randomly since it is
> executed in parallel twice!
> 
> I would expect that the script is executed once only.

I don't think that is expected...  I think there are three ways that the
hotplug event can be handled:

- udev rules (deprecated?)
- `xl devd` (required in a domU driver domain)
- directly from `xl create`

If you've done an upgrade are there some old udev rules hanging around?  If
not do you have an `xl devd` process running?  systemd unit
xendriverdomain.service or /etc/init.d/xendriverdomain, the init.d script
looks to have a check to not run in dom0 but the systemd unit doesn't have
the same.

If these don't help how about recording more information in the debug log
so you can see the full process tree of each invocation of the network
script.

James



 


Rackspace

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