Do not remove containers from memory on error#31012
Conversation
|
Pretty interesting that tests are getting stuck waiting for a delete event, seems it must be hitting an error on remove... |
938f073 to
55294dd
Compare
There was a problem hiding this comment.
else return err? Why try again if no action was taken
There was a problem hiding this comment.
Are we confident this is always caused by a race? If it isn't, this could loop forever...
There was a problem hiding this comment.
Could track paths in the error like I'm doing for ebusy.
55294dd to
5bbd0ee
Compare
There was a problem hiding this comment.
Also figured I would mention I added this only after CI was failing (waiting for a destroy event that never comes)
f47d9e1 to
6197d92
Compare
|
Ugh, I know what the problem here is... |
6f5feae to
b647f29
Compare
|
@cpuguy83 any news here? |
8c6f990 to
d6ffbc6
Compare
|
Ok, I have this "working". Now this is a perfectly valid issue to have since older kernels (< 3.15) can run into this as well, and cause the client to hang if it's not able to resolve within the max retry attempts. One potential thing I've thought about for dealing with the client hangs (for legitimate issues) is to have a timeout period waiting for the destroy event to occur after the No matter what we do to fix the client issue, 1.13/17.03 clients will have a problem unless we emit a |
|
LGTM |
098f284 to
7266dd4
Compare
|
Squashed commits. |
Before this, if `forceRemove` is set the container data will be removed no matter what, including if there are issues with removing container on-disk state (rw layer, container root). In practice this causes a lot of issues with leaked data sitting on disk that users are not able to clean up themselves. This is particularly a problem while the `EBUSY` errors on remove are so prevalent. So for now let's not keep this behavior. Signed-off-by: Brian Goff <[email protected]>
7266dd4 to
54dcbab
Compare
|
LGTM |
Before this, if `forceRemove` is set the container data will be removed no matter what, including if there are issues with removing container on-disk state (rw layer, container root). In practice this causes a lot of issues with leaked data sitting on disk that users are not able to clean up themselves. This is particularly a problem while the `EBUSY` errors on remove are so prevalent. So for now let's not keep this behavior. Cherry-pick from moby#31012 Signed-off-by: Brian Goff <[email protected]> Signed-off-by: Wentao Zhang <[email protected]> (cherry picked from commit 54dcbab) Conflicts: daemon/delete.go daemon/graphdriver/aufs/aufs.go daemon/graphdriver/btrfs/btrfs.go daemon/graphdriver/devmapper/driver.go daemon/graphdriver/overlay/overlay.go pkg/mount/mount.go
Do not remove containers from memory on error Before this, if `forceRemove` is set the container data will be removed<br> no matter what, including if there are issues with removing container<br> on-disk state (rw layer, container root). <br> In practice this causes a lot of issues with leaked data sitting on<br> disk that users are not able to clean up themselves. <br> This is particularly a problem while the `EBUSY` errors on remove are so<br> prevalent. So for now let's not keep this behavior. <br> Cherry-pick from <a href="moby#31012" rel="nofollow noreferrer" target="_blank">https://github.com/moby/moby/pull/31012</a> <br> Signed-off-by: Brian Goff <a href="mailto:[email protected]">[email protected]</a><br> Signed-off-by: Wentao Zhang <a href="mailto:[email protected]">[email protected]</a><br> (cherry picked from commit <a href="/docker/docker/commit/54dcbab25ea4771da303fa95e0c26f2d39487b49" data-original="54dcbab2" data-link="false" data-project="7713" data-commit="54dcbab25ea4771da303fa95e0c26f2d39487b49" data-reference-type="commit" title="" class="gfm gfm-commit has-tooltip" data-original-title="Do not remove containers from memory on error">54dcbab2</a>) <br> Conflicts:<br> daemon/delete.go<br> daemon/graphdriver/aufs/aufs.go<br> daemon/graphdriver/btrfs/btrfs.go<br> daemon/graphdriver/devmapper/driver.go<br> daemon/graphdriver/overlay/overlay.go<br> daemon/monitor.go<br> pkg/mount/mount.go See merge request docker/docker!519
Before this, if
forceRemoveis set the container data will be removedno matter what, including if there are issues with removing containeron-disk state (rw layer, container root).
In practice this causes a lot of issues with leaked data sitting on
disk that users are not able to clean up themselves.
This is particularly a problem while the
EBUSYerrors on remove are soprevalent. So for now let's not keep this behavior.