[Kimchi-devel] Locking for multi-user env?

Aline Manera alinefm at linux.vnet.ibm.com
Tue Feb 23 13:17:19 UTC 2016


Hi,

Kimchi uses a lock to do operations in the virtual machines.
But I think you want a generic solution for any Resource or Collection, 
if so, there is no built in support for it yet.

I don't see any reason to have a lock on a Collection as only GET and 
POST methods are allowed in it.
And the POST action is only to create a new Resource in the given 
Collection.

About your solution, I don't think we need a file. We can use 
threading.Lock() to do that.

Regards,
Aline Manera

On 02/19/2016 09:17 AM, Harshal Patil wrote:
> Hi,
> I need to be able to lock certain operations on a Resource or Resource 
> Collection to make their access serialized.
> Is there already any in-built support for it?
> If not, I was thinking of creating a lock file in /var/lock/wok and to 
> block access by other users to that resource unless the lock is 
> cleared. This lock(s) also needs to be cleared by wok startup script 
> just in case the wok crashed or stopped forcefully before the lock is 
> cleared by the owner process.
>
>
>
> _______________________________________________
> Kimchi-devel mailing list
> Kimchi-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/kimchi-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/kimchi-devel/attachments/20160223/77a2f141/attachment.html>


More information about the Kimchi-devel mailing list