Nir Soffer has posted comments on this change. Change subject: storage: Validate generation id in volume.operation context ......................................................................
Patch Set 2: Code-Review-1 (2 comments) https://gerrit.ovirt.org/#/c/64486/2/tests/storage_volume_test.py File tests/storage_volume_test.py: Line 142: pass Line 143: Line 144: @permutations(((100, 99), (100, 101))) Line 145: def test_operation_invalid_generation_raises(self, actual_generation, Line 146: requested_generation): test_operation_generation_mismatch? I think the arguments are reversed - 100 is the requested generation, and 99 and 101 are the actual generation. Line 147: img_id = gen_uuid() Line 148: vol_id = gen_uuid() Line 149: Line 150: with fake_env('file') as env: 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. 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 <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: gerrit-hooks <[email protected]> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list -- [email protected] To unsubscribe send an email to [email protected]
