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

overlay: do not ignore invalid storage-driver options #37040

Merged
merged 1 commit into from May 14, 2018

Conversation

@thaJeztah
Copy link
Member

thaJeztah commented May 11, 2018

Fixes #37039

The overlay storage driver currently does not support any option, but was silently ignoring any option that was passed.

This patch verifies that no options are passed, and if they are passed will produce
an error.

Before this change:

dockerd --storage-driver=overlay --storage-opt dm.thinp_percent=95
INFO[2018-05-11T11:40:40.996597152Z] libcontainerd: started new docker-containerd process  pid=256
....
INFO[2018-05-11T11:40:41.135392535Z] Daemon has completed initialization
INFO[2018-05-11T11:40:41.141035093Z] API listen on /var/run/docker.sock

After this change:

dockerd --storage-driver=overlay --storage-opt dm.thinp_percent=95
INFO[2018-05-11T11:39:21.632610319Z] libcontainerd: started new docker-containerd process  pid=233
....
Error starting daemon: error initializing graphdriver: overlay: unknown option dm.thinp_percent

- Description for the changelog

* Fix overlay storage-driver silently ignoring unknown storage-driver options [moby/moby#37040](https://github.com/moby/moby/pull/37040)
The overlay storage driver currently does not support any option, but was silently
ignoring any option that was passed.

This patch verifies that no options are passed, and if they are passed will produce
an error.

Before this change:

    dockerd --storage-driver=overlay --storage-opt dm.thinp_percent=95
    INFO[2018-05-11T11:40:40.996597152Z] libcontainerd: started new docker-containerd process  pid=256
    ....
    INFO[2018-05-11T11:40:41.135392535Z] Daemon has completed initialization
    INFO[2018-05-11T11:40:41.141035093Z] API listen on /var/run/docker.sock

After this change:

    dockerd --storage-driver=overlay --storage-opt dm.thinp_percent=95
    INFO[2018-05-11T11:39:21.632610319Z] libcontainerd: started new docker-containerd process  pid=233
    ....
    Error starting daemon: error initializing graphdriver: overlay: unknown option dm.thinp_percent

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@codecov

This comment has been minimized.

Copy link

codecov bot commented May 13, 2018

Codecov Report

Merging #37040 into master will decrease coverage by 0.02%.
The diff coverage is 28.57%.

@@            Coverage Diff             @@
##           master   #37040      +/-   ##
==========================================
- Coverage    35.1%   35.07%   -0.03%     
==========================================
  Files         615      615              
  Lines       45793    45807      +14     
==========================================
- Hits        16077    16069       -8     
- Misses      27606    27624      +18     
- Partials     2110     2114       +4
Copy link
Member

vdemeester left a comment

LGTM 🐯

@vdemeester vdemeester merged commit a79d04a into moby:master May 14, 2018
7 of 8 checks passed
7 of 8 checks passed
codecov/patch 28.57% of diff hit (target 50%)
Details
codecov/project 35.07% (-0.03%) compared to 593255f
Details
dco-signed All commits are signed
experimental Jenkins build Docker-PRs-experimental 40593 has succeeded
Details
janky Jenkins build Docker-PRs 49331 has succeeded
Details
powerpc Jenkins build Docker-PRs-powerpc 9788 has succeeded
Details
windowsRS1 Jenkins build Docker-PRs-WoW-RS1 20724 has succeeded
Details
z Jenkins build Docker-PRs-s390x 9684 has succeeded
Details
@thaJeztah thaJeztah deleted the thaJeztah:error_on_unsupported_options branch May 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.