[openstack-dev] [Heat] Locking and ZooKeeper - a space oddysey

Georgy Okrokvertskhov gokrokvertskhov at mirantis.com
Wed Oct 30 18:04:29 UTC 2013


Hi Clint,

I think you rose a point here. We implemented distributed engine in Murano
without locking mechanism by keeping state consistent on each step. We
extracted this engine from Murano and plan to put it as a part of Mistral
project for task management and execution. Working Mistral implementation
will appear during IceHouse development. We are working closely with
taskflow team, so I think you can expect to have distributed task execution
support in taskflow library natively or through Mistral.

I am not against ZooKeeper but I think that for OpenStack service it is
better to use oslo library shared with other projects instead of adding
some custom locking mechanism for one project.

Thanks
Georgy


On Wed, Oct 30, 2013 at 10:42 AM, Clint Byrum <clint at fewbar.com> wrote:

> So, recently we've had quite a long thread in gerrit regarding locking
> in Heat:
>
> https://review.openstack.org/#/c/49440/
>
> In the patch, there are two distributed lock drivers. One uses SQL,
> and suffers from all the problems you might imagine a SQL based locking
> system would. It is extremely hard to detect dead lock holders, so we
> end up with really long timeouts. The other is ZooKeeper.
>
> I'm on record as saying we're not using ZooKeeper. It is a little
> embarrassing to have taken such a position without really thinking things
> through. The main reason I feel this way though, is not because ZooKeeper
> wouldn't work for locking, but because I think locking is a mistake.
>
> The current multi-engine paradigm has a race condition. If you have a
> stack action going on, the state is held in the engine itself, and not
> in the database, so if another engine starts working on another action,
> they will conflict.
>
> The locking paradigm is meant to prevent this. But I think this is a
> huge mistake.
>
> The engine should store _all_ of its state in a distributed data store
> of some kind. Any engine should be aware of what is already happening
> with the stack from this state and act accordingly. That includes the
> engine currently working on actions. When viewed through this lense,
> to me, locking is a poor excuse for serializing the state of the engine
> scheduler.
>
> It feels like TaskFlow is the answer, with an eye for making sure
> TaskFlow can be made to work with distributed state. I am not well
> versed on TaskFlow's details though, so I may be wrong. It worries me
> that TaskFlow has existed a while and doesn't seem to be solving real
> problems, but maybe I'm wrong and it is actually in use already.
>
> Anyway, as a band-aid, we may _have_ to do locking. For that, ZooKeeper
> has some real advantages over using the database. But there is hesitance
> because it is not widely supported in OpenStack. What say you, OpenStack
> community? Should we keep ZooKeeper out of our.. zoo?
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



-- 
Georgy Okrokvertskhov
Technical Program Manager,
Cloud and Infrastructure Services,
Mirantis
http://www.mirantis.com
Tel. +1 650 963 9828
Mob. +1 650 996 3284
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20131030/93297cce/attachment.html>


More information about the OpenStack-dev mailing list