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] Update Transformation Task in InfraConversionJob #19154

Merged

Conversation

ghost
Copy link

@ghost ghost commented Aug 14, 2019

We want to port the WeightedUpdateStatus method to InfraConversionJob. The goal of the method is to update the ServiceTemplateTransformationPlanTask at each transition, so that the UI can display the information.

This PR introduces a new hash, states, that stores information about the states: description, weight and max_retries. These fields are used to update the task. Currently, only polling_timeout leverages this new hash. It has been changed to use max_retries.

We consider that a state has 4 hooks:

  • on_entry - the state starts running, including retries
  • on_retry - the state exits and the transition doesn't change the state
  • on_exit - the state exits and the transition changes the state
  • on_error - the state has failed

The update_migration_task_progress method generates a state hash with: state, status, message, percent, started_on and updated_on. Each hook can alter one or more attributes of the state hash. The state hash is then used to update the migration task progress.

This PR also simplifies poll_conversion and poll_post_stage method that shouldn't interfere with Automate methods. They are meant to only monitor virt-v2v and post-migration phases of the migration task. These methods will be updated when we port VMTransform, VMCheckTransformed methods, as well as the methods in PostTransform.

RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1740659
Built on #19149, #19164

@ghost
Copy link
Author

ghost commented Aug 14, 2019

@miq-bot add-label transformation, refactoring, ivanchuk/yes, wip

@miq-bot miq-bot changed the title V2v infraconversionjob update task status [WIP] V2v infraconversionjob update task status Aug 14, 2019
@ghost ghost changed the title [WIP] V2v infraconversionjob update task status [WIP][V2V] Update Transformation Task in InfraConversionJob Aug 19, 2019
@ghost ghost force-pushed the v2v_infraconversionjob_update_task_status branch from cb338b0 to fe7d59a Compare August 19, 2019 20:46
@miq-bot
Copy link
Member

miq-bot commented Aug 19, 2019

Checked commits fabiendupont/manageiq@b84d398~...c3941c4 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🍰

@ghost
Copy link
Author

ghost commented Aug 19, 2019

@miq-bot remove-label unmergeable, wip
@miq-bot add-reviewer @agrare

@miq-bot miq-bot changed the title [WIP][V2V] Update Transformation Task in InfraConversionJob [V2V] Update Transformation Task in InfraConversionJob Aug 19, 2019
@miq-bot miq-bot removed the wip label Aug 19, 2019
@miq-bot miq-bot requested a review from agrare August 19, 2019 21:36
@agrare agrare self-assigned this Aug 20, 2019
agrare added a commit that referenced this pull request Aug 23, 2019
…update_task_status

[V2V] Update Transformation Task in InfraConversionJob
@agrare agrare merged commit c3941c4 into ManageIQ:master Aug 23, 2019
@ghost ghost deleted the v2v_infraconversionjob_update_task_status branch August 23, 2019 12:14
@simaishi
Copy link
Contributor

Ivanchuk backport details:

$ git log -1
commit e390b1a4a212fac15df8428ec7a9030028ab9f31
Author: Adam Grare <agrare@redhat.com>
Date:   Fri Aug 23 08:11:31 2019 -0400

    Merge pull request #19154 from fdupont-redhat/v2v_infraconversionjob_update_task_status
    
    [V2V] Update Transformation Task in InfraConversionJob
    
    (cherry picked from commit 22d2201fed08be23567f7a18869c6832338d2420)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1767637

@simaishi
Copy link
Contributor

simaishi commented Dec 3, 2019

Reverted the backport

commit 569331fdba4f2a6d83cbc9c775e68c8583d1433e
Author: Satoe Imaishi <simaishi@redhat.com>
Date:   Tue Dec 3 12:47:09 2019 -0500

    Revert "Merge pull request #19154 from fdupont-redhat/v2v_infraconversionjob_update_task_status"

    This reverts commit e390b1a4a212fac15df8428ec7a9030028ab9f31.

    https://bugzilla.redhat.com/show_bug.cgi?id=1767637

simaishi pushed a commit that referenced this pull request Feb 21, 2020
…update_task_status

[V2V] Update Transformation Task in InfraConversionJob

(cherry picked from commit 22d2201)

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

Ivanchuk backport details:

$ git log -1
commit 40c990985ae0688868f9a278de5ed155c6603af7
Author: Adam Grare <agrare@redhat.com>
Date:   Fri Aug 23 08:11:31 2019 -0400

    Merge pull request #19154 from fdupont-redhat/v2v_infraconversionjob_update_task_status

    [V2V] Update Transformation Task in InfraConversionJob

    (cherry picked from commit 22d2201fed08be23567f7a18869c6832338d2420)

    https://bugzilla.redhat.com/show_bug.cgi?id=1767637

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