Fix list-vgpu-types action output
Currently the action would fail with “OSError: [Errno 7] Argument list too long”. This is because the output is too long when we have a many GPUs, whether they are physical or SRIORV vGPU.
We now report the number of vgpus, and output the contents into a file, which is then shown in stdout of the action output. The user can then inspect the output.
Closes-Bug: #2165723 Change-Id: I709685a59b8c81a3f50d297076764101d73a2aaa Signed-off-by: Arif Ali arif-ali@ubuntu.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
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:
The full listing can be very large on hosts with many GPUs (for example SR-IOV vGPU with dozens of virtual functions), so instead of returning it inline the action writes it to a file under the charm’s base directory on the unit and the
resultfield tells you how to read it. This keeps the results within the operating system’s argument-size limit. Run the exactjuju ssh ... catcommand fromresultto print the full list: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.