Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Device: Remove existing GPU CDI device files before new device files …
…are added (#14842) If a host machine is not shut down properly [ i.e. it loses power ], the instances having CDI GPU attached to them won't start again after the host is started, even if a start command is issued manually. LXD returns as exception: `Failed to start device "nvidia-gpu": Failed to create device "/var/snap/lxd/common/lxd/devices/oel-ogrp623/cdi.unix.nvidia--gpu.dev-nvidia0" for "/dev/nvidia0": file exists` To solve that, we must remove any remaining device files before adding new CDI device files in the instance GPU device directory. These old files are still present if the host crash because the GPU device stop hook is not called. Fixes #14843
- Loading branch information