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

Docker 1.10 service does not start with 5.0 module on Centos 7.1 #434

Closed
dcfsc opened this issue Feb 10, 2016 · 1 comment
Closed

Docker 1.10 service does not start with 5.0 module on Centos 7.1 #434

dcfsc opened this issue Feb 10, 2016 · 1 comment

Comments

@dcfsc
Copy link

dcfsc commented Feb 10, 2016

We have a Puppet manifest running on Centos 7.1 that uses the 5.0 Docker Puppet module and Docker 1.10. When Puppet installs the Docker service, it creates a file /etc/systemd/system/docker.service.d/service-overrides.conf

[Service]
EnvironmentFile=-/etc/sysconfig/docker
EnvironmentFile=-/etc/sysconfig/docker-storage
EnvironmentFile=-/etc/sysconfig/docker-network
ExecStart=
ExecStart=/usr/bin/docker -d -H fd:// $OPTIONS \
      $DOCKER_STORAGE_OPTIONS \
      $DOCKER_NETWORK_OPTIONS \
      $BLOCK_REGISTRY \
      $INSECURE_REGISTRY

Reviewing the Docker CLI doc it looks like newer Dockers require the argument daemon instead of -d. This was deprecated in 1.8 and removed in 1.10 (see deprecation notice)

So when I change the file to

[Service]
EnvironmentFile=-/etc/sysconfig/docker
EnvironmentFile=-/etc/sysconfig/docker-storage
EnvironmentFile=-/etc/sysconfig/docker-network
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:// $OPTIONS \
      $DOCKER_STORAGE_OPTIONS \
      $DOCKER_NETWORK_OPTIONS \
      $BLOCK_REGISTRY \
      $INSECURE_REGISTRY

and run systemctl daemon-reload and systemctl restart docker the service comes up fine.

I considered creating a PR to simply change the value, but I think that breaks it for folks using older Docker versions that require the -d instead of daemon, so the value of the argument should probably be in the template. This is above my Ruby-fu level, but I could give it a shot. I did not see another variable in the code deciding what parameter to use anywhere else.

I also thought it might be related to #432, but it does not seem so. Our problem is starting Docker.

@dcfsc
Copy link
Author

dcfsc commented Feb 10, 2016

I think this was fixed in 6107f9b. I am cherry picking it for internal use until the next release.

@dcfsc dcfsc closed this as completed Feb 10, 2016
cegeka-jenkins pushed a commit to cegeka/puppet-docker that referenced this issue Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant