kata-containers/agent

guest OCI hooks failed to find config.json

chestack opened this issue · 1 comments

Description of problem

Run kata pod with nvidia GPU:

  1. Created a rootfs with nvidia-container-toolkit located in /usr/share/oci/hooks/prestart/
  2. Enabled guest_hook_path = "/usr/share/oci/hooks" in the configuration.toml.
  3. Run pod with gpu resource

Expected result

container should start and hooks should run

Actual result

container started with the following error:
level=error msg="createContainer failed" error="rpc error: code = Internal desc = Could not run process: container_linux.go:349: starting container process caused \"process_linux.go:449: container init caused \\\"process_linux.go:432: running prestart hook 0 caused \\\\\\\"error running hook: exit status 1, stdout: , stderr: could not open OCI spec: open /run/kata-containers/shared/containers/e882de8a1f87e4b831b54c0617e00554a52fa01acdb58c61dacba0152848aee1/config.json: no such file or directory\\\\\\\\n\\\\\\\"\\\"\"" source=virtcontainers subsystem=kata_agent

Further information

writeSpecToFile() and changeToBundlePath() in #393 write config.json to /run/kata-containers/shared/containers/***

but writeSpecToFile() in #798 updated to change dir to /var/run/libcontainer/***


This issue is being automatically closed as Kata Containers 1.x has now reached EOL (End of Life). This means it is no longer being maintained.

Important:

All users should switch to the latest Kata Containers 2.x release to ensure they are using a maintained release that contains the latest security fixes, performance improvements and new features.

This decision was discussed by the @kata-containers/architecture-committee and has been announced via the Kata Containers mailing list:

If you believe this issue still applies to Kata Containers 2.x, please open an issue against the Kata Containers 2.x repository, pointing to this one, providing details to allow us to migrate it.