BootAndLiveMigrateServer does wrong target host selection

Bug #1734914 reported by Tom Patzig
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Rally
Fix Released
Undecided
Tom Patzig

Bug Description

BootAndLiveMigrateServer is using rally's own function to find a migration target host.

https://github.com/openstack/rally/blob/22cebd1da187a621be7a0f9b94cab7c1e2ba5a2e/rally/plugins/openstack/scenarios/nova/servers.py#L720

In this function only the AZ of the instance is evaluated, to filter hosts.

https://github.com/openstack/rally/blob/22cebd1da187a621be7a0f9b94cab7c1e2ba5a2e/rally/plugins/openstack/scenarios/nova/utils.py#L788

This is wrong, if you have multiple aggregates and use nova's AggregateInstanceExtraSpecsFilter, e.g. to separate hosts that support live_migration and those who don't.

IMHO, the function _find_host_to_migrate can be completely skipped here and target_host should not be given in the _live_migrate function, to just let nova-scheduler make the decision on the target host, including all enabled filters.

https://github.com/openstack/rally/blob/22cebd1da187a621be7a0f9b94cab7c1e2ba5a2e/rally/plugins/openstack/scenarios/nova/utils.py#L754

Reproduce:

1. Create 2 aggregates with computes in each, one aggr with metadata live_migrate=true
2. Create a flavor with property live_migrate=true
3. use rally task BootAndLiveMigrateServer

It will randomly fail, whenever it chooses a compute from the wrong aggregate.

Revision history for this message
Tom Patzig (tom-patzig) wrote :
Changed in rally:
assignee: nobody → Tom Patzig (tom-patzig)
status: New → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to rally (master)

Reviewed: https://review.openstack.org/523865
Committed: https://git.openstack.org/cgit/openstack/rally/commit/?id=290355e1855dc9821b28c1c6b82dca6584c8820d
Submitter: Zuul
Branch: master

commit 290355e1855dc9821b28c1c6b82dca6584c8820d
Author: Tom Patzig <email address hidden>
Date: Wed Nov 29 12:56:45 2017 +0100

    Do not use own function to find migration target

    The nova scenarios BootServerAttachCreatedVolumeAndLiveMigrate,
    BootServerFromVolumeAndLiveMigrate, BootAndLiveMigrateServer are using
    rally's own function to find a suitable target compute host for live
    migration.
    This function does not support all filters that are available and
    configured in nova. This function only filters computes on AZ level.
    For example it completely ignores flavor-aggregate mappings
    (AggregateInstanceExtraSpecsFilter). This leads to wrong target host
    selection and thus a failing live migration.
    This patch removes the function _find_host_to_migrate and the argument
    target_host that was given into the function _live_migrate.
    This leaves the target host selection completely up to nova,
    for live migration, which allows to benefit from the whole nova
    scheduler filters implementation, to find a suitable host.

    Change-Id: Ide64667a5e482b10b8935e9ebd7655c0004c6a0b
    Closes-Bug: #1734914

Changed in rally:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.