Workaround Nova bug to fix test_qos_after_live_migration coverage

This relates to the `test_qos_after_live_migration` failure on CI jobs,
other tests running live migration do pass such as:
`tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_live_migration`.

If I understand correctly, this is the launchpad related from recent
discussion [1] opened a year ago, and still no assignee from nova.

Test attaches second interface for control on tenant VMs [2],
from reading about this nova bug, this follow-up test change will avoid
the issue by tenant VM reboot before live migration (renews MTU info),
so we'll still have full coverage of QoS after VM live migrate tested.

(Reproduced original issue and verified its fix on a podified setup,
both cold/live migration pass with change).

Notice that reverting this workaround will verify/add coverage for
Nova launchpad when fix available [1].

Resolves-Bug: OSPRH-19571
Related-Bug: #2080531

[1]
live migration fails if multiple networks exist on instance
https://bugs.launchpad.net/nova/+bug/2080531

[2]
957966: Control interface on tenant VMs for all QoS bandwidth tests | https://review.opendev.org/c/x/whitebox-neutron-tempest-plugin/+/957966

Signed-off-by: Maor Blaustein <mblue@redhat.com>
Change-Id: I51774b46d6918ca8abc4283f91ca759fbf2e86e2
This commit is contained in:
Maor Blaustein
2025-09-01 18:09:10 +03:00
parent 480c7b06d2
commit 592f6dc961

View File

@@ -1052,6 +1052,10 @@ class QosBaseTest(test_qos.QoSTestMixin, base.TrafficFlowTest):
self.os_admin.servers_client.confirm_resize_server(
vms[role]['id'])
elif migration_method == 'live-migration':
# TODO(mblue): reboot WA for nova LP#2080531, revert when fixed
self.os_admin.servers_client.reboot_server(
vms[role]['id'], type='SOFT')
self.wait_for_server_active(vms[role])
block_migration = (CONF.compute_feature_enabled.
block_migration_for_live_migration)
self.os_admin.servers_client.live_migrate_server(
@@ -1076,15 +1080,16 @@ class QosBaseTest(test_qos.QoSTestMixin, base.TrafficFlowTest):
# sender VM and receiver VM are in different hosts.
if vm_host['sender'] != vm_host['receiver']:
# NOTE(mblue): enable and re-add symmetric and strict routing
# for control ip address/nic after cold migration
if migration_method == 'cold-migration':
for _vm in (vms['sender'], vms['receiver']):
ctl_port = self._get_tenant_port_by_type(
_vm['id'], 'control')
utils.configure_interface_up(
_vm['ssh_client'], ctl_port)
self.tenant_sym_path_for_port(
_vm['ssh_client'], ctl_port)
# for control ip address/nic after cold migration.
# TODO(mblue): reboot WA for nova LP#2080531, revert when fixed
# to apply `tenant_sym_path_for_port` only on cold migration.
for _vm in (vms['sender'], vms['receiver']):
ctl_port = self._get_tenant_port_by_type(
_vm['id'], 'control')
utils.configure_interface_up(
_vm['ssh_client'], ctl_port)
self.tenant_sym_path_for_port(
_vm['ssh_client'], ctl_port)
self._validate_bw_limit(
bw_limit=max_kbps * 1000, client=vms['sender'],
server=vms['receiver'])