In the execution salt \* saltutil.sync_grainsminion.salt.com: the minion function caused an exception: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/salt/minion.py", line 1200, in _thread_return return_data = func (*args , **kwargs) File "/usr/lib/python2.6/site-packages/salt/modules/ saltutil.py ", line 343, in sync_grains ret = _sync (' grains ', saltenv) File "/usr/lib/python2.6/ site-packages/salt/modules/saltutil.py ", line 88, in _sync saltenv = _get_top_file_envs () File "/usr/ Lib/python2.6/site-packages/salt/modules/saltutil.py ", line 70, in _get_top_file_envs top = st_.get_top () File "/usr/lib/ python2.6/site-packages/salt/state.py ", line 2444, in get_top return self.merge_tops (tops) File "/usr/ lib/python2.6/site-packages/salt/state.py ", line 2363, in merge_tops for saltenv, targets in ctop.items (): AttributeError: ' str ' object has no attribute ' items '
Observation log records are as follows
Service side:
2016-02-23 12:30:41,096 [Salt.master][error][3138] Received minion ERROR from [minion.salt.com]: the Minion funct Ion caused an exception
Client:
2016-02-02 00:46:33,058 [salt.minion][warning][1396] The Minion function caused an exceptio N
Turn on debug mode on the client
salt-minion -l debug2016-02-23 12:36:10,113 [salt.loaded.int.render.yaml][debug ][1564] results of yaml rendering: you should modify the /srv/salt/top.sls2016-02-23 12:36:10,115 [salt.minion ][ warning ][1564] the minion function caused an exceptiontraceback (most recent call last): file "/usr/lib/python2.6/site-packages/salt/minion.py", line 1200, in _thread_return return_data = func (*args, **kwargs) File "/usr/lib/python2.6/site-packages/salt/modules/saltutil.py", line 343, in sync_grains ret = _sync (' grains ', saltenv) File "/usr/lib/python2.6/site-packages/salt/modules/saltutil.py", line 88, in _ Sync sAltenv = _get_top_file_envs () File "/usr/lib/python2.6/site-packages/salt/modules/ Saltutil.py ", line 70, in _get_top_file_envs top = st_. Get_top () File "/usr/lib/python2.6/site-packages/salt/state.py", line 2444, in get_top return self.merge_tops (tops) File "/usr/lib/ python2.6/site-packages/salt/state.py ", line 2363, in merge_tops For saltenv, targets in ctop.items ():attributeerror: ' str ' object has no attribute ' Items '
Obviously, there's something wrong with this/srv/salt/top.sls file.
Empty/srv/salt/top.sls and then execute
Salt \* saltutil.sync_grains
Minion.salt.com:-Grains.wlink
This article is from the "Linux_cheng" blog, make sure to keep this source http://6764097.blog.51cto.com/6754097/1744258
Salt service-side synchronization with client grains error one