@@ -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):
@@ -7414,15 +7413,15 @@ def _get_supported_vgpu_types(self):
7414
7413
return [first_type]
7415
7414
for device_address in group.device_addresses:
7416
7415
if device_address in self.pgpu_type_mapping:
7417
- raise exception.InvalidLibvirtGPUConfig (
7416
+ raise exception.InvalidLibvirtMdevConfig (
7418
7417
reason="duplicate types for PCI ID %s" % device_address
7419
7418
)
7420
7419
# Just checking whether the operator fat-fingered the address.
7421
7420
# If it's wrong, it will return an exception
7422
7421
try:
7423
7422
pci_utils.parse_address(device_address)
7424
7423
except exception.PciDeviceWrongAddressFormat:
7425
- raise exception.InvalidLibvirtGPUConfig (
7424
+ raise exception.InvalidLibvirtMdevConfig (
7426
7425
reason="incorrect PCI address: %s" % device_address
7427
7426
)
7428
7427
self.pgpu_type_mapping[device_address] = vgpu_type
@@ -7452,12 +7451,12 @@ def _get_vgpu_type_per_pgpu(self, device_address):
7452
7451
except (exception.PciDeviceWrongAddressFormat, IndexError):
7453
7452
# this is not a valid PCI address
7454
7453
LOG.warning("The PCI address %s was invalid for getting the "
7455
- "related vGPU type", device_address)
7454
+ "related mdev type", device_address)
7456
7455
return
7457
7456
try:
7458
7457
return self.pgpu_type_mapping.get(device_address)
7459
7458
except KeyError:
7460
- LOG.warning("No vGPU type was configured for PCI address: %s",
7459
+ LOG.warning("No mdev type was configured for PCI address: %s",
7461
7460
device_address)
7462
7461
# We accept to return None instead of raising an exception
7463
7462
# because we prefer the callers to return the existing exceptions
@@ -7877,7 +7876,7 @@ def _allocate_mdevs(self, allocations):
7877
7876
# The provider doesn't exist, return a better understandable
7878
7877
# exception
7879
7878
raise exception.ComputeResourcesUnavailable(
7880
- reason='vGPU resource is not available')
7879
+ reason='mdev-capable resource is not available')
7881
7880
# FIXME(sbauza): The functional reshape test assumes that we could
7882
7881
# run _allocate_mdevs() against non-nested RPs but this is impossible
7883
7882
# as all inventories have been reshaped *before now* since it's done
@@ -7900,14 +7899,14 @@ def _allocate_mdevs(self, allocations):
7900
7899
break
7901
7900
else:
7902
7901
LOG.warning(
7903
- "pGPU device name %(name)s can't be guessed from the "
7904
- "ProviderTree roots %(roots)s",
7902
+ "mdev-capable device name %(name)s can't be guessed from "
7903
+ "the ProviderTree roots %(roots)s",
7905
7904
{'name': rp_name,
7906
7905
'roots': ', '.join([root.name for root in roots])})
7907
7906
# We f... have no idea what was the parent device
7908
7907
# If we can't find devices having available VGPUs, just raise
7909
7908
raise exception.ComputeResourcesUnavailable(
7910
- reason='vGPU resource is not available')
7909
+ reason='mdev-capable resource is not available')
7911
7910
7912
7911
supported_types = self.supported_vgpu_types
7913
7912
# Which mediated devices are created but not assigned to a guest ?
@@ -7925,7 +7924,7 @@ def _allocate_mdevs(self, allocations):
7925
7924
if not chosen_mdev:
7926
7925
# If we can't find devices having available VGPUs, just raise
7927
7926
raise exception.ComputeResourcesUnavailable(
7928
- reason='vGPU resource is not available')
7927
+ reason='mdev-capable resource is not available')
7929
7928
else:
7930
7929
chosen_mdevs.append(chosen_mdev)
7931
7930
return chosen_mdevs
@@ -7946,7 +7945,7 @@ def _detach_mediated_devices(self, guest):
7946
7945
# operation to support reallocating mediated devices.
7947
7946
if error_code == libvirt.VIR_ERR_CONFIG_UNSUPPORTED:
7948
7947
reason = _("Suspend is not supported for instances having "
7949
- "attached vGPUs .")
7948
+ "attached mediated devices .")
7950
7949
raise exception.InstanceFaultRollback(
7951
7950
exception.InstanceSuspendFailure(reason=reason))
7952
7951
else:
0 commit comments