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

traceback in _determine_beacon_config(...) in beacon/__init__.py line 105 #31944

Closed
Inveracity opened this issue Mar 17, 2016 · 3 comments
Closed
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt P3 Priority 3 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@Inveracity
Copy link
Contributor

Traceback occurs when running a beacon

Setup

minion config in /etc/salt/minion.d/beacon.conf

beacons:
  load:
    - 1m:
      - 0.0
      - 2.0
    - 5m:
      - 0.0
      - 1.5
    - 15m:
      - 0.1
      - 1.0
    - interval: 10

Steps to Reproduce Issue

command:
salt-minion -l debug
Traceback:

[CRITICAL] The beacon errored:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 1741, in handle_beacons
    beacons = self.process_beacons(self.functions)
  File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 364, in process_beacons
    return self.beacons.process(b_conf)
  File "/usr/lib/python2.7/dist-packages/salt/beacons/__init__.py", line 55, in process
    interval = self._determine_beacon_config(mod, 'interval', b_config)
  File "/usr/lib/python2.7/dist-packages/salt/beacons/__init__.py", line 105, in _determine_beacon_config
    config = config_mod[mod].get(val, False)
AttributeError: 'list' object has no attribute 'get'

Minion Versions Report

Salt Version:
           Salt: 2015.8.7

Dependency Versions:
         Jinja2: 2.7.2
       M2Crypto: Not Installed
           Mako: 0.9.1
         PyYAML: 3.10
          PyZMQ: 14.4.0
         Python: 2.7.6 (default, Jun 22 2015, 17:58:13)
           RAET: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.0.4
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 1.5
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
        libgit2: Not Installed
        libnacl: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.3.0
   mysql-python: 1.2.3
      pycparser: Not Installed
       pycrypto: 2.6.1
         pygit2: Not Installed
   python-gnupg: Not Installed
          smmap: Not Installed
        timelib: Not Installed

System Versions:
           dist: Ubuntu 14.04 trusty
        machine: x86_64
        release: 3.13.0-79-generic
         system: Ubuntu 14.04 trusty
@jfindlay jfindlay added the info-needed waiting for more info label Mar 18, 2016
@jfindlay jfindlay added this to the Blocked milestone Mar 18, 2016
@jfindlay
Copy link
Contributor

@Inveracity, thanks for reporting. According to the beacon docs, you will need to format your beacon data differently. However, an incorrectly formatted beacon should not cause a critical traceback.

@jfindlay jfindlay modified the milestones: Approved, Blocked Mar 18, 2016
@jfindlay jfindlay added Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P3 Priority 3 Core relates to code central or existential to Salt and removed info-needed waiting for more info labels Mar 18, 2016
@Inveracity
Copy link
Contributor Author

ah! of course, should have realised it. dict, not list.

I pulled it off of this example:
beacon monitoring interval

Thanks for your help!

@jfindlay
Copy link
Contributor

So that documentation needs to be fixed as well.

cachedout pushed a commit to cachedout/salt that referenced this issue Mar 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt P3 Priority 3 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests

3 participants