<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle19
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">There’s also some similar situations when we actually don’t lock on resources. For  example – a cgsnapshot may get deleted while creating a consistencygroup from
 it.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">From my perspective it seems best to have atomic state changes and state-based exclusion in API. We would need some kind of currently_used_to_create_snapshot/volums/consistencygroups
 states to achieve that. Then we would be also able to return VolumeIsBusy exceptions so retrying a request would be on the user side.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Duncan Thomas [mailto:duncan.thomas@gmail.com]
<br>
<b>Sent:</b> Sunday, June 28, 2015 12:16 PM<br>
<b>To:</b> OpenStack Development Mailing List<br>
<b>Subject:</b> Re: [openstack-dev] [cinder][oslo] Locks for create from volume/snapshot<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p>We need mutual exclusion for several operations. Whether that is done by entity queues, locks, state based locking at the api later, or something else, we need mutual exclusion.<o:p></o:p></p>
<p>Our current api does not lend itself to looser consistency, and I struggle to come up with a sane api that does - nobody doing an operation on a volume  wants it to happen maybe, at some time...<o:p></o:p></p>
<div>
<p class="MsoNormal">On 28 Jun 2015 07:30, "Avishay Traeger" <<a href="mailto:avishay@stratoscale.com">avishay@stratoscale.com</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">Do we really need any of these locks?  I'm sure we could come up with some way to remove them, rather than make them distributed.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Sun, Jun 28, 2015 at 5:07 AM, Joshua Harlow <<a href="mailto:harlowja@outlook.com" target="_blank">harlowja@outlook.com</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">John Griffith wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><br>
<br>
On Sat, Jun 27, 2015 at 11:47 AM, Joshua Harlow <<a href="mailto:harlowja@outlook.com" target="_blank">harlowja@outlook.com</a><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><mailto:<a href="mailto:harlowja@outlook.com" target="_blank">harlowja@outlook.com</a>>> wrote:<br>
<br>
    Duncan Thomas wrote:<br>
<br>
        We are working on some sort of distributed replacement for the<br>
        locks in<br>
        cinder, since file locks are limiting our ability to do HA. I'm<br>
        afraid<br>
        you're unlikely to get any traction until that work is done.<br>
<br>
        I also have a concern that some backend do not handle load well,<br>
        and so<br>
        benefit from the current serialisation. It might be necessary to<br>
        push<br>
        this lock down into the driver and allow each driver to choose it's<br>
        locking model for snapshots.<br>
