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

Daemon JSON configuration default-ulimits not working #1513

Closed
bitemyapp opened this issue Apr 5, 2017 · 5 comments
Closed

Daemon JSON configuration default-ulimits not working #1513

bitemyapp opened this issue Apr 5, 2017 · 5 comments

Comments

@bitemyapp
Copy link

Expected behavior

Docker starts with default ulimits set.

Actual behavior

Docker for Mac is stuck on "starting" when I attempt to set the daemon JSON configuration.

Information

  • Full output of the diagnostics from "Diagnose & Feedback" in the menu
Docker for Mac: version: 17.04.0-ce-rc2-mac6 (142462d3d)
macOS: version 10.12.4 (build: 16E195)
logs: /tmp/0E050039-49DC-437B-AAC6-2EDE0A9BD62F/20170405-125608.tar.gz
[OK]     db.git
[OK]     vmnetd
[OK]     dns
[OK]     driver.amd64-linux
[OK]     virtualization VT-X
[OK]     app
[OK]     moby
[OK]     system
[OK]     moby-syslog
[OK]     db
[OK]     env
[OK]     virtualization kern.hv_support
[OK]     slirp
[OK]     osxfs
[OK]     moby-console
[OK]     logs
[OK]     docker-cli
[OK]     menubar
[OK]     disk

I'm on Edge right now but I got the same results with Stable.

  • A reproducible case if this is a bug, Dockerfiles FTW

I don't get to the point of using a Dockerfile. This is the Docker daemon failing to start.

Steps to reproduce the behavior

  1. Set your daemon JSON config to the following:

screen shot 2017-04-05 at 12 54 56 pm

I got this configuration from the source code at: https://github.com/docker/docker/blob/f3a8886d8890d6797a568ab316baf9400ee2e1e1/daemon/config/config_unix_test.go#L20-L33

  1. Ask Docker to Apply & Restart. It will get stuck.
@bitemyapp
Copy link
Author

Sidebar: the docs for this are not good. They just show an empty map {}.

screen shot 2017-04-05 at 12 59 43 pm

@dsheets
Copy link
Contributor

dsheets commented Apr 11, 2017

Thanks for your report! I think you've uncovered a number of issues.

  1. I've opened daemon.json with default-ulimits rejected moby/moby#32528 to cover the incorrect rejection of default-ulimits (your docker.log file contains the following directives don't match any configuration option: default-ulimits)
  2. I've opened daemon.json parsing ignores unknown fields moby/moby#32530 to cover the incorrect acceptance of unknown flags (e.g. default-ulimit is accepted and ignored)
  3. I've also opened a number of tickets in the Docker for Mac development tracker about the usability of the daemon.json editor and the bad user experience of configuration errors.

Finally, in investigating your issue, I found a number of other defects related to custom daemon.json configuration that are now being investigated.

Thanks a lot for your extremely productive report! I'm going to close this issue as the fundamental problem appears to be a defect in the upstream docker project. Please subscribe to moby/moby#32528 for further updates. Thanks!

@dsheets dsheets closed this as completed Apr 11, 2017
@bitemyapp
Copy link
Author

@dsheets thank you very much 👍 😃

@rnickle
Copy link

rnickle commented Jun 20, 2018

What led me to an error without careful reading when using the daemon command line versus using the json configuration file: some of the options are plural for json since you pass kwargs, and singular for daemon since you pass discrete option and value pairs.

For example, 'log-opt' for the daemon becomes 'log-opts' (passing a {}) in daemon.json, and 'default-ulimit' for the daemon becomes 'default-ulimits' (passing a {}) in daemon.json.

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants