puppetlabs / puppetlabs/puppetlabs-docker

run_instance restart_on_unhealthy: true takes priority over ensure: absent

Open
#857 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug community
Dominant language
Ruby
Stars
94
Forks
337
Avg merge
11d 15h
Merged PRs (30d)
2

Description

Describe the Bug

When managing containers with docker::run_instance if ensure: absent it added the containers continue to run if restart_on_unhealthy: true is also in the config block.

Expected Behavior

This should be the other way round and ensure: absent should always take priority over other config in the same block.

Steps to Reproduce

Steps to reproduce the behavior:

  1. deploy a container with run_instance with the config restart_on_unhealthy: true in place
  2. make the container absent with ensure: absent
  3. Run puppet
    Additionally:
  4. manually remove the container(s)
  5. re-run puppet and puppet will redeploy them

Environment

  • Version [3.1.0]
  • Platform [18.04]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the docker::run_instance resource handling for ensure and restart_on_unhealthy, then reproduce the reported configuration with Puppet. Done means ensure: absent removes or prevents redeployment of the container even when restart_on_unhealthy: true is also configured.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, ruby
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.