Skip to content
This repository has been archived by the owner. It is now read-only.

device nodes {full,urandom,random,null,zero} are not created in jessie? #5

Closed
djlewis78 opened this Issue May 27, 2014 · 6 comments

Comments

Projects
None yet
3 participants
@djlewis78
Copy link

djlewis78 commented May 27, 2014

When running the latest docker version -

$ docker version
Client version: 0.11.1
Client API version: 1.11
Go version (client): go1.2.1
Git commit (client): fb99f99
Server version: 0.11.1
Server API version: 1.11
Git commit (server): fb99f99
Go version (server): go1.2.1
Last stable version: 0.11.1

and running the lxc execdriver which is using the raring repo -

ii  lxc                                         0.9.0-0ubuntu3.7                         amd64        Linux Containers userspace tools

I run into the problem below where devices are created properly. 'null' is not a character device and full,urandom,random,zero are not created at all.

crw--w----  1 root tty  136, 3 May 27 00:41 console
lrwxrwxrwx  1 root root     11 May 27 00:35 core -> /proc/kcore
lrwxrwxrwx  1 root root     13 May 27 00:35 fd -> /proc/self/fd

lrwxrwxrwx  1 root root      7 May 27 00:35 kmsg -> console
-rw-r--r--  1 root root      0 May 27 00:35 null
lrwxrwxrwx  1 root root     13 May 27 00:35 ptmx -> /dev/pts/ptmx
drwxr-xr-x  2 root root      0 May 27 00:35 pts
lrwxrwxrwx  1 root root      4 May 27 00:35 ram -> ram1
drwxrwxrwt  2 root root     40 May 27 00:35 shm
lrwxrwxrwx  1 root root      4 May 27 00:35 stderr -> fd/2
lrwxrwxrwx  1 root root      4 May 27 00:35 stdin -> fd/0
lrwxrwxrwx  1 root root      4 May 27 00:35 stdout -> fd/1
crw--w----  1 root tty  136, 4 May 27 00:35 tty1

This seems to only affect jessie, which I require to run apache 2.4.

Wheezy on the other hand seems to work fine with the following devices

drwxr-xr-x  4 root root     240 May 27 01:24 .
drwxr-xr-x 32 root root    4096 May 27 01:24 ..
crw-------  1 root root 136, 16 May 27 01:24 console
crw-rw-rw-  1 root root   1,  7 May 27 01:24 full
crw-rw-rw-  1 root root   1,  3 May 27 01:24 null
lrwxrwxrwx  1 root root       8 May 27 01:24 ptmx -> pts/ptmx
drwxr-xr-x  2 root root       0 May 27 01:24 pts
crw-rw-rw-  1 root root   1,  8 May 27 01:24 random
drwxrwxrwt  2 root root      40 May 27 01:24 shm
crw-rw-rw-  1 root root   5,  0 May 27 01:24 tty
crw-rw-rw-  1 root root   1,  9 May 27 01:24 urandom
crw-rw-rw-  1 root root   1,  5 May 27 01:24 zero

I have tested using the ubuntu's trusty LTS with a latter version of lxc although this doesnt remedy the issue.

ii  lxc                              1.0.3-0ubuntu3                amd64        Linux Containers userspace tools

The only way that I have managed to get this to work is to use the -v run command to bind to the host devices.

docker run -v /dev/null:/dev/null -v /dev/urandom:/dev/urandom -v /dev/random:/dev/random -v /dev/full:/dev/full -v /dev/zero:/dev/zero  -it 180e6bd6c10d ls -al /dev/

Not sure if this is a security risk and a reasonable work around?

Im also not sure if this should be raised in the docker issue tracker but it seems specific to jessie...

@djlewis78

This comment has been minimized.

Copy link
Author

djlewis78 commented May 28, 2014

I have seen this in the mail lists which is possibly related -

moby/moby#6085

@tianon

This comment has been minimized.

Copy link
Owner

tianon commented May 28, 2014

This is actually more related to moby/moby#5831, which will be fixed in the next Docker release.

@timthelion

This comment has been minimized.

Copy link

timthelion commented May 28, 2014

@djlewis78 you are right, that PR fixes this.

@timthelion

This comment has been minimized.

Copy link

timthelion commented Jun 2, 2014

Is this fixed now that my PR is merged?

@tianon

This comment has been minimized.

Copy link
Owner

tianon commented Jun 2, 2014

I definitely agree that this should be closed, since it'll be fixed for sure in the next Docker release.

@tianon

This comment has been minimized.

Copy link
Owner

tianon commented Jun 19, 2014

This is fixed in Docker 1.0.0.

@tianon tianon closed this Jun 19, 2014

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.