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

setting size with zfs doesn't work (prevent docker to run) #33847

Open
barrachri opened this Issue Jun 27, 2017 · 7 comments

Comments

Projects
None yet
4 participants
@barrachri

barrachri commented Jun 27, 2017

Description
You follow the doc here and then try to run the docker daemon.

Describe the results you received:
Put this inside /etc/docker/daemon.json

{
  "storage-driver": "zfs",
  "storage-opts": ["size=256M"]
}

and you will get this:
Jun 27 15:25:08 vultr.guest dockerd[4289]: Error starting daemon: error initializing graphdriver: Unknown option size

Describe the results you expected:
A running docker

Output of docker version:

root@vultr:~# docker version
Client:
 Version:      17.03.1-ce
 API version:  1.27
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Mon Mar 27 17:14:09 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.03.1-ce
 API version:  1.27 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Mon Mar 27 17:14:09 2017
 OS/Arch:      linux/amd64
 Experimental: false

Output of docker info:

root@vultr:~# docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 17.03.1-ce
Storage Driver: zfs
 Zpool: zpool-docker
 Zpool Health: ONLINE
 Parent Dataset: zpool-docker
 Space Used By Parent: 339968
 Space Available: 10336522240
 Parent Quota: no
 Compression: lz4
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 4ab9917febca54791c5f071a9d1f404867857fcc
runc version: 54296cf40ad8143b62dbcaa1d90e520a2136ddfe
init version: 949e6fa
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.4.0-78-generic
Operating System: Ubuntu 16.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 488.2 MiB
Name: vultr.guest
ID: OUUG:AGHU:MK72:ACOK:WXRS:GSVE:GANC:F3G4:LM2I:6JR6:CUSD:PZHV
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

Additional environment details (AWS, VirtualBox, physical, etc.):

Using a vm on vultr.

@unclejack

This comment has been minimized.

Contributor

unclejack commented Jul 3, 2017

That storage driver doesn't have such an option. The daemon can't start when it's provided an invalid argument. This is the intended behavior. Starting the daemon when invalid options are provided would make that a silent failure.

@barrachri

This comment has been minimized.

barrachri commented Jul 3, 2017

Thanks @unclejack, so the docs is wrong?

Am I right that there is quota support for ZFS (#21946)?

@unclejack

This comment has been minimized.

Contributor

unclejack commented Jul 3, 2017

@barrachri That PR was merged after the release of 17.03 from what I can tell. Can you try a newer Docker version, please?

@barrachri

This comment has been minimized.

barrachri commented Sep 20, 2017

With this docker version

root@zfs:~# docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 17.06.2-ce
Storage Driver: zfs
 Zpool: zpool-docker
 Zpool Health: ONLINE
 Parent Dataset: zpool-docker
 Space Used By Parent: 339968
 Space Available: 51748982784
 Parent Quota: no
 Compression: lz4
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 6e23458c129b551d5c9871e5174f6b1b7f6d1170
runc version: 810190ceaa507aa2727d7ae6f4790c76ec150bd2
init version: 949e6fa
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.4.0-96-generic
Operating System: Ubuntu 16.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 992.2MiB
Name: zfs
ID: 6TYH:4BZA:675M:K4IR:ANM3:JP7F:UUKT:E4D5:2FRY:MBNY:NZYN:QD35
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

If I put

{
  "storage-driver": "zfs",
  "storage-opts": ["size=256M"]
}

It doens't work.

root@zfs:~# docker info
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

if I remove opts it works

root@zfs:~# cat /etc/docker/daemon.json
{
  "storage-driver": "zfs"
}
@thaJeztah

This comment has been minimized.

Member

thaJeztah commented Sep 20, 2017

I don't think size is supported as a daemon option, only for docker run https://github.com/docker/cli/blob/master/docs/reference/commandline/dockerd.md#zfs-options

@barrachri

This comment has been minimized.

barrachri commented Sep 20, 2017

@thaJeztah

This comment has been minimized.

Member

thaJeztah commented Sep 20, 2017

Hm, possibly yes, but perhaps @chosenken can confirm, I'm not too familiar with the zfs storage driver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment