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] Add restoring_vm_attributes state to InfraConversionJob #19240

Merged

Conversation

ghost
Copy link

@ghost ghost commented Sep 2, 2019

For IMS 1.3 we're moving state machine handling from automate into core. For ease of writing and review, we're breaking this down into (hopefully) easily digestible bits, one state at a time. Each PR will ultimately have a corresponding PR in manageiq-content that deletes the relevant bit of code from automate.

Original automate code:
https://github.com/ManageIQ/manageiq-content/blob/master/content/automate/ManageIQ/Transformation/Infrastructure/VM/Common.class/__methods__/restorevmattributes.rb

This PR adds restoring_vm_attributes state to the state machine. The state machine is changed to allow transition from applying_right_sizing.

RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1748075
Depends on #19149, #19150, #19154, #19177, #19200, #19216, #19222, #19230, #19238
Built on #19238

@ghost
Copy link
Author

ghost commented Sep 2, 2019

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

@ghost
Copy link
Author

ghost commented Sep 3, 2019

@miq-bot add-reviewer @djberg96

def apply_right_sizing_memory(mode)
destination_vm.set_memory(source_vm.send("#{mode}_recommended_mem"))
end

Copy link
Contributor

Choose a reason for hiding this comment

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

Aren't these already in #19238? Not a big deal, just thought it was odd.

@djberg96
Copy link
Contributor

@fdupont-redhat seems like you mixed in a lot of identical code from #19238 which is making this a little difficult to review.

@ghost ghost force-pushed the v2v_state_machine_restore_vm_attributes branch from fb0987e to 9f57a48 Compare September 10, 2019 14:02
@ghost
Copy link
Author

ghost commented Sep 10, 2019

@djberg96 it's indeed built on #19238. And this PR is the base for #19241... Now that it's been rebased, it should be easier to review.

@ghost
Copy link
Author

ghost commented Sep 10, 2019

@miq-bot remove-label unmergeable

@miq-bot
Copy link
Member

miq-bot commented Sep 10, 2019

Checked commits fabiendupont/manageiq@ff66fba~...9f57a48 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. 🍪

Copy link
Contributor

@djberg96 djberg96 left a comment

Choose a reason for hiding this comment

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

Thanks for the update. LGTM!

@agrare agrare self-assigned this Sep 10, 2019
@agrare agrare merged commit 399ea75 into ManageIQ:master Sep 10, 2019
@agrare agrare added this to the Sprint 120 Ending Sep 16, 2019 milestone Sep 10, 2019
@ghost ghost deleted the v2v_state_machine_restore_vm_attributes branch September 10, 2019 15:14
simaishi pushed a commit that referenced this pull request Nov 4, 2019
…re_vm_attributes

[V2V] Add restoring_vm_attributes state to InfraConversionJob

(cherry picked from commit 399ea75)

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

simaishi commented Nov 4, 2019

Ivanchuk backport details:

$ git log -1
commit b752d4ea431f546f88353b33eaed8270ce679022
Author: Adam Grare <agrare@redhat.com>
Date:   Tue Sep 10 11:08:33 2019 -0400

    Merge pull request #19240 from fdupont-redhat/v2v_state_machine_restore_vm_attributes
    
    [V2V] Add restoring_vm_attributes state to InfraConversionJob
    
    (cherry picked from commit 399ea7509a84116aaa897e7d62fcdd67cabe6bfe)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1768524

simaishi added a commit that referenced this pull request Dec 3, 2019
@simaishi
Copy link
Contributor

simaishi commented Dec 3, 2019

Reverted the backport

commit 4b68205522258dc147168260b0f46618a3871bf1
Author: Satoe Imaishi <simaishi@redhat.com>
Date:   Tue Dec 3 12:44:34 2019 -0500

    Revert "Merge pull request #19240 from fdupont-redhat/v2v_state_machine_restore_vm_attributes"

    This reverts commit b752d4ea431f546f88353b33eaed8270ce679022.

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

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

[V2V] Add restoring_vm_attributes state to InfraConversionJob

(cherry picked from commit 399ea75)

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

Ivanchuk backport details:

$ git log -1
commit bb3e55cce33d391a21d4a25d4eb47f9c769a4a29
Author: Adam Grare <agrare@redhat.com>
Date:   Tue Sep 10 11:08:33 2019 -0400

    Merge pull request #19240 from fdupont-redhat/v2v_state_machine_restore_vm_attributes

    [V2V] Add restoring_vm_attributes state to InfraConversionJob

    (cherry picked from commit 399ea7509a84116aaa897e7d62fcdd67cabe6bfe)

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

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