1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon
Antonio Murdaca 9391a822ea
daemon: honor default runtime when starting containers
If you created containers from pre-OCI docker (e.g. docker-1.10.x)
upgrade may fail when restarting containers if the new docker daemon
has `--default-runtime` set.

In Fedora, we ship docker 1.12.6 with:

```
--default-runtime=oci
--add-runtime oci=/usr/libexec/docker/docker-runc-current
```

That way we don't rely on `docker-runc` being in `$PATH`.

The issue is, on upgrade from docker 1.10.3 without this patch, the
default runtime in `daemon/start_linux.go` is unconditionally set to
`runc=docker-runc` without honoring the `--default-runtime` flag set in
the docker daemon.

Reproducer:

- (1.10.3) `docker run -d -p 5000:5000 --restart=always --name registry
registry:2`
- upgrade to docker 1.12.6 (1.11.x has likely the same issue)
- the registry container fails to restart on upgrade with the following
log message `error="exec: \"docker-runc\": executable file not
found in $PATH: \"\""`

That error comes from the fact that we're setting the runtime in the
container's HostConfig to `runc` where instead we should have honored
the `--default-runtime` flag (in our case that's set to `oci`).

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-12 20:36:22 +01:00
..
caps
cluster Allow swarm init with --availability=drain 2017-01-10 16:31:51 -08:00
events modify some files 2016-12-22 08:38:37 +08:00
exec Move StreamConfig out of runconfig 2016-11-14 15:15:09 -05:00
graphdriver Merge pull request #28500 from rhvgoyal/remove-unused-param 2017-01-12 18:02:00 +01:00
initlayer Implement content addressability for plugins 2016-12-23 13:29:58 -08:00
links check typos and fix in daemon directory 2016-11-26 17:23:21 +08:00
logger fix syscall.GUID composite literal uses unkeyed fields 2017-01-03 17:12:15 +08:00
network
apparmor_default.go daemon: switch to 'ensure' workflow for AppArmor profiles 2016-12-07 08:47:28 +11:00
apparmor_default_unsupported.go daemon: switch to 'ensure' workflow for AppArmor profiles 2016-12-07 08:47:28 +11:00
archive.go Fix uneccessary calls to volume.Unmount() 2016-11-10 14:04:08 -05:00
archive_unix.go
archive_windows.go
attach.go
auth.go
bindmount_solaris.go Add functional support for Docker sub commands on Solaris 2016-11-07 09:06:34 -08:00
bindmount_unix.go Add functional support for Docker sub commands on Solaris 2016-11-07 09:06:34 -08:00
cache.go
changes.go Windows: support docker diff 2016-10-28 11:06:54 -07:00
checkpoint.go Move names to package api 2016-12-21 22:42:47 +01:00
cluster.go
commit.go commit: do not change container labels on commit 2016-12-19 09:56:20 -08:00
config.go Merge pull request #28631 from likel/master 2016-12-30 01:13:12 +01:00
config_common_unix.go Clean some stuff from runconfig that are cli only… 2016-12-24 13:16:00 +01:00
config_experimental.go
config_solaris.go Add functional support for Docker sub commands on Solaris 2016-11-07 09:06:34 -08:00
config_test.go Add functional support for Docker sub commands on Solaris 2016-11-07 09:06:34 -08:00
config_unix.go Clean some stuff from runconfig that are cli only… 2016-12-24 13:16:00 +01:00
config_unix_test.go
config_windows.go Update docker daemon to dockerd 2016-12-27 17:32:15 +08:00
config_windows_test.go
container.go Clean some stuff from runconfig that are cli only… 2016-12-24 13:16:00 +01:00
container_operations.go fix nit in comments 2017-01-08 21:32:30 +08:00
container_operations_solaris.go Add functional support for Docker sub commands on Solaris 2016-11-07 09:06:34 -08:00
container_operations_unix.go plugins: support for devices 2016-11-22 09:54:45 -08:00
container_operations_windows.go
create.go Fix issue for --hostname when running in "--net=host" 2016-12-06 07:29:45 -08:00
create_unix.go
create_windows.go Windows: Revert 27884 2016-11-16 13:38:45 -08:00
daemon.go support registry mirror config reload 2017-01-04 11:04:00 +08:00
daemon_experimental.go move plugins out of experimental 2016-11-10 15:51:32 -08:00
daemon_linux.go
daemon_linux_test.go
daemon_solaris.go fix nits in comments 2016-12-27 23:30:50 +08:00
daemon_test.go support registry mirror config reload 2017-01-04 11:04:00 +08:00
daemon_unix.go do not create init-dir if not needed 2017-01-09 15:28:51 +01:00
daemon_unix_test.go Add functional support for Docker sub commands on Solaris 2016-11-07 09:06:34 -08:00
daemon_unsupported.go
daemon_windows.go fix nits in comments 2016-12-27 23:30:50 +08:00
debugtrap.go Reduce spew data dumped 2016-11-17 13:10:48 -05:00
debugtrap_unix.go Spew debugging 2016-11-03 10:05:11 -07:00
debugtrap_unsupported.go Spew debugging 2016-11-03 10:05:11 -07:00
debugtrap_windows.go Spew debugging 2016-11-03 10:05:11 -07:00
delete.go Rename Remote API to Engine API 2016-11-22 12:49:38 +00:00
delete_test.go
discovery.go
discovery_test.go
disk_usage.go *: use opencontainers/go-digest package 2017-01-06 18:48:41 -08:00
errors.go
events.go
events_test.go
exec.go Move ReplaceOrAppendEnvValues to container package 2016-12-21 22:42:39 +01:00
exec_linux.go
exec_solaris.go
exec_windows.go Windows: Plumb through user 2016-11-08 17:41:56 -08:00
export.go
getsize_unix.go Add functional support for Docker sub commands on Solaris 2016-11-07 09:06:34 -08:00
health.go Merge pull request #28438 from vdemeester/use-container-shell-instead-of-hardcoded 2016-11-18 18:54:36 -08:00
health_test.go Enhance pkg/{httputils,integration}, distribution/xfer unit tests 2016-12-28 11:54:05 +01:00
image.go
image_delete.go
image_exporter.go
image_history.go
image_inspect.go
image_pull.go *: use opencontainers/go-digest package 2017-01-06 18:48:41 -08:00
image_push.go Implement content addressability for plugins 2016-12-23 13:29:58 -08:00
image_tag.go
images.go Add reference filter and deprecated filter param… 2016-11-11 15:34:01 +01:00
import.go
info.go Move debug functions to cli/debug package 2016-12-12 09:33:58 +01:00
info_unix.go api: types: keep info.SecurityOptions a string slice 2016-11-19 13:21:16 +01:00
info_windows.go api: types: keep info.SecurityOptions a string slice 2016-11-19 13:21:16 +01:00
inspect.go
inspect_solaris.go Add functional support for Docker sub commands on Solaris 2016-11-07 09:06:34 -08:00
inspect_unix.go
inspect_windows.go
keys.go
keys_unsupported.go change minor mistake of spelling 2016-12-20 21:05:19 +08:00
kill.go fix nits in comments 2016-12-27 23:30:50 +08:00
links.go Windows: Factor out sqlite 2016-12-01 09:38:08 -08:00
links_linux.go Windows: Factor out sqlite 2016-12-01 09:38:08 -08:00
links_linux_test.go Windows: Factor out sqlite 2016-12-01 09:38:08 -08:00
links_notlinux.go Windows: Factor out sqlite 2016-12-01 09:38:08 -08:00
list.go fix volume ls filter driver 2017-01-04 23:29:12 +08:00
list_unix.go
list_windows.go
logdrivers_linux.go
logdrivers_windows.go Windows: Enable fluentd logdriver 2016-11-08 19:54:57 -08:00
logs.go Remove redundant format 2016-12-27 21:46:52 +08:00
logs_test.go
metrics.go
monitor.go Move StreamConfig out of runconfig 2016-11-14 15:15:09 -05:00
monitor_linux.go
monitor_solaris.go
monitor_windows.go
mounts.go
names.go Move names to package api 2016-12-21 22:42:47 +01:00
network.go Merge pull request #29564 from aaronlehmann/getter-types 2017-01-10 09:35:19 +01:00
oci_linux.go daemon: switch to 'ensure' workflow for AppArmor profiles 2016-12-07 08:47:28 +11:00
oci_solaris.go Add functional support for Docker sub commands on Solaris 2016-11-07 09:06:34 -08:00
oci_windows.go Windows: Fix a longstanding TODO 2016-11-18 10:20:43 -08:00
pause.go
prune.go Merge pull request #29226 from yongtang/28535-prune-until-follow-up 2017-01-09 17:58:01 +01:00
rename.go Remove redundant format 2016-12-27 21:46:52 +08:00
resize.go
restart.go Allow providing a custom storage directory for docker checkpoints 2016-10-28 07:56:05 -04:00
search.go
search_test.go Remove redundant format 2016-12-27 21:46:52 +08:00
seccomp_disabled.go
seccomp_linux.go daemon: add a flag to override the default seccomp profile 2016-11-02 21:41:29 +01:00
seccomp_unsupported.go
secrets.go do not force target type for secret references 2016-11-17 15:49:02 -05:00
secrets_linux.go secrets: secret management for swarm 2016-11-09 14:27:43 -05:00
secrets_unsupported.go secrets: secret management for swarm 2016-11-09 14:27:43 -05:00
selinux_linux.go
selinux_unsupported.go
start.go fix #29199, reset container if container start failed 2016-12-07 01:37:08 -05:00
start_unix.go daemon: honor default runtime when starting containers 2017-01-12 20:36:22 +01:00
start_windows.go Swarm-mode overlay networking support for windows 2016-11-10 09:54:40 -08:00
stats.go Rename Remote API to Engine API 2016-11-22 12:49:38 +00:00
stats_collector.go
stats_collector_solaris.go
stats_collector_unix.go
stats_collector_windows.go
stats_unix.go
stats_windows.go
stop.go fix nits in comments 2016-12-27 23:30:50 +08:00
top_unix.go
top_unix_test.go
top_windows.go
unpause.go
update.go Fix update clear the restart policy of monitor 2016-12-16 20:57:05 -05:00
update_linux.go
update_solaris.go
update_windows.go
volumes.go Rename Remote API to Engine API 2016-11-22 12:49:38 +00:00
volumes_unit_test.go
volumes_unix.go close the file 2016-11-21 19:56:01 +08:00
volumes_windows.go
wait.go
workdir.go COPY file . after WORKDIR (now always created) 2016-11-23 09:56:02 -08:00