Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V2V] Allow a retry to let virt-v2v start #479

Conversation

ghost
Copy link

@ghost ghost commented Dec 4, 2018

In slow environments, virt-v2v-wrapper may need a few seconds to start virt-v2v and to create the state file. This can lead the transformation check to fail because the file doesn't exist. With this PR, we allow a retry of VMCheckTransformed, i.e. 1 minute, to let virt-v2v-wrapper start the conversion and create the state file.

Associated RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1653407

@ghost
Copy link
Author

ghost commented Dec 4, 2018

@miq-bot add-label transformation, enhancement, hammer/yes, blocker

@miq-bot
Copy link
Member

miq-bot commented Dec 4, 2018

Checked commit fabiendupont@27bfa74 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. ⭐

@@ -44,8 +44,12 @@ def main
@handle.set_state_var(:ae_state_progress, 'message' => 'Disks transformation succeeded.', 'percent' => 100)
end
rescue => e
@handle.set_state_var(:ae_state_progress, 'message' => e.message)
raise
if @handle.root['ae_state_retries'] > 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fdupont-redhat Are their specific exceptions that we should catch or is it that the first exception is always caught and ignored and along the way we suppress the exception which will never get raised.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkanoor The exception will be raised again if it's legit, meaning that it actually failed. If it was only because virt-v2v-wrapper has not created the state file, a retry should be enough.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@tinaafitz tinaafitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fdupont-redhat Looks good.

@mkanoor mkanoor merged commit 7e6c26d into ManageIQ:master Dec 4, 2018
@mkanoor mkanoor added this to the Sprint 101 Ending Dec 17, 2018 milestone Dec 4, 2018
simaishi pushed a commit that referenced this pull request Dec 10, 2018
…sformation_check

[V2V] Allow a retry to let virt-v2v start

(cherry picked from commit 7e6c26d)

https://bugzilla.redhat.com/show_bug.cgi?id=1653407
@simaishi
Copy link
Contributor

Hammer backport details:

$ git log -1
commit d5ee55447fef56eb427bbf158f2856dc7fada42d
Author: Madhu Kanoor <[email protected]>
Date:   Tue Dec 4 14:21:02 2018 -0500

    Merge pull request #479 from fdupont-redhat/v2v_allow_retries_on_transformation_check
    
    [V2V] Allow a retry to let virt-v2v start
    
    (cherry picked from commit 7e6c26d09aa85c33080ffc05ee17d4792a2226c0)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1653407

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants