Comments (7)
PR: #20
from gvisor-containerd-shim.
@jmillikin-stripe Are you using gvisor-containerd-shim
with Kubernetes + containerd? Or just containerd?
With "Kubernetes + containerd", CreateOptions
should never be used.
With just containerd
, I don't think containerd client options are designed for non-runc runtimes right now, e.g. https://github.com/containerd/containerd/blob/master/task_opts_unix.go#L31
from gvisor-containerd-shim.
I'm using it with containerd directly, not via Kubernetes or CRI.
It works fine except for this one particular missing type assertion, and the referenced PR does work for the subset of CreateOptions
that gVisor supports.
from gvisor-containerd-shim.
@jmillikin-stripe can you share your config.toml? Also, what exactly are you doing to get this error? I suppose you are creating a container via the containerd API rather than CRI?
from gvisor-containerd-shim.
@Random-Liu I think the relevant code is here since it's 1.2.x. In this case there aren't any runtime checks since it wasn't implemented yet. I feel like we should probably handle this case.
https://github.com/containerd/containerd/blob/release/1.2/task_opts_unix.go
from gvisor-containerd-shim.
I'm using the containerd API directly. The config.toml file has no effect on this behavior; the reproduction is in the following client code:
var stdout, stderr bytes.Buffer
task, err := container.NewTask(
containerCtx,
cio.NewCreator(
cio.WithFIFODir(fifoDir),
cio.WithStreams(
nil, // stdin
&stdout,
&stderr,
),
),
containerd.WithNoNewKeyring,
)
The containerd.WithNoNewKeyring
option is an optimization for runc
containers. If set, the shim's creation request options will be set to a *runctypes.CreateOptions
. I would like it if I could set that option unconditionally and let the shim ignore unknown options, but the failing type check here prevents that.
from gvisor-containerd-shim.
I'm using it with containerd directly, not via Kubernetes or CRI.
No wonder. That's what I guessed. :)
I think the relevant code is here since it's 1.2.x. In this case there aren't any runtime checks since it wasn't implemented yet. I feel like we should probably handle this case.
I'm fine with handling that :)
Just want to confirm this is caused by a directly use with containerd, not a bug in Kubernetes integration.
from gvisor-containerd-shim.
Related Issues (20)
- Support container stats HOT 1
- Add cri validation test.
- One of Install gvisor-containerd-shim steps is not correct. HOT 3
- critest: privilege escalation
- critest: support mount propagation
- critest: runtime should support ContainerPID
- support for Kubernetes RuntimeClass API HOT 8
- CRI: Support oom_score_adj HOT 4
- Add docs about shim config
- Reduce `runsc state` call. HOT 3
- Abnormal termination with `plugins.cri.systemd_cgroup = true` HOT 3
- Not able to start container in runsc HOT 3
- RuntimeHandler "runsc" not supported Kuberentes HOT 10
- Update docs for kubeadm HOT 1
- Waiting on a container after it exited returns an internal error
- Unable to configure runtime options for gvisor-containerd-shim HOT 2
- Support Epoller to forward oom score notifications. HOT 3
- Support save/restore
- Remove bind/rbind options when converting emptydir to tmpfs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gvisor-containerd-shim.