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

[BUG] pillar wanted breaking state when compose not included #297

Closed
tyhunt99 opened this issue Aug 23, 2021 · 3 comments
Closed

[BUG] pillar wanted breaking state when compose not included #297

tyhunt99 opened this issue Aug 23, 2021 · 3 comments
Labels

Comments

@tyhunt99
Copy link
Contributor

Your setup

Formula commit hash / release tag

Tag: v2.0.7

Versions reports (master & minion)

master version
Salt Version:
          Salt: 3003.2

Dependency Versions:
          cffi: Not Installed
      cherrypy: Not Installed
      dateutil: 2.6.1
     docker-py: Not Installed
         gitdb: 2.0.3
     gitpython: 2.1.8
        Jinja2: 2.10
       libgit2: 0.26.0
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 0.5.6
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: Not Installed
      pycrypto: 2.6.1
  pycryptodome: 3.4.7
        pygit2: 0.26.2
        Python: 3.6.9 (default, Jan 26 2021, 15:33:00)
  python-gnupg: 0.4.1
        PyYAML: 3.12
         PyZMQ: 17.1.2
         smmap: 2.0.3
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.2.5

System Versions:
          dist: ubuntu 18.04 Bionic Beaver
        locale: UTF-8
       machine: x86_64
       release: 5.4.0-1055-aws
        system: Linux
       version: Ubuntu 18.04 Bionic Beaver
minion version
    Salt Version:
               Salt: 3000.9

    Dependency Versions:
               cffi: Not Installed
           cherrypy: Not Installed
           dateutil: 2.6.1
          docker-py: Not Installed
              gitdb: Not Installed
          gitpython: Not Installed
             Jinja2: 2.10
            libgit2: Not Installed
           M2Crypto: Not Installed
               Mako: 1.0.7
       msgpack-pure: Not Installed
     msgpack-python: 0.5.6
       mysql-python: Not Installed
          pycparser: Not Installed
           pycrypto: 2.6.1
       pycryptodome: Not Installed
             pygit2: Not Installed
             Python: 2.7.17 (default, Feb 27 2021, 15:10:58)
       python-gnupg: 0.4.1
             PyYAML: 3.12
              PyZMQ: 16.0.2
              smmap: Not Installed
            timelib: Not Installed
            Tornado: 4.5.3
                ZMQ: 4.2.5

    System Versions:
               dist: Ubuntu 18.04 bionic
             locale: UTF-8
            machine: x86_64
            release: 5.4.0-1055-aws
             system: Linux
            version: Ubuntu 18.04 bionic

Pillar / config used

Pillar data
docker:
  wanted:
    - docker

  pkg:
    docker:
      version: 20.10.8
      use_upstream: package
      daemon_config:
        log-driver: json-file
        log-opts:
          max-size: 20m
          max-file: '10' 

Bug details

Describe the bug

I am trying to use the wanted so that I only get the core docker installed. I do not want docker-compose, since there is a dependency in that package on a library that breaks docker login. I configure the pillar to only install docker. It fails to render when I change the defaults in the pillar data.

salt minion1 state.apply docker
minion1:
    Data failed to compile:
----------
    Rendering SLS 'base:docker.compose.software.binary.install' failed: Jinja variable 'dict object' has no attribute 'path'

Steps to reproduce the bug

  1. Enable this repo through gitfs
  2. Set the following pillar data on the target minion:
docker:
  wanted:
    - docker
  1. Try to apply the state with: state.apply docker

Expected behaviour

I would expect the core docker components to be installed and it would skip the docker compose install state. And I would be able to run containers and commands as expected eg docker ps -a.

Attempts to fix the bug

I have tried to also set supported to docker only and no luck, same error:

docker:
  wanted:
    - docker
  supported:
    - docker

Additional context

The defaults work, so if I do not set the wanted or supported values then it works but installs docker-compose as expected.

@noelmcloughlin
Copy link
Member

Thanks for report @tyhunt99
Can you try running docker.software instead of docker to see what happens?
I raised a PR #298 which may fix this issue.

@tyhunt99 tyhunt99 changed the title [BUG] [BUG] pillar wanted breaking state when compose not included Aug 24, 2021
@tyhunt99
Copy link
Contributor Author

Running just docker.software directly it works as expected

@noelmcloughlin
Copy link
Member

#298

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants