Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.
This repository was archived by the owner on May 12, 2021. It is now read-only.

Write OCI spec to a file within the guest #349

@eguzman3

Description

@eguzman3

In order to comply with the OCI specification, the agent should write the OCI specification to a 'config.json' file within the guest container's bundle path.

This issue was discovered when trying to use an existing OCI hook within the guest. This hook reads the bundle path from the HookState passed over stdin, then attempts to open /path/to/bundle/config.json which doesn't exist because the bundle path is wrong and because config.json is never written. The reason the cwd needs to be changed is that CreateLibcontainerConfig sets the bundle path to cwd:

// runc's cwd will always be the bundle path

which in this case is / so this is what the OCI hooks end up getting instead of /run/kata-containers/shared/containers/<hash>/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions