1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Moby Project - a collaborative project for the container ecosystem to assemble container-based systems
Find a file
Kir Kolyshkin f963500c54 ContainerWait on remove: don't stuck on rm fail
Currently, if a container removal has failed for some reason,
any client waiting for removal (e.g. `docker run --rm`) is
stuck, waiting for removal to succeed while it has failed already.
For more details and the reproducer, please check
https://github.com/moby/moby/issues/34945

This commit addresses that by allowing `ContainerWait()` with
`container.WaitCondition == "removed"` argument to return an
error in case of removal failure. The `ContainerWaitOKBody`
stucture returned to a client is amended with a pointer to `struct Error`,
containing an error message string, and the `Client.ContainerWait()`
is modified to return the error, if any, to the client.

Note that this feature is only available for API version >= 1.34.
In order for the old clients to be unstuck, we just close the connection
without writing anything -- this causes client's error.

Now, docker-cli would need a separate commit to bump the API to 1.34
and to show an error returned, if any.

[v2: recreate the waitRemove channel after closing]
[v3: document; keep legacy behavior for older clients]
[v4: convert Error from string to pointer to a struct]
[v5: don't emulate old behavior, send empty response in error case]
[v6: rename legacy* vars to include version suffix]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-10-25 13:11:56 -07:00
.github Fix GitHub spelling 2017-10-07 00:10:24 +08:00
api ContainerWait on remove: don't stuck on rm fail 2017-10-25 13:11:56 -07:00
builder Typo fixed and simple code. 2017-10-18 10:26:58 +08:00
cli
client Merge pull request #35128 from thaJeztah/fix-ContainerExecAttach-type 2017-10-10 10:59:16 -07:00
cmd/dockerd LCOW: API: Add platform to /images/create and /build 2017-10-06 11:44:18 -07:00
container ContainerWait on remove: don't stuck on rm fail 2017-10-25 13:11:56 -07:00
contrib fixing return value 2017-10-13 13:59:48 +02:00
daemon ContainerWait on remove: don't stuck on rm fail 2017-10-25 13:11:56 -07:00
distribution Stop filtering Windows manifest lists by version 2017-10-06 22:37:31 -07:00
dockerversion
docs ContainerWait on remove: don't stuck on rm fail 2017-10-25 13:11:56 -07:00
hack e2e: Do not print test logs by default 2017-10-13 13:40:21 +02:00
image LCOW: API change JSON header to string POST parameter 2017-10-06 15:26:48 -07:00
integration Merge pull request #34509 from thaJeztah/fix-network-delete 2017-10-13 08:40:09 -07:00
integration-cli Typo fixed and simple code. 2017-10-18 10:26:58 +08:00
internal Docker EE integration test fixes 2017-09-25 18:09:19 +02:00
layer LCOW: API: Add platform to /images/create and /build 2017-10-06 11:44:18 -07:00
libcontainerd Merge pull request #34846 from Microsoft/jjh/debuggcs 2017-09-19 22:33:46 +02:00
migrate/v1 LCOW: API: Add platform to /images/create and /build 2017-10-06 11:44:18 -07:00
oci
opts Merge pull request #34689 from chchliang/envunitest 2017-09-01 10:53:42 -07:00
pkg Removing unused code with a TODO that no longer needs to be done 2017-10-16 14:57:48 -07:00
plugin Refactor plugin store to reduce nested if's in Get 2017-10-09 22:21:27 +03:00
profiles drop useless apparmor denies 2017-10-06 09:11:59 -06:00
project Fix GitHub spelling 2017-10-07 00:10:24 +08:00
reference Add gosimple linter 2017-09-12 12:09:59 -04:00
registry Merge pull request #34495 from ripcurld0/registry_mirror_json 2017-09-18 21:59:14 -07:00
reports
restartmanager
runconfig Volume refactoring for LCOW 2017-09-14 12:33:31 -07:00
vendor Merge pull request #34758 from ghislainbourgeois/33495-add-tcp-to-gelf-log-driver 2017-10-10 10:26:01 -04:00
volume Typo fixed and simple code. 2017-10-18 10:26:58 +08:00
.dockerignore
.gitignore
.mailmap Update mailmap and authors 2017-10-04 14:44:24 +02:00
AUTHORS Update mailmap and authors 2017-10-04 14:44:24 +02:00
CHANGELOG.md
CONTRIBUTING.md
Dockerfile Bump Go to 1.8.4 2017-10-04 23:22:23 +02:00
Dockerfile.aarch64 Bump Go to 1.8.4 2017-10-04 23:22:23 +02:00
Dockerfile.armhf Bump Go to 1.8.4 2017-10-04 23:22:23 +02:00
Dockerfile.e2e Bump Go to 1.8.4 2017-10-04 23:22:23 +02:00
Dockerfile.ppc64le Bump Go to 1.8.4 2017-10-04 23:22:23 +02:00
Dockerfile.s390x Bump Go to 1.8.4 2017-10-04 23:22:23 +02:00
Dockerfile.simple Bump Go to 1.8.4 2017-10-04 23:22:23 +02:00
Dockerfile.solaris
Dockerfile.windows Bump Go to 1.8.4 2017-10-04 23:22:23 +02:00
LICENSE
MAINTAINERS Fix GitHub spelling 2017-10-07 00:10:24 +08:00
Makefile Add a new entrypoint for CI 2017-09-20 17:26:30 -04:00
NOTICE
poule.yml
README.md Add "Lego set" back in README.md 2017-10-10 14:10:39 +00:00
ROADMAP.md Update the Roadmap 2017-10-11 17:33:50 +01:00
TESTING.md
vendor.conf Merge pull request #34758 from ghislainbourgeois/33495-add-tcp-to-gelf-log-driver 2017-10-10 10:26:01 -04:00
VENDORING.md
VERSION

The Moby Project

Moby Project logo

Moby is an open-source project created by Docker to enable and accelerate software containerization.

It provides a "Lego set" of toolkit components, the framework for assembling them into custom container-based systems, and a place for all container enthusiasts and professionals to experiment and exchange ideas. Components include container build tools, a container registry, orchestration tools, a runtime and more, and these can be used as building blocks in conjunction with other tools and projects.

Principles

Moby is an open project guided by strong principles, aiming to be modular, flexible and without too strong an opinion on user experience. It is open to the community to help set its direction.

  • Modular: the project includes lots of components that have well-defined functions and APIs that work together.
  • Batteries included but swappable: Moby includes enough components to build fully featured container system, but its modular architecture ensures that most of the components can be swapped by different implementations.
  • Usable security: Moby provides secure defaults without compromising usability.
  • Developer focused: The APIs are intended to be functional and useful to build powerful tools. They are not necessarily intended as end user tools but as components aimed at developers. Documentation and UX is aimed at developers not end users.

Audience

The Moby Project is intended for engineers, integrators and enthusiasts looking to modify, hack, fix, experiment, invent and build systems based on containers. It is not for people looking for a commercially supported system, but for people who want to work and learn with open source code.

Relationship with Docker

The components and tools in the Moby Project are initially the open source components that Docker and the community have built for the Docker Project. New projects can be added if they fit with the community goals. Docker is committed to using Moby as the upstream for the Docker Product. However, other projects are also encouraged to use Moby as an upstream, and to reuse the components in diverse ways, and all these uses will be treated in the same way. External maintainers and contributors are welcomed.

The Moby project is not intended as a location for support or feature requests for Docker products, but as a place for contributors to work on open source code, fix bugs, and make the code more useful. The releases are supported by the maintainers, community and users, on a best efforts basis only, and are not intended for customers who want enterprise or commercial support; Docker EE is the appropriate product for these use cases.


Legal

Brought to you courtesy of our legal counsel. For more context, please see the NOTICE document in this repo.

Use and transfer of Moby may be subject to certain restrictions by the United States and other governments.

It is your responsibility to ensure that your use and/or transfer does not violate applicable laws.

For more information, please see https://www.bis.doc.gov

Licensing

Moby is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.