samuelkarp/runj

Runj does not support runc's --bundle and --pid-file flags to create

dfr opened this issue · 4 comments

dfr commented

These are required to allow runj to be used by Buildah (and probably also podman but I haven't got that far yet).

Thanks for opening this. FYI, I'm currently on vacation and am not sure when I'll next be able to look at runj.

I've re-titled the issue to better capture how I'd like to think about runc-compatibility with runj. runj does not explicitly target compatibility (including non-standardized flags and argument processing) with runc; instead runj is explicitly targeting compatibility only with the OCI runtime spec. Although runc is the reference implementation for the OCI runtime spec, not all of runc's behavior is standardize in the specification.

runc's --bundle and --pid-file flags are both not specified in the runtime spec.

I have added some behavior to runj that is similar to runc and not otherwise described by the spec (specifically the exec command as it's useful for interacting with a running container) so I'm not wholly opposed to it, but I'd prefer only to add changes like this where it's necessary.

Also, as I wrote in #21, I'm currently targeting integration with containerd over anything else (Docker/Moby, Buildah, etc). Consequently I'm mostly interested in things that are going to be useful to containerd, and containerd's interaction with the runtime is mediated through a shim also maintained in this repository.

dfr commented

While this is certainly not part of the OCI specification, none of the supposedly OCI compliant runtimes that I've looked at support receiving the bundle path as a positional argument. I looked at crun, runc and runsc and they all require the '--bundle' flag. Even containerd assumes this interface in its runc shim. It took me a while to untangle the many layers but you can find this in the github.com/containerd/go-runc package which wraps calls to the runc binary.

Even containerd assumes this interface in its runc shim.

runj has a separate shim and does not use the runc shim for containerd. (The runc shim has a large number of Linux assumptions that don't apply to FreeBSD, and is not really intended to be a generic "OCI" shim but rather is intentionally runc-specific.)

but you can find this in the github.com/containerd/go-runc package which wraps calls to the runc binary.

Yep, this is another package that's intended to foremost target runc, and its command-line generation logic is not used in runj's shim.

With all that said: I'm really just trying to be precise here; I haven't decided one way or another. I think --pid-file is likely a reasonable thing to add (though the more standard way to do this is to read it from <runtime> state).

Closed in 889c370.