@@ -974,15 +974,14 @@ def _recreate_assigned_mediated_devices(self):
974
974
# vGPU type. We can't recreate the mdev until the operator
975
975
# modifies the configuration.
976
976
parent = "{}:{}:{}.{}".format(*parent[4:].split('_'))
977
- msg = ("The instance UUID %(inst)s uses a VGPU that "
978
- "its parent pGPU %(parent)s no longer "
979
- "supports as the instance vGPU type %(type)s "
980
- "is not accepted for the pGPU. Please correct "
977
+ msg = ("The instance UUID %(inst)s uses a mediated device "
978
+ "type %(type)s that is no longer supported by the "
979
+ "parent PCI device, %(parent)s. Please correct "
981
980
"the configuration accordingly." %
982
981
{'inst': instance_uuid,
983
982
'parent': parent,
984
983
'type': dev_info['type']})
985
- raise exception.InvalidLibvirtGPUConfig (reason=msg)
984
+ raise exception.InvalidLibvirtMdevConfig (reason=msg)
986
985
self._create_new_mediated_device(parent, uuid=mdev_uuid)
987
986
988
987
def _check_file_backed_memory_support(self):
@@ -7430,15 +7429,15 @@ def _get_supported_vgpu_types(self):
7430
7429
return [first_type]
7431
7430
for device_address in group.device_addresses:
7432
7431
if device_address in self.pgpu_type_mapping:
7433
- raise exception.InvalidLibvirtGPUConfig (
7432
+ raise exception.InvalidLibvirtMdevConfig (
7434
7433
reason="duplicate types for PCI ID %s" % device_address
7435
7434
)
7436
7435
# Just checking whether the operator fat-fingered the address.
7437
7436
# If it's wrong, it will return an exception
7438
7437
try:
7439
7438
pci_utils.parse_address(device_address)
7440
7439
except exception.PciDeviceWrongAddressFormat:
7441
- raise exception.InvalidLibvirtGPUConfig (
7440
+ raise exception.InvalidLibvirtMdevConfig (
7442
7441
reason="incorrect PCI address: %s" % device_address
7443
7442
)
7444
7443
self.pgpu_type_mapping[device_address] = vgpu_type
@@ -7468,12 +7467,12 @@ def _get_vgpu_type_per_pgpu(self, device_address):
7468
7467
except (exception.PciDeviceWrongAddressFormat, IndexError):
7469
7468
# this is not a valid PCI address
7470
7469
LOG.warning("The PCI address %s was invalid for getting the "
7471
- "related vGPU type", device_address)
7470
+ "related mdev type", device_address)
7472
7471
return
7473
7472
try:
7474
7473
return self.pgpu_type_mapping.get(device_address)
7475
7474
except KeyError:
7476
- LOG.warning("No vGPU type was configured for PCI address: %s",
7475
+ LOG.warning("No mdev type was configured for PCI address: %s",
7477
7476
device_address)
7478
7477
# We accept to return None instead of raising an exception
7479
7478
# because we prefer the callers to return the existing exceptions
@@ -7893,7 +7892,7 @@ def _allocate_mdevs(self, allocations):
7893
7892
# The provider doesn't exist, return a better understandable
7894
7893
# exception
7895
7894
raise exception.ComputeResourcesUnavailable(
7896
- reason='vGPU resource is not available')
7895
+ reason='mdev-capable resource is not available')
7897
7896
# FIXME(sbauza): The functional reshape test assumes that we could
7898
7897
# run _allocate_mdevs() against non-nested RPs but this is impossible
7899
7898
# as all inventories have been reshaped *before now* since it's done
@@ -7916,14 +7915,14 @@ def _allocate_mdevs(self, allocations):
7916
7915
break
7917
7916
else:
7918
7917
LOG.warning(
7919
- "pGPU device name %(name)s can't be guessed from the "
7920
- "ProviderTree roots %(roots)s",
7918
+ "mdev-capable device name %(name)s can't be guessed from "
7919
+ "the ProviderTree roots %(roots)s",
7921
7920
{'name': rp_name,
7922
7921
'roots': ', '.join([root.name for root in roots])})
7923
7922
# We f... have no idea what was the parent device
7924
7923
# If we can't find devices having available VGPUs, just raise
7925
7924
raise exception.ComputeResourcesUnavailable(
7926
- reason='vGPU resource is not available')
7925
+ reason='mdev-capable resource is not available')
7927
7926
7928
7927
supported_types = self.supported_vgpu_types
7929
7928
# Which mediated devices are created but not assigned to a guest ?
@@ -7941,7 +7940,7 @@ def _allocate_mdevs(self, allocations):
7941
7940
if not chosen_mdev:
7942
7941
# If we can't find devices having available VGPUs, just raise
7943
7942
raise exception.ComputeResourcesUnavailable(
7944
- reason='vGPU resource is not available')
7943
+ reason='mdev-capable resource is not available')
7945
7944
else:
7946
7945
chosen_mdevs.append(chosen_mdev)
7947
7946
return chosen_mdevs
@@ -7962,7 +7961,7 @@ def _detach_mediated_devices(self, guest):
7962
7961
# operation to support reallocating mediated devices.
7963
7962
if error_code == libvirt.VIR_ERR_CONFIG_UNSUPPORTED:
7964
7963
reason = _("Suspend is not supported for instances having "
7965
- "attached vGPUs .")
7964
+ "attached mediated devices .")
7966
7965
raise exception.InstanceFaultRollback(
7967
7966
exception.InstanceSuspendFailure(reason=reason))
7968
7967
else:
0 commit comments