-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discoverability issue during CDI spec generation when the program lives inside a snap container #554
Comments
This is a bug in the "discovery" code for the graphics libraries as implemented here: nvidia-container-toolkit/internal/discover/graphics.go Lines 268 to 281 in ddeeca3
The issue in this case is that the #548 reworks this somewhat, but from your description it seems that there is still a bug that would surface in your case. |
I'm trying to generate a CDI specification in a program living inside a snap container (see canonical/lxd#13562)
When generating a CDI spec from inside a snap package, we need to tell the CDI discoverability process to start
looking after the host root file system which is defined inside the snap by
/var/lib/snapd/hostfs
(a.k.a, this is the same as/
if we are not in a snap)In consequence, here is how I created my
cdilib
object:Here is the resulting log for the generation:
What is quite odd is the fact that the discoverability logic is looking for path starting by
/var/lib/snapd/hostfs/var/lib/snapd/hostfs
and not/var/lib/snapd/hostfs
...Is it a bug or is it because the
cdilib
object has not been well configured?This actually leads to a problem where
nvidia/xorg/libglxserver_nvidia.so.535.161.08
is not generated in the output (missing mount entry + hook entry)The logic look for the pattern inside
/var/lib/snapd/hostfs/var/lib/snapd/hostfs/usr/lib/aarch64-linux-gnu
and/var/lib/snapd/hostfs/usr/lib/x86_64-linux-gnu
.If it was looking in
/var/lib/snapd/hostfs/usr/lib/aarch64-linux-gnu
, then it would have worked.What do you think @elezar ? /cc @tomponline
The text was updated successfully, but these errors were encountered: