Change in vdsm[master]: storage: GenerationMismatch exception
gerrit-hooks has posted comments on this change. Change subject: storage: GenerationMismatch exception .. Patch Set 8: * #64543::Update tracker: OK * Set MODIFIED::IGNORE, no Bug-Url found. -- To view, visit https://gerrit.ovirt.org/64543 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2eb9ffb326f343d89fa17af462c3bbfb18697a04 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: GenerationMismatch exception
Nir Soffer has submitted this change and it was merged. Change subject: storage: GenerationMismatch exception .. storage: GenerationMismatch exception Introduce a new exception with a public error code for generation mismatch errors. SDM verbs involving datapath operations will accept a generation parameter which will be compared against the operative entity's (eg. Volume) current generation. If the generation values match then the operation can proceed. Otherwise GenerationMismatch will be raised and the caller must resync against the actual storage state to determine how to proceed. Change-Id: I2eb9ffb326f343d89fa17af462c3bbfb18697a04 Signed-off-by: Adam LitkeReviewed-on: https://gerrit.ovirt.org/64543 Reviewed-by: Nir Soffer Continuous-Integration: Jenkins CI --- M lib/vdsm/storage/exception.py 1 file changed, 9 insertions(+), 1 deletion(-) Approvals: Adam Litke: Verified Nir Soffer: Looks good to me, approved Jenkins CI: Passed CI tests -- To view, visit https://gerrit.ovirt.org/64543 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2eb9ffb326f343d89fa17af462c3bbfb18697a04 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: GenerationMismatch exception
gerrit-hooks has posted comments on this change. Change subject: storage: GenerationMismatch exception .. Patch Set 7: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64543 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2eb9ffb326f343d89fa17af462c3bbfb18697a04 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: GenerationMismatch exception
gerrit-hooks has posted comments on this change. Change subject: storage: GenerationMismatch exception .. Patch Set 6: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64543 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2eb9ffb326f343d89fa17af462c3bbfb18697a04 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: GenerationMismatch exception
gerrit-hooks has posted comments on this change. Change subject: storage: GenerationMismatch exception .. Patch Set 5: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64543 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2eb9ffb326f343d89fa17af462c3bbfb18697a04 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: GenerationMismatch exception
Adam Litke has posted comments on this change. Change subject: storage: GenerationMismatch exception .. Patch Set 5: Verified with unit tests and SDM.copy_data functional testing. -- To view, visit https://gerrit.ovirt.org/64543 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2eb9ffb326f343d89fa17af462c3bbfb18697a04 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: GenerationMismatch exception
Adam Litke has posted comments on this change. Change subject: storage: GenerationMismatch exception .. Patch Set 4: Verified+1 Verified by unit tests and SDM.copy_data functional testing. -- To view, visit https://gerrit.ovirt.org/64543 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2eb9ffb326f343d89fa17af462c3bbfb18697a04 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: GenerationMismatch exception
gerrit-hooks has posted comments on this change. Change subject: storage: GenerationMismatch exception .. Patch Set 4: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64543 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2eb9ffb326f343d89fa17af462c3bbfb18697a04 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: GenerationMismatch exception
Nir Soffer has posted comments on this change. Change subject: storage: GenerationMismatch exception .. Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.ovirt.org/64543 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2eb9ffb326f343d89fa17af462c3bbfb18697a04 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: GenerationMismatch exception
gerrit-hooks has posted comments on this change. Change subject: storage: GenerationMismatch exception .. Patch Set 3: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64543 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2eb9ffb326f343d89fa17af462c3bbfb18697a04 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: GenerationMismatch exception
Adam Litke has posted comments on this change. Change subject: storage: GenerationMismatch exception .. Patch Set 1: (1 comment) https://gerrit.ovirt.org/#/c/64543/1/lib/vdsm/storage/exception.py File lib/vdsm/storage/exception.py: Line 1789: Line 1790: Line 1791: class GenerationMismatch(StorageException): Line 1792: code = 911 Line 1793: message = "The provided generation does not match the actual generation." > Actual number is 6 messages ending with period, 284 without. Ok. Removed. Line 1794: Line 1795: def __init__(self, requested, actual): -- To view, visit https://gerrit.ovirt.org/64543 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2eb9ffb326f343d89fa17af462c3bbfb18697a04 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: GenerationMismatch exception
gerrit-hooks has posted comments on this change. Change subject: storage: GenerationMismatch exception .. Patch Set 2: * update_tracker: OK * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64543 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2eb9ffb326f343d89fa17af462c3bbfb18697a04 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: GenerationMismatch exception
Nir Soffer has posted comments on this change. Change subject: storage: GenerationMismatch exception .. Patch Set 1: (1 comment) https://gerrit.ovirt.org/#/c/64543/1/lib/vdsm/storage/exception.py File lib/vdsm/storage/exception.py: Line 1789: Line 1790: Line 1791: class GenerationMismatch(StorageException): Line 1792: code = 911 Line 1793: message = "The provided generation does not match the actual generation." > Most error messages do not end with period, I think this is good. The messa Actual number is 6 messages ending with period, 284 without. Line 1794: Line 1795: def __init__(self, requested, actual): -- To view, visit https://gerrit.ovirt.org/64543 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2eb9ffb326f343d89fa17af462c3bbfb18697a04 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: GenerationMismatch exception
Nir Soffer has posted comments on this change. Change subject: storage: GenerationMismatch exception .. Patch Set 1: (1 comment) https://gerrit.ovirt.org/#/c/64543/1/lib/vdsm/storage/exception.py File lib/vdsm/storage/exception.py: Line 1776: Line 1777: Line 1778: # Line 1779: # SDM Errors Line 1780: # Range: 910-919 I meant to submit this unrelated change separately, not the entire exception, but you can leave the exception in a separte patch if you like. Line 1781: # Line 1782: Line 1783: class DomainHasGarbage(StorageException): Line 1784: code = 910 -- To view, visit https://gerrit.ovirt.org/64543 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2eb9ffb326f343d89fa17af462c3bbfb18697a04 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: GenerationMismatch exception
Nir Soffer has posted comments on this change. Change subject: storage: GenerationMismatch exception .. Patch Set 1: Code-Review-1 (1 comment) https://gerrit.ovirt.org/#/c/64543/1/lib/vdsm/storage/exception.py File lib/vdsm/storage/exception.py: Line 1789: Line 1790: Line 1791: class GenerationMismatch(StorageException): Line 1792: code = 911 Line 1793: message = "The provided generation does not match the actual generation." Most error messages do not end with period, I think this is good. The message from vdsm is not the error message show to a user, is is text engine may show as part of an error, maybe with additional info, so this is not the place to format a sentence. $ grep 'message =' lib/vdsm/storage/exception.py | egrep '\."$' | wc -l 2 $ grep 'message =' lib/vdsm/storage/exception.py | egrep -v '\."$' | wc -l 290 This search is missing some long lines wrapped to two lines, but the trend is clear. Line 1794: Line 1795: def __init__(self, requested, actual): -- To view, visit https://gerrit.ovirt.org/64543 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2eb9ffb326f343d89fa17af462c3bbfb18697a04 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: GenerationMismatch exception
gerrit-hooks has posted comments on this change. Change subject: storage: GenerationMismatch exception .. Patch Set 1: * update_tracker: OK * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64543 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2eb9ffb326f343d89fa17af462c3bbfb18697a04 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: GenerationMismatch exception
Adam Litke has uploaded a new change for review. Change subject: storage: GenerationMismatch exception .. storage: GenerationMismatch exception Introduce a new exception with a public error code for generation mismatch errors. SDM verbs involving datapath operations will accept a generation parameter which will be compared against the operative entity's (eg. Volume) current generation. If the generation values match then the operation can proceed. Otherwise GenerationMismatch will be raised and the caller must resync against the actual storage state to determine how to proceed. Change-Id: I2eb9ffb326f343d89fa17af462c3bbfb18697a04 Signed-off-by: Adam Litke--- M lib/vdsm/storage/exception.py 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/43/64543/1 diff --git a/lib/vdsm/storage/exception.py b/lib/vdsm/storage/exception.py index dcd2922..ee56673 100644 --- a/lib/vdsm/storage/exception.py +++ b/lib/vdsm/storage/exception.py @@ -1777,7 +1777,7 @@ # # SDM Errors -# Range: 909-910 +# Range: 910-919 # class DomainHasGarbage(StorageException): @@ -1786,3 +1786,11 @@ def __init__(self, reason): self.value = reason + + +class GenerationMismatch(StorageException): +code = 911 +message = "The provided generation does not match the actual generation." + +def __init__(self, requested, actual): +self.value = "requested=%s, actual=%s" % (requested, actual) -- To view, visit https://gerrit.ovirt.org/64543 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2eb9ffb326f343d89fa17af462c3bbfb18697a04 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org