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 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
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 vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🐯

@vdemeester vdemeester merged commit a79d04a into moby:master May 14, 2018
@thaJeztah thaJeztah deleted the error_on_unsupported_options branch May 14, 2018 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants