salt icon indicating copy to clipboard operation
salt copied to clipboard

Beacons issue in 2016.3.3

Open haeac opened this issue 10 years ago • 2 comments

Description of Issue/Question

Hello,

I'm new to salt and am trying to setup beacons, specifically the btmp beacon. Trying to configure the disable_during_state_run: True and interval: 10 param for the beacon as directed by the documentation and the minion has issues starting up. Any thoughts?

Setup

(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).) Master running on CentOS 7.2 and minion running on CentOS 6.6. Both, master and minion are running 2016.3.3 installed using the official salt-stack repo.

The original beacons.conf file on the minion was as follows: beacons:   btmp: {}     disable_during_state_run: True     interval: 10

Steps to Reproduce Issue

(Include debug logs if possible and relevant.) When minion beacons.conf on the minion is set to the following: beacons:   btmp: {}     disable_during_state_run: True

The following error occurs when trying to start the minion (salt-minion -l debug): [DEBUG ] Reading configuration from /etc/salt/minion [DEBUG ] Including configuration from '/etc/salt/minion.d/_schedule.conf' [DEBUG ] Reading configuration from /etc/salt/minion.d/_schedule.conf [DEBUG ] Including configuration from '/etc/salt/minion.d/beacons.conf' [DEBUG ] Reading configuration from /etc/salt/minion.d/beacons.conf [ERROR ] Error parsing configuration file: /etc/salt/minion.d/beacons.conf - while parsing a block mapping in "", line 2, column 3: btmp: {} ^ expected , but found '' in "", line 3, column 5: disable_during_state_run: True ^ [ERROR ] Error parsing configuration file: /etc/salt/minion.d/beacons.conf - while parsing a block mapping in "", line 2, column 3: btmp: {} ^ expected , but found '' in "", line 3, column 5: disable_during_state_run: True ^

When the beacons.conf on the minion is changed to the following:

beacons:    btmp: {}   disable_during_state_run: True

I get the following error when running the minion (salt-minion -l debug): [CRITICAL] The beacon errored: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/salt/minion.py", line 2042, in handle_beacons beacons = self.process_beacons(self.functions) File "/usr/lib/python2.6/site-packages/salt/minion.py", line 380, in process_beacons return self.beacons.process(b_conf) # pylint: disable=no-member File "/usr/lib/python2.6/site-packages/salt/beacons/init.py", line 60, in process if 'enabled' in current_beacon_config: TypeError: argument of type 'NoneType' is not iterable

However, the minion stays active and the beacons seem to work.

Versions Report

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

Dependency Versions: cffi: 0.8.6 cherrypy: Not Installed dateutil: Not Installed gitdb: 0.6.4 gitpython: 1.0.1 ioflo: 1.3.8 Jinja2: 2.7.2 libgit2: 0.21.0 libnacl: 1.4.3 M2Crypto: 0.21.1 Mako: Not Installed msgpack-pure: Not Installed msgpack-python: 0.4.8 mysql-python: Not Installed pycparser: 2.14 pycrypto: 2.6.1 pygit2: 0.21.4 Python: 2.7.5 (default, Sep 15 2016, 22:37:39) python-gnupg: Not Installed PyYAML: 3.11 PyZMQ: 15.3.0 RAET: 0.6.3 smmap: 0.9.0 timelib: Not Installed Tornado: 4.2.1 ZMQ: 4.1.4

System Versions: dist: centos 7.2.1511 Core machine: x86_64 release: 3.10.0-327.36.2.el7.x86_64 system: Linux version: CentOS Linux 7.2.1511 Core

Minion:

Salt Version: Salt: 2016.3.3

Dependency Versions: cffi: Not Installed cherrypy: 3.3.0 dateutil: 2.5.0 gitdb: Not Installed gitpython: Not Installed ioflo: 1.3.8 Jinja2: 2.2.1 libgit2: Not Installed libnacl: 1.4.3 M2Crypto: 0.20.2 Mako: Not Installed msgpack-pure: Not Installed msgpack-python: 0.4.6 mysql-python: Not Installed pycparser: Not Installed pycrypto: 2.6.1 pygit2: Not Installed Python: 2.6.6 (r266:84292, Jul 23 2015, 15:22:56) python-gnupg: Not Installed PyYAML: 3.10 PyZMQ: 14.5.0 RAET: 0.6.3 smmap: Not Installed timelib: Not Installed Tornado: 4.2.1 ZMQ: 4.0.5

System Versions: dist: centos 6.6 Final machine: x86_64 release: 2.6.32-573.18.1.el6.x86_64 system: Linux version: CentOS 6.6 Final

haeac avatar Oct 17 '16 19:10 haeac

@haeac you will need to get rid of that empty dicitonary. Try this configuration:

beacons:
  btmp:
    disable_during_state_run: True
    interval: 10

You would only include the empty dictionary {} if you did not have additional parameters to setup. Let me know if that works. thanks :)

Ch3LL avatar Oct 17 '16 22:10 Ch3LL

@Ch3LL, thanks for the suggestion. That seems to have done the trick.

haeac avatar Oct 17 '16 22:10 haeac