Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-22810

Disk size should not be considered in flavor matching as the toolkit uses boot-from-volume instances

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • Important

      Description
      The best_match_flavor module currently includes the flavor's root disk size (flavor.Disk) in the distance calculation when finding the best matching flavor. However, since the toolkit exclusively uses boot-from-volume for instance creation, the flavor's root disk property is irrelevant and should be excluded from the matching algorithm.

      Problem
      The current flavorDistance function calculates the "distance" between a flavor and VM requirements using vCPU, RAM, and disk:

       

      func flavorDistance(flavor *flavors.Flavor, guestInfo *GuestInfo, diskCapacityMb int) int {
       vcpuDiff := int(math.Abs(float64(flavor.VCPUs - guestInfo.HwProcessorCount)))
       ramDiff := int(math.Abs(float64(flavor.RAM - guestInfo.HwMemtotalMb)))
       diskDiff := int(math.Abs(float64(flavor.Disk - diskCapacityMb)))
       return vcpuDiff + ramDiff + diskDiff
      }

       

      https://github.com/os-migrate/vmware-migration-kit/blame/9263692d7c7f35b0136ce0d62f83919f9e85e5a3/plugins/modules/src/best_match_flavor/best_match_flavor.go#L103

      This causes issues because:

      1. Boot-from-volume ignores the flavor's root disk: When booting from a Cinder volume, the flavor.Disk value refers to an ephemeral root disk that is never created or used.
      2. Suboptimal flavor selection: The algorithm may reject or deprioritize a perfectly suitable flavor (correct vCPU and RAM) simply because its disk value doesn't match the VM's disk size.
      3. Customer confusion: Users report that the toolkit "requires" a flavor with a root disk size matching their VM, even though that disk space is never actually used.

              rhn-engineering-mbultel mathieu bultel
              pnavarro@redhat.com Pedro Navarro Perez
              rhos-dfg-migrations
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: