Port-xen archive

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

Re: locked hotplug scripts



On Wed, Mar 30, 2016 at 01:33:00PM +0200, Manuel Bouyer wrote:
> I did run an anita with 4 extra file-backed devices, without problems.

Cool. Very good.  Then I'll go with that version.

> > I've done my tests with 4, 5, and 10 virtual disks.  In part to check
> > that the problems in port-xen/50659 have gone away.
> 
> Even with 5 disks, I've never been able to reproduce port-xen/50659
> on my system. 

Really?  The unmodified block script would cause "xl create" to immediately
bomb out because of it wanted to allocate the same vnd more than once.
That was easily reproducible.

> AFAIK there's no reason to lock for so long. The xenstore can handle
> multiple writes just fine.

Maybe the additional locking in the Linux version is because of
xen-hotplug-cleanup.

> Also your version has a bug: if error() is called, the lock is released
> twice, or you release a lock you didn't claim

Are you sure?  That's specifically what the test of "$_have_lock = 1" is
for.  The lock needs to be released when the script exits, whether due to a
signal or an "exit" statement.

--chris


Home | Main Index | Thread Index | Old Index