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] Rendering SLS 'base:zabbix.agent.repo' failed: Jinja variable 'dict object' has no attribute 'repo_signedby' #170

Open
tmclo opened this issue Aug 31, 2024 · 0 comments
Labels

Comments

@tmclo
Copy link

tmclo commented Aug 31, 2024

Your setup

Formula commit hash / release tag

commit hash: d0f67ae

Versions reports (master & minion)

salt --versions-report [master] (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
          Salt: 3006.0

Python Version:
        Python: 3.6.15 (default, Sep 23 2021, 15:41:43) [GCC]

Dependency Versions:
          cffi: 1.13.2
      cherrypy: Not Installed
   contextvars: 2.4
      dateutil: Not Installed
     docker-py: Not Installed
         gitdb: 4.0.7
     gitpython: 3.1.12
        Jinja2: 2.10.1
       libgit2: 1.7.1
  looseversion: 1.0.2
      M2Crypto: 0.38.0
          Mako: Not Installed
       msgpack: 0.5.6
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 21.3
     pycparser: 2.17
      pycrypto: Not Installed
  pycryptodome: Not Installed
        pygit2: 1.14.0
  python-gnupg: Not Installed
        PyYAML: 5.4.1
         PyZMQ: 17.1.2
        relenv: Not Installed
         smmap: 3.0.2
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.2.3

System Versions:
          dist: opensuse-leap 15.6
        locale: UTF-8
       machine: x86_64
       release: 6.4.0-150600.23.7-default
        system: Linux
       version: openSUSE Leap 15.6
salt --versions-report [minion] (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
          Salt: 3007.1

Python Version:
        Python: 3.10.14 (main, Apr  3 2024, 21:30:09) [GCC 11.2.0]

Dependency Versions:
          cffi: 1.16.0
      cherrypy: 18.8.0
      dateutil: 2.8.2
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.4
       libgit2: Not Installed
  looseversion: 1.3.0
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.7
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 23.1
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.19.1
        pygit2: Not Installed
  python-gnupg: 0.5.2
        PyYAML: 6.0.1
         PyZMQ: 25.1.2
        relenv: 0.16.0
         smmap: Not Installed
       timelib: 0.3.0
       Tornado: 6.3.3
           ZMQ: 4.3.4

Salt Package Information:
  Package Type: onedir

System Versions:
          dist: ubuntu 24.04 noble
        locale: utf-8
       machine: x86_64
       release: 6.8.0-36-generic
        system: Linux
       version: Ubuntu 24.04 noble

Pillar / config used

zabbix.sls [pillar] (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
zabbix:
  # Overrides map.jinja
  lookup:
    version_repo: '7.0'
    agent:
      pkgs:
        - zabbix-agent

zabbix-agent:
  server:
    - x.x.x.x
  serveractive:
    - x.x.x.x
  listenip: 0.0.0.0
  listenport: 10050
  tlsaccept: psk
  tlsconnect: psk
  tlspskidentity: 'psk1'
  tlspskfile: '/etc/zabbix/zabbix_agentd.psk'
  logfile: /var/log/zabbix/zabbix_agentd.log
  # logfilesize: 0
  # include: /etc/zabbix/zabbix_agentd.d/
  extra_conf: |
    # Here we can set extra agent configuration lines

Bug details

Describe the bug

Repo failing on Ubuntu 24.04 systems

state.apply output (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
timemachine:
    Data failed to compile:
----------
    Rendering SLS 'base:zabbix.agent.repo' failed: Jinja variable 'dict object' has no attribute 'repo_signedby'
/var/cache/salt/minion/files/base/zabbix/repo.sls(28):
---
[...]
{{ id_prefix }}_apt-transport-https:
  pkg.installed:
    - name: apt-transport-https
{{ id_prefix }}_repo:
  pkgrepo.managed:
    - name: deb [ arch={{ salt['grains.get']('osarch')|lower }} {{ zabbix.repo_signedby }} ]    <======================
        https://repo.zabbix.com/zabbix/{{ zabbix.version_repo }}/{{ salt['grains.get']('os')|lower }} {{ salt['grains.get']('oscodename') }} main
    - file: /etc/apt/sources.list.d/zabbix.list
    - key_url: https://repo.zabbix.com/zabbix-official-repo.key
    - clean_file: True
    - aptkey: {{ zabbix.repo_aptkey }}
[...]
---

Steps to reproduce the bug

Attempt to apply repo state to an Ubuntu 24.04 machine

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

1 participant