<br>
<br>
    IMHO (and I know this isn't what everyone thinks) but I'd rather<br>
    have cinder (and other projects) be like this from top gear (<br>
    <a href="https://www.youtube.com/watch?v=xnWKz7Cthkk" target="_blank">https://www.youtube.com/watch?v=xnWKz7Cthkk</a> ) where that toyota<br>
    truck is virtually indestructible vs. trying to be a<br>
    high-maintenance ferrari (when most openstack projects do a bad job<br>
    of trying to be one). So, maybe for a time (and I may regret saying<br>
    this) we could consider focusing on reliability, consistency, being<br>
    the toyota vs. handling some arbitrary amount of load (trying to be<br>
    a ferrari).<br>
<br>
    Also I'd expect/think operators would rather prefer a toyota at this<br>
    stage of openstack :) Ok enough analogies, ha.<br>
<br>
<br>
​Well said Josh, I guess I've been going about this all wrong by not<br>
using the analogies :)​<o:p></o:p></p>
</div>
</div>
</blockquote>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
Exactly!! IMHO should be the new 'openstack mantra, built from components/projects that survive like a toyota truck' haha. Part 2 (<a href="https://www.youtube.com/watch?v=xTPnIpjodA8" target="_blank">https://www.youtube.com/watch?v=xTPnIpjodA8</a>) and part
 3 (<a href="https://www.youtube.com/watch?v=kFnVZXQD5_k" target="_blank">https://www.youtube.com/watch?v=kFnVZXQD5_k</a>) are funny/interesting also :-P<br>
<br>
Now we just need openstack to be that reliable and tolerant of failures/calamities/...<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><br>
<br>
    -Josh<br>
<br>
<br>
        On 27 Jun 2015 06:18, "niuzhenguo" <<a href="mailto:niuzhenguo@huawei.com" target="_blank">niuzhenguo@huawei.com</a><br>
        <mailto:<a href="mailto:niuzhenguo@huawei.com" target="_blank">niuzhenguo@huawei.com</a>><br>
        <mailto:<a href="mailto:niuzhenguo@huawei.com" target="_blank">niuzhenguo@huawei.com</a> <mailto:<a href="mailto:niuzhenguo@huawei.com" target="_blank">niuzhenguo@huawei.com</a>>>><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
        wrote:<br>
<br>
             Hi folks,____<br>
<br>
             __ __<br>
<br>
             Currently we use a lockfile to protect the create<br>
        operations from<br>
             concurrent delete the source volume/snapshot, we use<br>
        exclusive____<br>
<br>
             locks on both delete and create sides which will ensure<br>
        that:____<br>
<br>
             __ __<br>
<br>
             __1.__If a create of VolA from snap/VolB is in progress,<br>
        any delete<br>
             requests for snap/VolB will wait until the create is<br>
        complete.____<br>
<br>
             __2.__If a delete of snap/VolA is in progress, any create from<br>
             snap/VolA will wait until snap/VolA delete is complte.____<br>
<br>
             __ __<br>
<br>
             but, the exclusive locks will also result in:____<br>
<br>
             __ __<br>
<br>
             __3.__If a create of VolA from snap/VolB is inprogress, any<br>
        other<br>
             create requests from snap/VolB will wait until the create is<br>
             complete. ____<br>
<br>
             __ __<br>
<br>
             So the create operations from same volume/snapshot can not<br>
        process<br>
             on parallel, please reference bp [1].____<br>
<br>
             I’d like to change the current filelock or introduce a new<br>
        lock to<br>
             oslo.concurrency.____<br>
<br>
             __ __<br>
<br>
             Proposed change:____<br>
<br>
             Add exclusive(write) locks for delete operations and<br>
        shared(read)<br>
             locks for create operations, to ensure that create from<br>
             volume/snapshot____<br>
<br>
             can work on parallel and protect create operations from<br>
        concurrent<br>
             delete the source volume/snapshot.____<br>
<br>
             __ __<br>
<br>
             I’d like to get what’s your suggestions, thanks in advance.____<br>
<br>
             __ __<br>
<br>
             [1]<br>
        <a href="https://blueprints.launchpad.net/cinder/+spec/enhance-locks____" target="_blank">
https://blueprints.launchpad.net/cinder/+spec/enhance-locks____</a><br>
<br>
             __ __<br>
<br>
             __ __<br>
<br>
             -zhenguo____<br>
<br>
<br>
<br>
        __________________________________________________________________________<br>
             OpenStack Development Mailing List (not for usage questions)<br>
             Unsubscribe:<br>
        <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
        <<a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a>><br>
        <<a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a>><br>
        <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
        __________________________________________________________________________<br>
        OpenStack Development Mailing List (not for usage questions)<br>
        Unsubscribe:<br>
        <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
        <<a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a>><br>
        <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
<br>
    __________________________________________________________________________<br>
    OpenStack Development Mailing List (not for usage questions)<br>
    Unsubscribe:<br>
    <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
    <<a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a>><br>
    <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><o:p></o:p></p>
</div>
</div>
</blockquote>
<div>
<div>
<p class="MsoNormal"><br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><b><span style="font-size:9.5pt;color:#666666">Avishay Traeger</span></b><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><i><span style="color:#666666">Storage R&D</span></i><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#666666">Mobile: </span>+972 54 447 1475<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#666666">E-mail: <a href="mailto:avishay@stratoscale.com" target="_blank"><span style="color:#1155CC">avishay@stratoscale.com</span></a></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><img border="0" id="_x0000_i1025" src="http://www.stratoscale.com/wp-content/uploads/Logo-Signature-Stratoscale-230.jpg"><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p style="margin:0in;margin-bottom:.0001pt"><a href="http://www.stratoscale.com/" target="_blank"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1155CC">Web</span></a><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> | </span><a href="http://www.stratoscale.com/blog/" target="_blank"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1155CC">Blog</span></a><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#6CA3D6"> | </span><a href="https://twitter.com/Stratoscale" target="_blank"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1155CC">Twitter</span></a><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#6CA3D6"> | <a href="https://plus.google.com/u/1/b/108421603458396133912/108421603458396133912/posts" target="_blank"><span style="color:#1155CC">Google+</span></a> | </span><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><a href="https://www.linkedin.com/company/stratoscale" target="_blank"><span style="color:#1155CC">Linkedin</span></a></span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</body>
</html>