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

Cannot start test containers - No filesystems present in Docker (on Mac) Version 1.13.0 (15072) #273

Closed
robshep opened this issue Jan 21, 2017 · 3 comments
Assignees
Milestone

Comments

@robshep
Copy link

robshep commented Jan 21, 2017

I just upgraded to Version 1.13.0 (15072)

I cannot start my test containers:

2017-01-21 02:28:58.268  INFO 28442 --- [           main] org.testcontainers.DockerClientFactory   : Disk utilization in Docker environment is unknown (unknown available )
2017-01-21 02:28:58.353  WARN 28442 --- [           main] org.testcontainers.DockerClientFactory   : Encountered and ignored error while checking disk space

org.testcontainers.DockerClientFactory$NotAbleToGetDiskSpaceUsageException: null

Running df in the alpine 3.2 image, I have found that, on my setup at least, there are no filesystems mounted as shown by df

graviton:~ rob$ docker run alpine:3.2 df -a
Filesystem           1K-blocks      Used Available Use% Mounted on
graviton:~ rob$

There doesn't seem to be a reasonable scope for a workaround. TestContainers needs to run df -P to workout the available diskspace.

Stuck for the moment.....

@rnorth
Copy link
Member

rnorth commented Jan 21, 2017

Hi @robshep
That's extremely odd - with Docker for Mac 1.13.0 (15072) I am getting numerous results:

$ docker run alpine:3.2 df -a
Filesystem           1K-blocks      Used Available Use% Mounted on
none                  18745336   7977916   9776696  45% /
proc                         0         0         0   0% /proc
tmpfs                  1023572         0   1023572   0% /dev
devpts                       0         0         0   0% /dev/pts
sysfs                        0         0         0   0% /sys
tmpfs                  1023572         0   1023572   0% /sys/fs/cgroup
openrc                       0         0         0   0% /sys/fs/cgroup/openrc
cpuset                       0         0         0   0% /sys/fs/cgroup/cpuset
cpu                          0         0         0   0% /sys/fs/cgroup/cpu
cpuacct                      0         0         0   0% /sys/fs/cgroup/cpuacct
blkio                        0         0         0   0% /sys/fs/cgroup/blkio
memory                       0         0         0   0% /sys/fs/cgroup/memory
devices                      0         0         0   0% /sys/fs/cgroup/devices
freezer                      0         0         0   0% /sys/fs/cgroup/freezer
net_cls                      0         0         0   0% /sys/fs/cgroup/net_cls
perf_event                   0         0         0   0% /sys/fs/cgroup/perf_event
net_prio                     0         0         0   0% /sys/fs/cgroup/net_prio
hugetlb                      0         0         0   0% /sys/fs/cgroup/hugetlb
pids                         0         0         0   0% /sys/fs/cgroup/pids
cgroup                       0         0         0   0% /sys/fs/cgroup/systemd
mqueue                       0         0         0   0% /dev/mqueue
/dev/sda1             18745336   7977916   9776696  45% /etc/resolv.conf
/dev/sda1             18745336   7977916   9776696  45% /etc/hostname
/dev/sda1             18745336   7977916   9776696  45% /etc/hosts
shm                      65536         0     65536   0% /dev/shm
proc                         0         0         0   0% /proc/bus
proc                         0         0         0   0% /proc/fs
proc                         0         0         0   0% /proc/irq
proc                         0         0         0   0% /proc/sys
proc                         0         0         0   0% /proc/sysrq-trigger
tmpfs                  1023572         0   1023572   0% /proc/kcore
tmpfs                  1023572         0   1023572   0% /proc/timer_list
tmpfs                  1023572         0   1023572   0% /proc/sched_debug
tmpfs                  1023572         0   1023572   0% /sys/firmware

$ docker info
Containers: 2
 Running: 0
 Paused: 0
 Stopped: 2
Images: 31
Server Version: 1.13.0
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 296
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host ipvlan macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 03e5862ec0d8d3b3f750e19fca3ee367e13c090e
runc version: 2f7393a47307a16f8cee44a37b262e8b81021e3e
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.4-moby
Operating System: Alpine Linux v3.5
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.952 GiB
Name: moby
ID: T7JG:DA4V:U4O2:RNDE:EPVL:I7HW:QYF4:545J:KB4U:RBMX:CLOU:WYGL
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 22
 Goroutines: 32
 System Time: 2017-01-21T05:51:56.091952133Z
 EventsListeners: 1
No Proxy: *.local, 169.254/16
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

Regardless, though, the disk space check should be best-efforts and in my view should not abort even when the df results come back truncated. I'll amend the code to be more forgiving, but it would be good to get to the bottom of why df is coming up empty for you as well!

@rnorth rnorth self-assigned this Jan 21, 2017
@robshep
Copy link
Author

robshep commented Jan 21, 2017

Thanks Peter,

My docker info shows the following difference - unsure why

Storage Driver: overlay2

as opposed to your aufs.

Upon installation of 1.13.0 it wouldn't start so I had to reset it via the docker whale menu to factory defaults. Maybe it chose a new incoming default.

