puppetlabs / puppetlabs/puppetlabs-docker

Error: Failed to apply catalog: No such file or directory - docker

Open
#904 1 comment 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

I have my init.pp file include 2 classes:

  • docker_setup.pp
  • docker_container.pp

docker_setup.pp has the following code:

class docker_setup {
  class { 'docker':
    docker_users => ['roy'],
    extra_parameters => ['--data-root=/proj/docker'],
  }
}

docker_container.pp has the following code:

docker::run { 'splunk':
    #ensure => absent,
    image   => 'splunk/splunk:8.2.5',
    ports => ['127.0.0.1:8000:8000','127.0.0.1:8089:8089'],
    restart => 'no',
    require   => Class['docker'],
  }

when running puppet agent -t I get the following error:

Error: Failed to apply catalog: No such file or directory - docker

Expected Behavior

I would expect docker to be installed and then start the container

Environment

  • puppet labs-docker version v6.0.2 (the same error happened in v5.0.0 as well)
  • AWS instances both master and agent
  • Master OS:
    CentOS Linux release 7.7.1908 (Core)
  • Agent OS:
    CentOS Stream release 9

Additional Context

Please note that there is docker installed on the agent.

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 with docker_setup.pp and docker_container.pp, then reproduce the failure using puppet agent -t on the stated CentOS environments. Inspect where the Docker class is applied and identify why the catalog reports "No such file or directory - docker" despite Docker being installed; done means the catalog applies and the Splunk container starts as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.