Salt service-side synchronization with client grains error one

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.