Beacon inotify problem
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description of Issue/Question
I am trying to set up beacon as in the example doc for
inotify:
- files:
/etc/important_file:
mask:
- modify
and i keep getting this error on the salt-minion:
2018-07-21 13:25:23,094 [salt.minion ][CRITICAL][24187] The beacon errored:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/salt/minion.py", line 2230, in handle_beacons
beacons = self.process_beacons(self.functions)
File "/usr/lib/python2.7/site-packages/salt/minion.py", line 409, in process_beacons
return self.beacons.process(b_conf, self.opts['grains']) # pylint: disable=no-member
File "/usr/lib/python2.7/site-packages/salt/beacons/__init__.py", line 99, in process
raw = self.beacons[fun_str](b_config[mod])
File "/usr/lib/python2.7/site-packages/salt/beacons/inotify.py", line 261, in beacon
if isinstance(config[path], dict):
TypeError: list indices must be integers, not dict
Setup
(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)
[root]$ cat beacons.conf
beacons:
load:
- averages:
1m:
- 0.0
- 2.0
5m:
- 0.1
- 1.5
15m:
- 0.1
- 1.0
- emitatstartup: True
- onchangeonly: False
- interval: 60
inotify:
- files:
/etc/important_file:
mask:
- modify
Steps to Reproduce Issue
(Include debug logs if possible and relevant.)
Versions Report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
Salt: 2018.3.2
Dependency Versions:
cffi: 1.9.1
cherrypy: 3.2.2
dateutil: 2.7.3
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.8
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.21.1
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: Not Installed
pycparser: 2.17
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.5 (default, Nov 6 2016, 00:28:07)
python-gnupg: Not Installed
PyYAML: 3.12
PyZMQ: 15.3.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4
System Versions:
dist: centos 7.2.1511 Core
locale: UTF-8
machine: x86_64
release: 3.10.0-327.36.3.el7.x86_64
system: Linux
version: CentOS Linux 7.2.1511 Core
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported configuration from beacons.conf on the Salt 2018.3.2 setup, then start at salt/beacons/inotify.py around line 261 and trace how the inotify configuration is processed. Done means the supplied configuration no longer raises the TypeError and the beacon reports the expected file-change behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100