Get the string part of the path and not PosixPath
The unit tests are using the string of the path rather than the PosixPath. Also the function to actually install the package is also expecting a string and not PosixPath. So updating the _path_and_hash_nvidia_resource to return a tuple of str,str rather than PosixPath,str.
In python3.12 some of the pathlib.Path was refactored into C, and hence implicit conversion of PosixPath no longer works.
Change-Id: Iecceda5c9f0c70c9e08936f69c6177a18862ee12 Signed-off-by: Arif Ali arif-ali@ubuntu.com
Overview
This subordinate charm provides the Nvidia vGPU support to the OpenStack Nova Compute service.
Usage
Deployment
We are assuming a pre-existing OpenStack deployment (Queens or newer).
Deploy nova-compute-nvidia-vgpu as a subordinate to the nova-compute charm:
Pass the proprietary NVIDIA software package (
510.47.03or newer) as a resource to the charm:Once the model settles, reboot the corresponding compute nodes:
vGPU type definition
Each compute node has one or several physical GPUs. Each physical GPU can then be divided into one or several virtual GPUs of a given type. Virtual GPUs will later be claimed by and exposed to guests upon guest creation. Start by listing the available vGPU types for each physical GPU:
As we can see,
nova-compute-nvidia-vgpu/0has two physical GPUs:0000:41:00.0and0000:c1:00.0. By selecting the vGPU typenvidia-108on0000:c1:00.0, two vGPUs will be available for future guests:On OpenStack Stein and newer, once the model has settled, these vGPUs can be listed via the OpenStack CLI:
Nova flavor definition
In order to expose a vGPU of the type defined earlier to any guest created with the
m1.smallflavor, create a new trait and assign it to the flavor:After creating an instance of this flavor, the resource provider inventory list will show one vGPU being used:
Bugs
Please report bugs on Launchpad.
For general questions please refer to the OpenStack Charm Guide.