-
Notifications
You must be signed in to change notification settings - Fork 897
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
Conversation
|
||
def available_fit_flavors | ||
@available_fit_flavors ||= destination_manager.flavors.where( | ||
:cpus => source_vm.cpu_total_cores..Float::INFINITY, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 👍
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Checked commit bdunne@92fc0cd with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
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. |
https://trello.com/c/b90ZCyNm/183-extend-cf-api-for-mapping-of-osp-flavors-and-security-groups