Comment 2 for bug 1091480

Revision history for this message
Brano Zarnovican (zarnovican) wrote :

I'm attaching a quick _temporary_ workaround for this issue. It will make sure that only one thread can execute DatasetEditCommit. The other thread(s) will be blocked until it can grab the semaphore lock.

Here is an example of 6s gap, where the thread was blocked:
2013-01-14 13:53:56 DEBUG nova.utils [req-76e7048d-596a-4510-947a-a9a35c8bbc96 01021119097b49f99cc13928c918bceb 103a49bb861e485ea05aa78f9b0216bd] Attempting to grab semaphore "dfm-ds-edit-lock" for method "_provision"... from (pid=24310) inner /opt/common-python/lib/python2.6/site-packages/nova/utils.py:928
2013-01-14 13:54:02 DEBUG nova.utils [req-76e7048d-596a-4510-947a-a9a35c8bbc96 01021119097b49f99cc13928c918bceb 103a49bb861e485ea05aa78f9b0216bd] Got semaphore "dfm-ds-edit-lock" for method "_provision"... from (pid=24310) inner /opt/common-python/lib/python2.6/site-packages/nova/utils.py:932

I did not put synchronize decorator around create/delete_snapshot because there, the LUN creation is done differently. I'm not sure if it's affected too..