This adds a singleton `timeout` package that will allow services and user
to configure timeouts in the daemon. When a service wants to use a
timeout, it should declare a const and register it's default value
inside an `init()` function for that package. When the default config
is generated, we can use the `timeout` package to provide the available
timeout keys so that a user knows that they can configure.
These show up in the config as follows:
```toml
[timeouts]
"io.containerd.timeout.shim.cleanup" = 5
"io.containerd.timeout.shim.load" = 5
"io.containerd.timeout.shim.shutdown" = 3
"io.containerd.timeout.task.state" = 2
```
Timeouts in the config are specified in seconds.
Timeouts are very hard to get right and giving this power to the user to
configure things is a huge improvement. Machines can be faster and
slower and depending on the CPU or load of the machine, a timeout may
need to be adjusted.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Use the latest Go release for testing on AppVeyor
> go1.12.7 (released 2019/07/08) includes fixes to cgo, the compiler,
> and the linker. See the Go 1.12.7 milestone on our issue tracker for details:
>
> https://github.com/golang/go/issues?q=milestone%3AGo1.12.7
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Prevent an errgroup error from causing the acquire to
return a cancellation error. Previously any error
from the errgroup would cause the Dispatch to always
return the cancelled error.
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
this brings the dependency back to a released version:
- go.etcd.io/bbolt 2eb7227ade...v1.3.3
- etcd-io/bbolt#153 fix rollback panic bug
- fixesetcd-io/bbolt#152 Panic (index out of range) on writeable tx rollback with db.NoFreelistSync
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
We are separating out the encryption code and have designed a few new
interfaces and APIs for processing content streams. This keep the core
clean of encryption code but enables not only encryption but support of
multiple content types ( custom media types ).
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
If there are multiple goroutines calling `namespace.WithNamespace` on a
ctx that already had namespace, there will be a data race when
`withTTRPCNamespaceHeader` calling `MD.Set()`. So we have to copy the md
before using it.
Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
client.Pull will only pull one matching platform by default.
When checking the size of image we match that behavior so that
we don't look for multiple platforms that might not exist on disk.
Signed-off-by: Darren Shepherd <darren@rancher.com>
This commit adds a flag to the runtime config that allows overloading of the default
privileged behaviour. When the flag is enabled on a runtime, host devices won't
be appended to the runtime spec if the container is run as privileged.
By default the flag is false to maintain the current behaviour of privileged.
Fixes#1213
Signed-off-by: Alex Price <aprice@atlassian.com>