I certainly have mounted filesystems:

graviton:~ rob$ docker run -ti alpine:3.2 mount
overlay on / type overlay (rw,relatime,lowerdir=/var/lib/docker/overlay2/l/JRXSUXZABJXCW7XGZKEUAGL5RV:/var/lib/docker/overlay2/l/EGZALMJ5XPC5VMQSLU32U5A5FS,upperdir=/var/lib/docker/overlay2/0ab95835cc899d93e4d5b0bc7b12744c6bd84470346efa2410ec0eef89b63b76/diff,workdir=/var/lib/docker/overlay2/0ab95835cc899d93e4d5b0bc7b12744c6bd84470346efa2410ec0eef89b63b76/work)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev type tmpfs (rw,nosuid,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666)
sysfs on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,relatime,mode=755)
openrc on /sys/fs/cgroup/openrc type cgroup (ro,nosuid,nodev,noexec,relatime,release_agent=/lib/rc/sh/cgroup-release-agent.sh,name=openrc)
cpuset on /sys/fs/cgroup/cpuset type cgroup (ro,nosuid,nodev,noexec,relatime,cpuset)
cpu on /sys/fs/cgroup/cpu type cgroup (ro,nosuid,nodev,noexec,relatime,cpu)
cpuacct on /sys/fs/cgroup/cpuacct type cgroup (ro,nosuid,nodev,noexec,relatime,cpuacct)
blkio on /sys/fs/cgroup/blkio type cgroup (ro,nosuid,nodev,noexec,relatime,blkio)
memory on /sys/fs/cgroup/memory type cgroup (ro,nosuid,nodev,noexec,relatime,memory)
devices on /sys/fs/cgroup/devices type cgroup (ro,nosuid,nodev,noexec,relatime,devices)
freezer on /sys/fs/cgroup/freezer type cgroup (ro,nosuid,nodev,noexec,relatime,freezer)
net_cls on /sys/fs/cgroup/net_cls type cgroup (ro,nosuid,nodev,noexec,relatime,net_cls)
perf_event on /sys/fs/cgroup/perf_event type cgroup (ro,nosuid,nodev,noexec,relatime,perf_event)
net_prio on /sys/fs/cgroup/net_prio type cgroup (ro,nosuid,nodev,noexec,relatime,net_prio)
hugetlb on /sys/fs/cgroup/hugetlb type cgroup (ro,nosuid,nodev,noexec,relatime,hugetlb)
pids on /sys/fs/cgroup/pids type cgroup (ro,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/systemd type cgroup (ro,nosuid,nodev,noexec,relatime,name=systemd)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
/dev/sda1 on /etc/resolv.conf type ext4 (rw,relatime,data=ordered)
/dev/sda1 on /etc/hostname type ext4 (rw,relatime,data=ordered)
/dev/sda1 on /etc/hosts type ext4 (rw,relatime,data=ordered)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
devpts on /dev/console type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
proc on /proc/bus type proc (ro,nosuid,nodev,noexec,relatime)
proc on /proc/fs type proc (ro,nosuid,nodev,noexec,relatime)
proc on /proc/irq type proc (ro,nosuid,nodev,noexec,relatime)
proc on /proc/sys type proc (ro,nosuid,nodev,noexec,relatime)
proc on /proc/sysrq-trigger type proc (ro,nosuid,nodev,noexec,relatime)
tmpfs on /proc/kcore type tmpfs (rw,nosuid,mode=755)
tmpfs on /proc/timer_list type tmpfs (rw,nosuid,mode=755)
tmpfs on /proc/sched_debug type tmpfs (rw,nosuid,mode=755)
tmpfs on /sys/firmware type tmpfs (ro,relatime)

I've just tried with debian:latest and the output is as expected - so I think it must be an issue with either busybox df or musclib-c in alpine and the overlay storage driver.

Relaxing the hard requirement of some df output would be ok with me ;)

rnorth added a commit that referenced this issue Jan 21, 2017
…ws no available volumes (see #273). While the cause is not known, and Docker may yet fail, relaxing this constraint at least lets Docker try without aborting prematurely.
@robshep
Copy link
Author

robshep commented Jan 21, 2017

Thanks Richard.

Just to complete the investigation...

In the Daemon > advanced setting of the docker menu I switched to aufs as follows, and the df command works as expected.

{
"experimental" : false,
"storage-driver": "aufs",
}

rnorth added a commit that referenced this issue Jan 21, 2017
…ws no available volumes (see #273). While the cause is not known, and Docker may yet fail, relaxing this constraint at least lets Docker try without aborting prematurely.
rnorth added a commit that referenced this issue Jan 22, 2017
…ws no available volumes (see #273). While the cause is not known, and Docker may yet fail, relaxing this constraint at least lets Docker try without aborting prematurely.

Use functional operation to compare disk space if not null
@rnorth rnorth modified the milestone: 1.1.8 Jan 22, 2017
@rnorth rnorth closed this as completed Jan 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants