Skip to content

Puppet 6.1.0 with puppetlabs-docker 3.1.0 fails to start containers #402

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

Closed
mconway opened this issue Jan 7, 2019 · 2 comments
Closed

Comments

@mconway
Copy link

mconway commented Jan 7, 2019

What you expected to happen?

Before today, I was running puppet server v 5.3.0 to manage all of my docker containers on my homelab server. After I upgraded to 6.1.0 containers will not start/create.

What happened?

Everything was working OK on 5.3.0. I upgraded the puppetserver container to latest (6.1.0) and on the next puppet agent run, all my containers were deleted and would not restart.

I dug up issue #313, which was very similar but I had already tried the remove_container_on_start => false, and I was not using detach => true.

How to reproduce it?

Here is an example manifest that I've been using, but this was happening with all 15+ containers I had set up.

class homeautomation::mqtt::docker {
  docker::image { 'mqtt:v1':
    docker_file => '/srv/rabbitmq/Dockerfiles/Dockerfile.mqtt',
    docker_dir  => '/srv/rabbitmq/Dockerfiles'
  }

  docker::run { 'rabbitmq':
    image            => 'mqtt:v1',
    volumes          => ['/srv/rabbitmq/rabbitmq.config:/etc/rabbitmq/rabbitmq.config','/srv/rabbitmq/mnesia:/var/lib/rabbitmq/mnesia'],
    ports            => ['15671:15671','15672:15672','1883:1883'],
    remove_container_on_start => false,
    remove_container_on_stop => false
  }
}

Anything else we need to know?

I tracked this down to the .sh scripts that are created for systemd to run. the Health_Check_Command is being populated with 's'. With no interval set, the .sh fails to run.

By explicitly setting health_check_interval => 30, in all of my manifests for docker::run, the containers are now starting up again.

Versions:

$ puppet --version
docker exec -it puppet puppet --version
6.1.0

$ docker version
Client:
 Version:	17.12.0-ce
 API version:	1.35
 Go version:	go1.9.2
 Git commit:	c97c6d6
 Built:	Wed Dec 27 20:11:19 2017
 OS/Arch:	linux/amd64

Server:
 Engine:
  Version:	17.12.0-ce
  API version:	1.35 (minimum version 1.12)
  Go version:	go1.9.2
  Git commit:	c97c6d6
  Built:	Wed Dec 27 20:09:54 2017
  OS/Arch:	linux/amd64
  Experimental:	false

$ facter os
{"name"=>"Debian", "family"=>"Debian", "release"=>{"major"=>"9", "minor"=>"6", "full"=>"9.6"}, "lsb"=>{"distcodename"=>"stretch", "distid"=>"Debian", "distdescription"=>"Debian GNU/Linux 9.6 (stretch)", "distrelease"=>"9.6", "majdistrelease"=>"9", "minordistrelease"=>"6"}}

$ puppet module list
`/etc/puppetlabs/code/environments/production/modules
├── database (???)
├── development (???)
├── firefly (???)
├── gnomethemes (???)
├── groupware (???)
├── homeautomation (???)
├── icinga-icinga2 (v1.3.5)
├── knowledge (???)
├── linux (???)
├── maestrodev-wget (v1.7.3)
├── monitoring (???)
├── music (???)
├── networking (???)
├── puppet-hiera (v3.3.1)
├── puppetlabs-apt (v4.5.1)
├── puppetlabs-chocolatey (v3.0.0)
├── puppetlabs-concat (v4.2.0)
├── puppetlabs-docker (v3.1.0)
├── puppetlabs-inifile (v1.6.0)
├── puppetlabs-motd (v1.8.0)
├── puppetlabs-powershell (v2.2.0)
├── puppetlabs-reboot (v2.0.0)
├── puppetlabs-registry (v1.1.4)
├── puppetlabs-stdlib (v4.24.0)
├── puppetlabs-translate (v1.1.0)
├── security (???)
├── video (???)
├── web (???)
└── windows (???)
/opt/puppetlabs/puppet/modules (no modules installed)
`

## Logs:

I never came across any errors, and didn't save one of the bad .sh scripts


@davejrt
Copy link
Contributor

davejrt commented Jan 8, 2019

This is already fixed in master and will be resolved with the next release which we are aiming to push out very soon. Version 3.1.0 doesn't have support for puppet6. This is documented on the forge and in compatibility tab.

@davejrt davejrt closed this as completed Jan 8, 2019
@jeff1evesque
Copy link

@mconway, @davejrt, thank you for this issue and overall project. I confirm that the workaround health_check_interval => 30 works with puppet6. But, you all already know this - and the fix is on master until next release. If I pull the next release in the future, and forget to remove health_check_interval => 30, will there be any side effects?

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

3 participants