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 best fit logic for transformations moving vms to openstack #17880

Merged
merged 1 commit into from
Aug 28, 2018

Conversation


def available_fit_flavors
@available_fit_flavors ||= destination_manager.flavors.where(
:cpus => source_vm.cpu_total_cores..Float::INFINITY,
Copy link
Member Author

Choose a reason for hiding this comment

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

@agrare Are there any other attributes that we need to match up?

Copy link
Member

Choose a reason for hiding this comment

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

@bdunne flavors just have a total number of CPUs so cpu_total_cores is the correct attribute 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

@agrare Do we need to worry about root disk or any of those attributes?

Copy link
Member

Choose a reason for hiding this comment

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

Ohh thought you meant specifically about CPUs. I don't know how/if the flavor's root_disk_size is used by the virt-v2v migration tool. @aufi @fdupont-redhat do you know?

Copy link
Member

Choose a reason for hiding this comment

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

ping @aufi @mansam @fdupont-redhat do you guy know what is required re: target flavor

Copy link
Member Author

Choose a reason for hiding this comment

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

Unless we have this information from fleecing the VM

Copy link
Member

Choose a reason for hiding this comment

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

So worst case, if we pick a flavor that has a root disk that is smaller than the VM that we're migrating from will the conversion fail?

/cc @rwmjones if you're reading this :D @fdupont-redhat because I know you get notifications

Copy link

Choose a reason for hiding this comment

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

@agrare TBH, I don't know. We should test it.
@rwjones do you have an environment to test it ?

Copy link
Member

Choose a reason for hiding this comment

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

@bdunne I say we merge this as-is with cpu/memory and come back and revisit after we get clarity on the disk size issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good, it's easy to add more later once we know what the right answer is.

@miq-bot
Copy link
Member

miq-bot commented Aug 20, 2018

Checked commit bdunne@92fc0cd 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. 🍪

@bdunne
Copy link
Member Author

bdunne commented Aug 27, 2018

@ghost
Copy link

ghost commented Aug 28, 2018

Would it be possible to add best fit logic that accounts for recommended CPUs and memory ? We are implementing that logic for oVirt / RHV and having it for OpenStack would be really nice.

@ghost
Copy link

ghost commented Aug 28, 2018

@agrare @bdunne do you want another PR for best fit with right size ?

@agrare agrare self-assigned this Aug 28, 2018
@agrare agrare merged commit a5cbf8c into ManageIQ:master Aug 28, 2018
@agrare agrare added this to the Sprint 94 Ending Sept 10, 2018 milestone Aug 28, 2018
@bdunne bdunne deleted the v2v_cloud_best_fit branch August 29, 2018 14:38
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.

6 participants