Merge "Enable LM back and forth flag for SRIOV"

This commit is contained in:
Zuul 2023-10-05 15:43:14 +00:00 committed by Gerrit Code Review
commit 9fd80a8b5a
3 changed files with 31 additions and 25 deletions

View File

@ -40,6 +40,7 @@ function configure {
iniset $TEMPEST_CONFIG compute-feature-enabled rbd_download "$COMPUTE_FEATURE_RBD_DOWNLOAD" iniset $TEMPEST_CONFIG compute-feature-enabled rbd_download "$COMPUTE_FEATURE_RBD_DOWNLOAD"
iniset $TEMPEST_CONFIG compute-feature-enabled uefi_secure_boot "$COMPUTE_FEATURE_UEFI_SECURE_BOOT" iniset $TEMPEST_CONFIG compute-feature-enabled uefi_secure_boot "$COMPUTE_FEATURE_UEFI_SECURE_BOOT"
iniset $TEMPEST_CONFIG compute-feature-enabled vtpm_device_supported "$COMPUTE_FEATURE_VTPM_ENABLED" iniset $TEMPEST_CONFIG compute-feature-enabled vtpm_device_supported "$COMPUTE_FEATURE_VTPM_ENABLED"
iniset $TEMPEST_CONFIG compute-feature-enabled live_migrate_back_and_forth "$COMPUTE_FEATURE_LIVE_MIGRATE_BACK_AND_FORTH"
} }
if [[ "$1" == "stack" ]]; then if [[ "$1" == "stack" ]]; then

View File

@ -24,3 +24,4 @@ COMPUTE_FEATURE_VIRTIO_RNG=${COMPUTE_FEATURE_VIRTIO_RNG:-'True'}
COMPUTE_FEATURE_RBD_DOWNLOAD=${COMPUTE_FEATURE_RBD_DOWNLOAD:-'False'} COMPUTE_FEATURE_RBD_DOWNLOAD=${COMPUTE_FEATURE_RBD_DOWNLOAD:-'False'}
COMPUTE_FEATURE_UEFI_SECURE_BOOT=${COMPUTE_FEATURE_UEFI_SECURE_BOOT:-'True'} COMPUTE_FEATURE_UEFI_SECURE_BOOT=${COMPUTE_FEATURE_UEFI_SECURE_BOOT:-'True'}
COMPUTE_FEATURE_VTPM_ENABLED=${COMPUTE_FEATURE_VTPM_ENABLED:-'True'} COMPUTE_FEATURE_VTPM_ENABLED=${COMPUTE_FEATURE_VTPM_ENABLED:-'True'}
COMPUTE_FEATURE_LIVE_MIGRATE_BACK_AND_FORTH=${COMPUTE_FEATURE_LIVE_MIGRATE_BACK_AND_FORTH:-'True'}

View File

@ -748,34 +748,38 @@ class SRIOVMigration(SRIOVBase):
'after first migration should be 1 but instead ' 'after first migration should be 1 but instead '
'is %s' % pci_allocated_count) 'is %s' % pci_allocated_count)
# Migrate server back to the original host if CONF.compute_feature_enabled.live_migrate_back_and_forth:
self.live_migrate(self.os_admin, server['id'], 'ACTIVE', # Migrate server back to the original host
target_host=host) self.live_migrate(self.os_admin, server['id'], 'ACTIVE',
target_host=host)
# Again find the instance's network device element based on the mac # Again find the instance's network device element based on the
# address and binding:vnic_type from the port info provided by ports # mac address and binding:vnic_type from the port info provided by
# client # ports client
interface_xml_element = self._get_xml_interface_device( interface_xml_element = self._get_xml_interface_device(
server['id'], server['id'],
port['port']['id'], port['port']['id'],
) )
# Confirm vlan tag in interface XML, dev_type, allocation status, and # Confirm vlan tag in interface XML, dev_type, allocation status,
# pci address information are correct in pci_devices table of openstack # and pci address information are correct in pci_devices table of
# DB after second migration # openstack DB after second migration
self._validate_port_xml_vlan_tag(interface_xml_element, self.vlan_id) self._validate_port_xml_vlan_tag(
self._verify_neutron_port_binding( interface_xml_element,
server['id'], self.vlan_id
port['port']['id'] )
) self._verify_neutron_port_binding(
server['id'],
port['port']['id']
)
# Confirm total port allocations still remains one after final # Confirm total port allocations still remains one after final
# migration # migration
pci_allocated_count = self._get_pci_status_count( pci_allocated_count = self._get_pci_status_count(
pci_device_status_regex) pci_device_status_regex)
self.assertEqual(pci_allocated_count, 1, 'Total allocated pci devices ' self.assertEqual(pci_allocated_count, 1, 'Total allocated pci '
'after second migration should be 1 but instead ' 'devices after second migration should be 1 but '
'is %s' % pci_allocated_count) 'instead is %s' % pci_allocated_count)
def test_sriov_direct_live_migration(self): def test_sriov_direct_live_migration(self):
"""Verify sriov live migration using direct type ports """Verify sriov live migration using direct type ports