From 856a70a8c6721da495a9edcae5625837fab0caee Mon Sep 17 00:00:00 2001 From: Kevin Klues Date: Mon, 20 May 2024 17:30:31 +0000 Subject: [PATCH] WIP: Remove the need for an explicit Stop() on the MPS daemon Signed-off-by: Kevin Klues --- cmd/nvidia-dra-plugin/sharing.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/nvidia-dra-plugin/sharing.go b/cmd/nvidia-dra-plugin/sharing.go index fba60fa6..5a5a4260 100644 --- a/cmd/nvidia-dra-plugin/sharing.go +++ b/cmd/nvidia-dra-plugin/sharing.go @@ -355,6 +355,10 @@ func (m *MpsControlDaemon) GetCDIContainerEdits() *cdiapi.ContainerEdits { } func (m *MpsControlDaemon) Stop(ctx context.Context) error { + // TODO: Remove the need for an explicit stop call. Instead we can set the + // MPS daemon's owners refefence to the claim it governs. We can then + // garbage collect the shm/log/pipe directories asynchronously. + _, err := os.Stat(m.rootDir) if os.IsNotExist(err) { return nil