https://tracker.ceph.com/https://tracker.ceph.com/favicon.ico2016-11-29T06:08:39ZCeph rbd - Bug #17993: rbd-mirror: potential race mirroring cloned imagehttps://tracker.ceph.com/issues/17993?journal_id=821002016-11-29T06:08:39ZYang Dongshengdongsheng.yang@easystack.cn
<ul></ul><p>Hi Jason,<br /> What about add a key-value in header object to mark this image is ready for mirror or not? such as "mirror_ready = true|false".</p>
<p>Then when we are cloning an image, put an false in mirror_ready until all work finished, when rbd-mirror detect a new image in this pool, rbd-mirror should<br />check the mirror_ready at first, if false, wait a moment and check mirror_ready again until it's ready or timed out.</p>
<p>Does this sound good?</p>
<p>Jason Dillaman wrote:</p>
<blockquote>
<p>With pool-level replication enabled, when a clone is created, it first creates an empty standalone image and adds it to the mirroring directory. If the remote rbd-mirror daemon detects the new image before the clone process completes, it the replication will fail since it will try to create a non-cloned image on the remote side. This is a very small race potential that was discovered after improving new replicated image discovery.</p>
</blockquote> rbd - Bug #17993: rbd-mirror: potential race mirroring cloned imagehttps://tracker.ceph.com/issues/17993?journal_id=821382016-11-29T13:54:47ZJason Dillamandillaman@redhat.com
<ul></ul><p>We track this state already -- it's just being enabled too soon since clone is re-using the create image state machine. Therefore, the create image state machine just needs a bool to say "don't enable mirroring yet" and then instead the clone state machine will enable mirroring once it has completed setting the parent.</p> rbd - Bug #17993: rbd-mirror: potential race mirroring cloned imagehttps://tracker.ceph.com/issues/17993?journal_id=822212016-11-30T05:31:38ZYang Dongshengdongsheng.yang@easystack.cn
<ul></ul><p>Jason Dillaman wrote:</p>
<blockquote>
<p>We track this state already -- it's just being enabled too soon since clone is re-using the create image state machine. Therefore, the create image state machine just needs a bool to say "don't enable mirroring yet" and then instead the clone state machine will enable mirroring once it has completed setting the parent.</p>
</blockquote>
<p>Oh, yes, it's in RBD_MIRROR object. Okey, will reuse it. thanx</p> rbd - Bug #17993: rbd-mirror: potential race mirroring cloned imagehttps://tracker.ceph.com/issues/17993?journal_id=822972016-12-01T11:50:05ZYang Dongshengdongsheng.yang@easystack.cn
<ul></ul><p>Yang Dongsheng wrote:</p>
<blockquote>
<p>Jason Dillaman wrote:</p>
<blockquote>
<p>We track this state already -- it's just being enabled too soon since clone is re-using the create image state machine. Therefore, the create image state machine just needs a bool to say "don't enable mirroring yet" and then instead the clone state machine will enable mirroring once it has completed setting the parent.</p>
</blockquote>
<p>Oh, yes, it's in RBD_MIRROR object. Okey, will reuse it. thanx</p>
</blockquote>
<p>As I have a blocked pull request about CloneRequest, I will put this after CloneRequest merged.</p> rbd - Bug #17993: rbd-mirror: potential race mirroring cloned imagehttps://tracker.ceph.com/issues/17993?journal_id=826202016-12-06T20:54:03ZJason Dillamandillaman@redhat.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li><li><strong>Assignee</strong> set to <i>Jason Dillaman</i></li></ul> rbd - Bug #17993: rbd-mirror: potential race mirroring cloned imagehttps://tracker.ceph.com/issues/17993?journal_id=826602016-12-07T14:11:39ZJason Dillamandillaman@redhat.com
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Fix Under Review</i></li></ul><p><strong>PR</strong>: <a class="external" href="https://github.com/ceph/ceph/pull/12839">https://github.com/ceph/ceph/pull/12839</a></p> rbd - Bug #17993: rbd-mirror: potential race mirroring cloned imagehttps://tracker.ceph.com/issues/17993?journal_id=840472017-01-11T16:15:16ZMykola Golubmgolub@suse.com
<ul><li><strong>Status</strong> changed from <i>Fix Under Review</i> to <i>Pending Backport</i></li></ul> rbd - Bug #17993: rbd-mirror: potential race mirroring cloned imagehttps://tracker.ceph.com/issues/17993?journal_id=840732017-01-12T05:42:35ZLoïc Dacharyloic@dachary.org
<ul><li><strong>Copied to</strong> <i><a class="issue tracker-9 status-6 priority-4 priority-default closed" href="/issues/18500">Backport #18500</a>: jewel: rbd-mirror: potential race mirroring cloned image</i> added</li></ul> rbd - Bug #17993: rbd-mirror: potential race mirroring cloned imagehttps://tracker.ceph.com/issues/17993?journal_id=840752017-01-12T05:42:38ZLoïc Dacharyloic@dachary.org
<ul><li><strong>Copied to</strong> <i><a class="issue tracker-9 status-3 priority-4 priority-default closed" href="/issues/18501">Backport #18501</a>: kraken: rbd-mirror: potential race mirroring cloned image</i> added</li></ul> rbd - Bug #17993: rbd-mirror: potential race mirroring cloned imagehttps://tracker.ceph.com/issues/17993?journal_id=1057862018-01-25T05:23:33Zliuzhong chen
<ul></ul><p>I wonder this patch was signed backport to Jewel but not do it.Is there some problem to backport to jewel or something else?Thank you!</p> rbd - Bug #17993: rbd-mirror: potential race mirroring cloned imagehttps://tracker.ceph.com/issues/17993?journal_id=1060462018-01-26T18:02:12ZNathan Cutlerncutler@suse.cz
<ul></ul><p>I attempted the jewel backport at <a class="issue tracker-9 status-6 priority-4 priority-default closed" title="Backport: jewel: rbd-mirror: potential race mirroring cloned image (Rejected)" href="https://tracker.ceph.com/issues/18500">#18500</a> but it is beyond my abilities.</p> rbd - Bug #17993: rbd-mirror: potential race mirroring cloned imagehttps://tracker.ceph.com/issues/17993?journal_id=1060792018-01-28T10:58:10Zliuzhong chen
<ul></ul><p>Nathan Cutler wrote:</p>
<blockquote>
<p>I attempted the jewel backport at <a class="issue tracker-9 status-6 priority-4 priority-default closed" title="Backport: jewel: rbd-mirror: potential race mirroring cloned image (Rejected)" href="https://tracker.ceph.com/issues/18500">#18500</a> but it is beyond my abilities.</p>
</blockquote>
<p>@Nathan OK,thanks.</p> rbd - Bug #17993: rbd-mirror: potential race mirroring cloned imagehttps://tracker.ceph.com/issues/17993?journal_id=1205762018-09-12T19:21:45ZNathan Cutlerncutler@suse.cz
<ul><li><strong>Status</strong> changed from <i>Pending Backport</i> to <i>Resolved</i></li></ul>