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

Add support to apply right-size recommendation during transformation #417

Merged
merged 2 commits into from
Sep 28, 2018

Conversation

ghost
Copy link

@ghost ghost commented Aug 30, 2018

When migrating a virtual machine, we have the opportunity to apply right-size recommendation as it is shutdown in the migration process. This brings the additional ability to shrink the target environment and lower the TCO.

Depends on:

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

@ghost
Copy link
Author

ghost commented Aug 30, 2018

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

@ghost
Copy link
Author

ghost commented Aug 30, 2018

@miq-bot add-reviewer mkanoor

@miq-bot miq-bot requested a review from mkanoor August 30, 2018 10:33
@ghost ghost force-pushed the v2v_apply_right_size branch from c159377 to 4fb23fa Compare August 30, 2018 12:05
@gmcculloug
Copy link
Member

@fdupont-redhat @bthurber I'm removing the blocker label for now as the associated BZ and dependent PRs (and their BZ) are currently not marked with the blocker label.

If this is truly a blocker fix then please set the flag on the BZs, update the dependent PRs and then we can reset here. Thanks.

@miq-bot
Copy link
Member

miq-bot commented Sep 17, 2018

This pull request is not mergeable. Please rebase and repush.

@ghost ghost force-pushed the v2v_apply_right_size branch from 4fb23fa to 73b22c7 Compare September 18, 2018 05:46
@JPrause
Copy link
Member

JPrause commented Sep 18, 2018

@miq-bot add_label blocker

@JPrause
Copy link
Member

JPrause commented Sep 18, 2018

@gmcculloug just saw your note about the blocker flag. Let me know if this should be removed (again),..however the BZ does have the blocker flag.

@gmcculloug gmcculloug self-assigned this Sep 18, 2018
@gmcculloug
Copy link
Member

@JPrause The blocker flag was added to the BZ on 08-31 which was the day after I commented on it here, so it is legit now.

def main
RIGHT_SIZE_ITEMS.each do |item|
next unless @task.get_option("right_size_strategy_#{item}".to_sym)
send("apply_right_size_#{item}", @task.get_option("right_size_strategy_#{item}".to_sym))
Copy link
Member

Choose a reason for hiding this comment

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

@fdupont-redhat If you are doing an expensive lookup it is better to store this value into a variable where you can give it a more meaningful name.

Minor change, but I would suggest using:

RIGHT_SIZE_ITEMS.each do |item|
  right_size_strategy = @task.get_option("right_size_strategy_#{item}".to_sym)
  send("apply_right_size_#{item}", right_size_strategy) if right_size_strategy
end

@miq-bot
Copy link
Member

miq-bot commented Sep 28, 2018

Checked commits fabiendupont/manageiq-content@73b22c7~...a0587ca with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 1 offense detected

content/automate/ManageIQ/Transformation/Infrastructure/VM/Common.class/methods/applyrightsize.rb

@gmcculloug gmcculloug merged commit 4f98a78 into ManageIQ:master Sep 28, 2018
@gmcculloug gmcculloug added this to the Sprint 96 Ending Oct 8, 2018 milestone Sep 28, 2018
@ghost ghost deleted the v2v_apply_right_size branch September 28, 2018 14:44
simaishi pushed a commit that referenced this pull request Oct 1, 2018
Add support to apply right-size recommendation during transformation

(cherry picked from commit 4f98a78)

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

simaishi commented Oct 1, 2018

Hammer backport details:

$ git log -1
commit e1affb42bcadf96c0ff5d1d0d82cb6a992cfb98f
Author: Greg McCullough <gmccullo@redhat.com>
Date:   Fri Sep 28 09:49:58 2018 -0400

    Merge pull request #417 from fdupont-redhat/v2v_apply_right_size
    
    Add support to apply right-size recommendation during transformation
    
    (cherry picked from commit 4f98a7855105eee49e8fe8373cbff98d6ebf2dbe)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1623072

simaishi pushed a commit that referenced this pull request Oct 1, 2018
Add support to apply right-size recommendation during transformation

(cherry picked from commit 4f98a78)

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

simaishi commented Oct 1, 2018

Gaprindashvili backport details:

$ git log -1
commit fc0936e426991e4877a8cb8e1baea28fcb5006d0
Author: Greg McCullough <gmccullo@redhat.com>
Date:   Fri Sep 28 09:49:58 2018 -0400

    Merge pull request #417 from fdupont-redhat/v2v_apply_right_size
    
    Add support to apply right-size recommendation during transformation
    
    (cherry picked from commit 4f98a7855105eee49e8fe8373cbff98d6ebf2dbe)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1634834

@simaishi
Copy link
Contributor

Reverted the Gaprindashvili backport.

$ git log -1
commit 814b21775347b0cbd4c4a960a51be48169c64ac1 (HEAD -> gaprindashvili, origin/gaprindashvili)
Author: Satoe Imaishi <simaishi@redhat.com>
Date:   Wed Oct 10 10:07:36 2018 -0400

    Revert "Merge pull request #417 from fdupont-redhat/v2v_apply_right_size"
    
    This reverts commit fc0936e426991e4877a8cb8e1baea28fcb5006d0.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1634834

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.

None yet

5 participants