We have a need for a distributed lock in the VMware driver, which I suspect isn't unique. Specifically it is possible for a VMware datastore to be accessed via multiple nova nodes if it is shared between clusters[1]. Unfortunately the vSphere API doesn't provide us with the primitives to implement robust locking using the storage layer itself, so we're looking elsewhere.
The closest we seem to have in Nova currently are service groups, which currently have 3 implementations: DB, Zookeeper and Memcached. The service group api currently provides simple membership, but for locking we'd be looking for something more. I think the api we'd be looking for would be something along the lines of: Foo.lock(name, fence_info) Foo.unlock(name) Bar.fence(fence_info) Note that fencing would be required in this case. We believe we can fence by terminating the other Nova's vSphere session, but other options might include killing a Nova process, or STONITH. These would be implemented as fencing drivers. Although I haven't worked through the detail, I believe lock and unlock would be implementable in all 3 of the current service group drivers. Fencing would be implemented separately. My questions: * Does this already exist, or does anybody have patches pending to do something like this? * Are there other users for this? * Would service groups be an appropriate place, or a new distributed locking class? * How about if we just used zookeeper directly in the driver? Matt [1] Cluster ~= hypervisor -- Matthew Booth Red Hat Engineering, Virtualisation Team Phone: +442070094448 (UK) GPG ID: D33C3490 GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490 _______________________________________________ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev