This repository has been archived by the owner on Oct 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[17.06] Error if "until" filter is combined with "--volumes" on system prune #154
Merged
andrewhsu
merged 1 commit into
docker-archive:17.06
from
thaJeztah:17.06-backport-prune-until-filter
Aug 2, 2017
Merged
[17.06] Error if "until" filter is combined with "--volumes" on system prune #154
andrewhsu
merged 1 commit into
docker-archive:17.06
from
thaJeztah:17.06-backport-prune-until-filter
Aug 2, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The "until" filter is supported by all object types, except for volumes. Before this patch, the "until" filter would attempted to be used for the volume prune endpoint, resulting in an error being returned by the daemon, and further prune endpoints (networks, images) to be skipped. $ docker system prune --filter until=24h --filter label=label.foo=bar WARNING! This will remove: - all stopped containers - all volumes not used by at least one container - all networks not used by at least one container - all dangling images Are you sure you want to continue? [y/N] y Error response from daemon: Invalid filter 'until' Calling POST /v1.30/containers/prune?filters=%7B%22label%22%3A%7B%22label.foo%3D%3Dbar%22%3Atrue%7D%2C%22until%22%3A%7B%2224h%22%3Atrue%7D%7D Calling POST /v1.30/volumes/prune?filters=%7B%22label%22%3A%7B%22label.foo%3D%3Dbar%22%3Atrue%7D%2C%22until%22%3A%7B%2224h%22%3Atrue%7D%7D Handler for POST /v1.30/volumes/prune returned error: Invalid filter 'until' Error response from daemon: Invalid filter 'until' With this patch, an error is produced instead, preventing "partial" prune. $ docker system prune --filter until=24h --filter label=foo==bar --volumes ERROR: The "until" filter is not supported with "--volumes" Note that `docker volume prune` does not have this problem, and produces an error if the `until` filter is used; $ docker volume prune --filter until=24h WARNING! This will remove all volumes not used by at least one container. Are you sure you want to continue? [y/N] y Error response from daemon: Invalid filter 'until' Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 3c095dc546e9c90afcfb1ca1695b408d813b4306) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
ping @dnephin @vieux @andrewhsu PTAL |
dnephin
approved these changes
Aug 1, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
andrewhsu
approved these changes
Aug 1, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
tophj-ibm
pushed a commit
to tophj-ibm/docker-ce
that referenced
this pull request
Aug 29, 2017
…ipts Add scripts and targets for manpages and yamldocs Upstream-commit: ed5b66308222511bd9e2e4e7e2c278d9887d0142 Component: cli
docker-jenkins
pushed a commit
that referenced
this pull request
Aug 23, 2018
Fix up Dockerfile.engine to compile docker-proxy statically Upstream-commit: 8f1a3c9 Component: packaging
docker-jenkins
pushed a commit
that referenced
this pull request
Feb 23, 2019
…iner_on_start [18.09 backport] Delete stale containerd object on start failure Upstream-commit: ba8664cc2219c3ed75d3f4306569edf8b7b97a98 Component: engine
akrasnov-drv
pushed a commit
to drivenets/docker-ce
that referenced
this pull request
Apr 23, 2023
Fix up Dockerfile.engine to compile docker-proxy statically
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
cherry picked from commit docker/cli@3c095dc (docker/cli#311)
conflicted with f7a9f9f (#109)
The "until" filter is supported by all object types, except for
volumes.
Before this patch, the "until" filter would attempted to be used for the volume
prune endpoint, resulting in an error being returned by the daemon, and
further prune endpoints (networks, images) to be skipped.
With this patch, an error is produced instead, preventing "partial" prune.
Note that
docker volume prune
does not have this problem, and produces anerror if the
until
filter is used;