Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

[17.06] Fix error handling with not-exist errors on remove #142

Merged
merged 1 commit into from Jul 26, 2017

Conversation

cpuguy83
Copy link
Contributor

@cpuguy83 cpuguy83 commented Jul 26, 2017

Backport moby/moby#33960 Fix error handling with not-exist errors on remove

Cherry-pick commit moby/moby@d42dbdd

$ git cherry-pick -s -x -Xsubtree=components/engine d42dbdd

@cpuguy83 cpuguy83 changed the title Fix error handling with not-exist errors on remove [17.06] Fix error handling with not-exist errors on remove Jul 26, 2017
@andrewhsu andrewhsu added this to the 17.06.1 milestone Jul 26, 2017
@@ -50,6 +50,8 @@ import (

rsystem "github.com/opencontainers/runc/libcontainer/system"
"github.com/opencontainers/selinux/go-selinux/label"
"github.com/pkg/errors"
"github.com/vbatts/tar-split/tar/storage"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to add this here, it's already added on line 40.

It's causing this error in the build jobs:

00:02:39.788 [init] ---> Making bundle: binary (in bundles/17.06.1-ce-rc1/binary)
00:02:40.046 [init] Building: bundles/17.06.1-ce-rc1/binary-daemon/dockerd-17.06.1-ce-rc1
00:03:36.261 [init] # github.com/docker/docker/daemon/graphdriver/aufs
00:03:36.261 [init] daemon/graphdriver/aufs/aufs.go:54: storage redeclared as imported package name
00:03:36.261 [init] 	previous declaration at daemon/graphdriver/aufs/aufs.go:40

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Specifically, none of the graphdrivers are supposed to return a
not-exist type of error on remove (or at least that's how they are
currently handled).

Found that AUFS still had one case where a not-exist error could escape,
when checking if the directory is mounted we call a `Statfs` on the
path.

This fixes AUFS to not return an error in this case, but also
double-checks at the daemon level on layer remove that the error is not
a `not-exist` type of error.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit d42dbdd)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@vieux
Copy link
Contributor

vieux commented Jul 26, 2017

LGTM

@vieux vieux merged commit 903138e into docker:17.06 Jul 26, 2017
@cpuguy83 cpuguy83 deleted the cherry-pick-33960 branch July 26, 2017 23:22
@vieux vieux mentioned this pull request Jul 26, 2017
docker-jenkins pushed a commit that referenced this pull request Aug 17, 2018
Remove arch specific dockerfiles for RPM building
Upstream-commit: 0d23632
Component: packaging
docker-jenkins pushed a commit that referenced this pull request Dec 29, 2018
…_return_code

Revert "[18.09 backport] API: fix status code on conflicting service names"
Upstream-commit: ce8b8f1cf33bb33811077be3b0b972dd2dbc4c79
Component: engine
silvin-lubecki pushed a commit to silvin-lubecki/docker-ce that referenced this pull request Feb 3, 2020
[17.06] Fix error handling with not-exist errors on remove
akrasnov-drv pushed a commit to drivenets/docker-ce that referenced this pull request Apr 23, 2023
Remove arch specific dockerfiles for RPM building
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants