Bug 1316210

Summary: Cannot set dm.basesize until docker has been started
Product: [Fedora] Fedora Reporter: Mason Jones <mason.jones>
Component: dockerAssignee: Stephen Chung <schung>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: adimania, admiller, amurdaca, dwalsh, golang-updates, hushan.jia, ichavero, jcajka, jchaloup, jperrin, jrieden, lsm5, manuel.wolfshant, marianne, mgoldman, miminar, nalin, s, thrcka, vbatts
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-03 17:27:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mason Jones 2016-03-09 17:05:28 UTC
Description of problem:

When using terraform to bring up a new EC2 instance with Docker, I wanted to modify the dm.basesize option before starting Docker. To do this, my script adds a line to the /etc/sysconfig/docker-storage file:

    DOCKER_STORAGE_OPTIONS= --storage-opt dm.basesize=50G

However, when it then tries to start Docker with systemctl start docker.service I was getting an error:

    Error starting daemon: error initializing graphdriver: Unknown option dm.basesize

I had used this same line before, but realized that it was after Docker had been started at least once on the server. So then I changed things to:

    systemctl start docker.service
    Add the line to /etc/sysconfigdocker-storage
    systemctl restart docker.service

This works fine. Maybe Docker needs to be started at least once on the server in order to initialize the storage subsystem somehow? Before that's done, it doesn't recognize the storage option. This is sort of crazy, so is there a proper fix/workaround?

Version-Release number of selected component (if applicable):

Output of "docker version": Docker version 1.7.1, build 446ad9b/1.7.1
This is on AWS EC2, running CentOS Linux release 7.1.1503 (Core).

I first asked this as an issue against Docker (https://github.com/docker/docker/issues/21037) but they said since it's a Red Hat-supported build of Docker it should be asked here.

Comment 1 Lokesh Mandvekar 2016-04-02 06:38:59 UTC
changing component to 'docker'. 'docker-io' isn't used anymore.

Comment 2 Daniel Walsh 2016-06-03 12:33:01 UTC
Stephen can you check if this is actually a bug.  I don't think it is.

Comment 3 Stephen Chung 2016-06-03 13:49:37 UTC
Right, I agree with Dan, I think it was a misunderstanding of the options available for the config file. The option in the config file should be EXTRA_DOCKER_STORAGE_OPTIONS. I think the user wanted to directly append the dm.basesize command to the DOCKER_STORAGE_OPTIONS seen in the default /usr/lib/docker-storage-setup/docker-storage-setup config file.