Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: fix fail to resolve real graph path from soft link #38228

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

bugfix: fix fail to resolve real graph path from soft link #38228

wants to merge 1 commit into from

Conversation

Ace-Tang
Copy link

assume that /tmp/link is a soft link to /home/link, if we use
/tmp/link/docker as a graph path, and /tmp/link/docker is not exist,
docker can not get the real path.

$ ls -l /tmp/link
lrwxrwxrwx 1 root root 10 11月 20 16:22 /tmp/link -> /home/link

$ service docker restart

$ docker info | grep Root
Docker Root Dir: /tmp/link/docker

Signed-off-by: Ace-Tang aceapril@126.com

- What I did

make docker get real graph path from a soft link path.

create a directory /home/link, and link /tmp/link to it
$ sudo mkdir /home/link

$ sudo ln -s /home/link /tmp/link

$ ls -l /tmp/link
lrwxrwxrwx 1 root root 10 11月 20 16:22 /tmp/link -> /home/link

set /tmp/link/docker(this directory should not be exist before start docker) as a docker graph, restart docker, check docker info
$ docker info | grep Root
WARNING: No swap limit support
Docker Root Dir: /tmp/link/docker

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

ff73a6cb1d746b486e54c7fb31d5ff1b

assume that /tmp/link is a soft link to /home/link, if we use
/tmp/link/docker as a graph path, and /tmp/link/docker is not exist,
docker can not get the real path.

```
$ ls -l /tmp/link
lrwxrwxrwx 1 root root 10 11月 20 16:22 /tmp/link -> /home/link

$ service docker restart

$ docker info | grep Root
Docker Root Dir: /tmp/link/docker
```

Signed-off-by: Ace-Tang <aceapril@126.com>
@Ace-Tang
Copy link
Author

fail with

09:59:44 --- FAIL: TestServicePlugin (63.02s)
09:59:44     daemon.go:295: [d1c3b42ba0b19] waiting for daemon to start
09:59:44     daemon.go:327: [d1c3b42ba0b19] daemon started
09:59:44     daemon.go:282: [d1c3b42ba0b19] exiting daemon
09:59:44     daemon.go:295: [d9cf2f94196cc] waiting for daemon to start
09:59:44     daemon.go:327: [d9cf2f94196cc] daemon started
09:59:44     daemon.go:295: [d5755b3a57d98] waiting for daemon to start
09:59:44     daemon.go:327: [d5755b3a57d98] daemon started
09:59:44     daemon.go:295: [d74f3cac47f75] waiting for daemon to start
09:59:44     daemon.go:327: [d74f3cac47f75] daemon started
09:59:44     plugin_test.go:103: timeout hit after 30s: plugin "127.0.0.1:5000/swarm/test:v1" exists
09:59:44     daemon.go:282: [d74f3cac47f75] exiting daemon
09:59:44     daemon.go:282: [d5755b3a57d98] exiting daemon
09:59:44     daemon.go:282: [d9cf2f94196cc] exiting daemon

seems not relate with my fix ?

@Ace-Tang Ace-Tang changed the title daemon: fix fail to resolve real graph path from soft link bugfix: fix fail to resolve real graph path from soft link Dec 1, 2018
@olljanat
Copy link
Contributor

Experimental failed to:

16:14:51 FAIL: docker_api_swarm_node_test.go:75: DockerSwarmSuite.TestAPISwarmNodeDrainPause
16:14:51 
16:14:51 [db1514d271a46] waiting for daemon to start
16:14:51 [db1514d271a46] daemon started
16:14:51 
16:14:51 [dd7fa542a6537] waiting for daemon to start
16:14:51 [dd7fa542a6537] daemon started
16:14:51 
16:14:51 waited for 1.507141492s (out of 30s)
16:14:51 waited for 43.846245ms (out of 30s)
16:14:51 waited for 511.344104ms (out of 30s)
16:14:51 waited for 2.59320616s (out of 30s)
16:14:51 waited for 10.767551ms (out of 30s)
16:14:51 docker_api_swarm_node_test.go:104:
16:14:51     waitAndAssert(c, defaultReconciliationTimeout*2, reducedCheck(sumAsIntegers, d1.CheckActiveContainerCount, d2.CheckActiveContainerCount), checker.Equals, instances)
16:14:51 docker_utils_test.go:441:
16:14:51     c.Assert(v, checker, args...)
16:14:51 ... obtained int = 3
16:14:51 ... expected int = 1
16:14:51 ... output: "d64dc0fd3936\n77a84148c6d2\n49264463ebce\n"
16:14:51 
16:14:51 waited for 1m0.102658589s (out of 1m0s)
16:14:51 [db1514d271a46] exiting daemon
16:14:51 [dd7fa542a6537] exiting daemon
16:15:26 
16:15:26 ----------------------------------------------------------------------

even on second try but let's try once more...

@codecov
Copy link

codecov bot commented Dec 19, 2018

Codecov Report

Merging #38228 into master will decrease coverage by 0.01%.
The diff coverage is 30%.

@@            Coverage Diff             @@
##           master   #38228      +/-   ##
==========================================
- Coverage    36.1%   36.09%   -0.02%     
==========================================
  Files         610      610              
  Lines       45234    45236       +2     
==========================================
- Hits        16333    16328       -5     
- Misses      26661    26665       +4     
- Partials     2240     2243       +3

@thaJeztah
Copy link
Member

ping @dmcgowan @kolyshkin PTAL

@thaJeztah
Copy link
Member

ping @dmcgowan @kolyshkin PTAL

@thaJeztah thaJeztah added the kind/bugfix PR's that fix bugs label Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants