Adam Litke has posted comments on this change. Change subject: storage: Validate generation id in volume.operation context ......................................................................
Patch Set 2: (2 comments) https://gerrit.ovirt.org/#/c/64486/1/tests/storage_volume_test.py File tests/storage_volume_test.py: Line 134: vol_id = gen_uuid() Line 135: generation = 100 Line 136: Line 137: with fake_env('file') as env: Line 138: env.make_volume(MB, img_id, vol_id) > Sure, most test do not care about generation, but they may need other metad Let's keep it as-is for now. Line 139: vol = env.sd_manifest.produceVolume(img_id, vol_id) Line 140: vol.setMetaParam(sc.GENERATION, 100) Line 141: with vol.operation(generation): Line 142: pass https://gerrit.ovirt.org/#/c/64486/2/vdsm/storage/volume.py File vdsm/storage/volume.py: Line 507: marked ILLEGAL prior to the first modification of data and subsequently Line 508: marked LEGAL again once the operation has completed. Thus, if an Line 509: interruption occurs the volume will remain in an ILLEGAL state. Line 510: Line 511: If generation is provided we check that the volume's generation matches > Missing period at the end. Done Line 512: """ Line 513: actual_gen = self.getMetaParam(sc.GENERATION) Line 514: if requested_gen is not None and actual_gen != requested_gen: Line 515: raise se.GenerationMismatch(requested_gen, actual_gen) -- To view, visit https://gerrit.ovirt.org/64486 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I77d9c6cb46053ab32c59c77599b7c1366e1c8196 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke <ali...@redhat.com> Gerrit-Reviewer: Adam Litke <ali...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org