Repository navigation
Closed
Labels
P3Priority 3PlatformRelates to OS, containers, platform-based utilities like FS, system based appsbugbroken, incorrect, or confusing behaviorfixed-pls-verifyfix is linked, bug author to confirm fixseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone
Description
versions:
dpkg -l | grep salt
ii salt-common 2015.8.5+ds-1 all shared libraries that salt requires for all packages
ii salt-master 2015.8.5+ds-1 all remote manager to administer servers via salt
ii salt-minion 2015.8.5+ds-1 all client package for salt, the distributed remote execution system
dpkg -l | grep inoti
ii python-pyinotify 0.9.4-1build1 all simple Linux inotify Python bindings
state.sls
inotify-requirements:
pkg.installed:
- pkgs:
- python-pyinotify
watch_sudoers:
beacon.present:
- name: inotify
- enabled: true
- /etc/sudoers:
mask:
- modify
- create
- delete
- moved_to
- close_write
- attrib
- move_self
- delete_self
it's failing with following error message:
[INFO ] Running state [inotify] at time 09:32:15.366417
[INFO ] Executing state beacon.present for inotify
[DEBUG ] SaltEvent PUB socket URI: ipc:///var/run/salt/minion/minion_event_149afc8ff5_pub.ipc
[DEBUG ] SaltEvent PULL socket URI: ipc:///var/run/salt/minion/minion_event_149afc8ff5_pull.ipc
[DEBUG ] SaltEvent PUB socket URI: ipc:///var/run/salt/minion/minion_event_149afc8ff5_pub.ipc
[DEBUG ] SaltEvent PULL socket URI: ipc:///var/run/salt/minion/minion_event_149afc8ff5_pull.ipc
[DEBUG ] Sending event - data = {'_stamp': '2016-02-08T09:32:15.368247', 'func': 'list'}
[TRACE ] get_event() received = {'tag': '/salt/minion/minion_beacons_list_complete', 'data': {'beacons': {'enabled': True, 'inotify': {'/etc/sudoers': {'auto_add': True, 'mask': ['modify', 'create', 'delete', 'moved_to', 'close_write', 'attrib', 'move_self', 'delete_self']}}}, '_stamp': '2016-02-08T09:32:15.369220', 'complete': True}}
[DEBUG ] event_ret {'beacons': {'enabled': True, 'inotify': {'/etc/sudoers': {'auto_add': True, 'mask': ['modify', 'create', 'delete', 'moved_to', 'close_write', 'attrib', 'move_self', 'delete_self']}}}, '_stamp': '2016-02-08T09:32:15.369220', 'complete': True}
[DEBUG ] SaltEvent PUB socket URI: ipc:///var/run/salt/minion/minion_event_149afc8ff5_pub.ipc
[DEBUG ] SaltEvent PULL socket URI: ipc:///var/run/salt/minion/minion_event_149afc8ff5_pull.ipc
[DEBUG ] SaltEvent PUB socket URI: ipc:///var/run/salt/minion/minion_event_149afc8ff5_pub.ipc
[DEBUG ] SaltEvent PULL socket URI: ipc:///var/run/salt/minion/minion_event_149afc8ff5_pull.ipc
[DEBUG ] Sending event - data = {'_stamp': '2016-02-08T09:32:15.422529', 'func': 'list'}
[TRACE ] get_event() received = {'tag': '/salt/minion/minion_beacons_list_complete', 'data': {'beacons': {'enabled': True, 'inotify': {'/etc/sudoers': {'auto_add': True, 'mask': ['modify', 'create', 'delete', 'moved_to', 'close_write', 'attrib', 'move_self', 'delete_self']}}}, '_stamp': '2016-02-08T09:32:15.423439', 'complete': True}}
[DEBUG ] event_ret {'beacons': {'enabled': True, 'inotify': {'/etc/sudoers': {'auto_add': True, 'mask': ['modify', 'create', 'delete', 'moved_to', 'close_write', 'attrib', 'move_self', 'delete_self']}}}, '_stamp': '2016-02-08T09:32:15.423439', 'complete': True}
[DEBUG ] Successfully imported beacon.
[INFO ] Configuration for inotify beacon must be a dictionary of dictionaries.
[ERROR ] An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1624, in call
**cdata['kwargs'])
File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 1491, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/salt/states/beacon.py", line 70, in present
ret['changes'] = result['changes']
KeyError: 'changes'
[INFO ] Completed state [inotify] at time 09:32:15.501020
[DEBUG ] File /var/cache/salt/minion/accumulator/139954555719568 does not exist, no need to cleanup.
[DEBUG ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/minion', 'ubuntu-14-04', 'tcp://172.17.0.3:4506', 'aes')
[DEBUG ] Initializing new SAuth for ('/etc/salt/pki/minion', 'ubuntu-14-04', 'tcp://172.17.0.3:4506')
[DEBUG ] LazyLoaded highstate.output
[TRACE ] data = {'local': {'beacon_|-watch_sudoers_|-inotify_|-present': {'comment': u'An exception occurred in this state: Traceback (most recent call last):\n File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1624, in call\n **cdata[\'kwargs\'])\n File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 1491, in wrapper\n return f(*args, **kwargs)\n File "/usr/lib/python2.7/dist-packages/salt/states/beacon.py", line 70, in present\n ret[\'changes\'] = result[\'changes\']\nKeyError: \'changes\'\n', 'name': 'inotify', 'start_time': '09:32:15.366417', 'result': False, 'duration': u'134.603 ms', '__run_num__': 1, 'changes': {}}, 'pkg_|-inotify-requirements_|-inotify-requirements_|-installed': {'comment': u'All specified packages are already installed', 'name': 'python-pyinotify', 'start_time': '09:32:13.430094', 'result': True, 'duration': u'1935.617 ms', '__run_num__': 0, 'changes': {}}}}
meanwhile, if I remove enabled: True from state, and do
salt '*' beacon.enable
I got
salt '*' beacons.list
ubuntu-14-04:
beacons:
enabled: true
inotify:
/etc/sudoers:
auto_add: true
mask:
- modify
- create
- delete
- moved_to
- close_write
- attrib
- move_self
- delete_self
There is definitely something wrong with it.
Metadata
Metadata
Assignees
Labels
P3Priority 3PlatformRelates to OS, containers, platform-based utilities like FS, system based appsbugbroken, incorrect, or confusing behaviorfixed-pls-verifyfix is linked, bug author to confirm fixseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Activity
jfindlay commentedon Feb 8, 2016
@onorua, thanks for the report.
cachedout commentedon Feb 11, 2016
cc: @garethgreenaway
garethgreenaway commentedon Feb 12, 2016
@cachedout will take a look.
garethgreenaway commentedon Feb 12, 2016
Believe I've found the issue, working on a fix now.
cachedout commentedon Feb 12, 2016
Awesome! Thank you, @garethgreenaway
garethgreenaway commentedon Feb 12, 2016
@cachedout no worries :) Need to prep a similar PR for develop, as those changes will break some of the beacons that are in develop and not 2015.8.