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

Provide support for Debian; to uninstall docker and deps #76

Closed
wants to merge 13 commits into from
Closed

Provide support for Debian; to uninstall docker and deps #76

wants to merge 13 commits into from

Conversation

hesco
Copy link

@hesco hesco commented Jul 14, 2014

I have successfully tested the uninstall functionality (by setting $docker::params::ensure to 'purged'). These changes will purge, or supposedly absent docker (and its dependent packages). Restoring the ::ensure value to 'present' restores the installation successfully. I made no attempt to remove the /etc/apt/sources.list.d/docker.list file nor to purge the apt key, although it seems those two actions would be appropriate if ::ensure is set to 'purged'. That is work for a later day. This functionality was sufficient for running the tests necessary for my work on the feature I am interested in.

I failed to find an init.d script upon reinstall. I am unsure whether that means that no such script exists in the package, or if my conditional wrapper has a bug in it. I will investigate that further after lunch, perhaps. Still need to sort out how to start the docker service on a debian server.

I manually added in:
https://github.com/dotcloud/docker/blob/master/contrib/init/sysvinit-debian/docker

modifying it to ensure that it runs under bash, rather than dash. Should probably contribute that patch upstream.
moby/moby#7031

When that file is incorporated into the docker package, it should be unnecessary to include it here as an explicit File['/etc/init.d/docker'] resource. After some testing I am confident that these changes should successfully ensure => running, enable => true, starting the daemon and populating /etc/rc?.d/*docker.

At this point this PR should resolve #75 and provide useful support for debian servers.

I just added support for the installation and removal of recommended packages, which right now includes only bridge-utils on debian/ubuntu machines. This has been manually tested and found to work, for $docker::params::ensure_recommended being 'present' or 'purged'.

If the Tavis CI server is satisfied, I am now recommending that these changes be exercised with the maintainer's regression suite and merged into the source project.

TODO:

  • I have made no attempt to cover these changes in the tests. But yesterdays work (in docker::install) to allow for purging the package permitted me to adequately test this functionality manually.
  • The docker::install manifest purges the /etc/init.d/docker and /etc/rc?.d/*docker files appropriately, but it still leaves /etc/default/docker and any other configuration files alone.

@hesco hesco changed the title Provide for uninstalling docker and deps, rm init.d script ONLY for ubuntu (with upstart) Provide support for Debian; to uninstall docker and deps Jul 15, 2014
@garethr
Copy link
Owner

garethr commented Aug 10, 2014

Hi @hesco. Thanks for taking a run at adding Debian support. It's definitely something I'd love the module to have. However, especially as I'm not currently using Debian myself, it's really important to me that the test suite passes for this before it's merged into master. I'm happy to add the integration tests using beaker, but if you could try and get the rest of the test suite passing that would be appreciated.

@garethr
Copy link
Owner

garethr commented Dec 4, 2014

Closing in favour of #151

@garethr garethr closed this Dec 4, 2014
@hesco hesco mentioned this pull request Dec 4, 2014
cegeka-jenkins pushed a commit to cegeka/puppet-docker that referenced this pull request 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

Successfully merging this pull request may close these issues.

fails to start docker service on debian jessie
2 participants