puppetlabs / puppetlabs/puppetlabs-docker

docker_stack incorrectly determines if the stack is deployed

Open
#968 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the Bug

When a stack runs on several machines and the services are spread out between them, this check in docker/lib/puppet/provider/docker_stack/ruby.rb doesn't work correctly:

      if stack_services.count != stack_containers.count
        return false
      end

Expected Behavior

Containers belonging to the same stack but running on other machines should be taken into account.

Additional Context

This code exists in version 4 of the module but also in the current version. I'm prepared to learn that I'm using the stack resource incorrectly for some reason.

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 in docker/lib/puppet/provider/docker_stack/ruby.rb at the stack_services.count != stack_containers.count check, and trace how deployed services and containers are discovered across machines. Done means the deployment check correctly accounts for stack containers running on other machines.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.