求组关于 state.highstate 执行报错

170 views
Skip to first unread message

hunterD

unread,
Sep 20, 2015, 8:15:40 AM9/20/15
to 中国SaltStack用户组
初学salt,使用了 state.highstate ,但是出现了报错。
报错如下:
[root@nginx01 states]# salt '*' state.highstate -v
Executing job with jid 20150920150122678450
-------------------------------------------

----------
          ID: states
    Function: no.None
      Result: False
     Comment: No Top file or external nodes data matches found
     Started: 
    Duration: 
     Changes:   

Summary
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
ERROR: Minions returned with non-zero exit code

以下为我配置的文件
[root@nginx01 states]# ll init/
total 12
drwxr-xr-x 2 root root 4096 Sep 20 12:59 files
-rw-r--r-- 1 root root  168 Sep 20 13:04 limit.sls
-rw-r--r-- 1 root root   79 Sep 19 19:03 pkg.sls
[root@nginx01 states]# cat top.sls 
base:
    - init.pkg
    - init.limit
[root@nginx01 states]# cat init/pkg.sls 
pkg.init:
  pkg.installed:
    - names:
      - lrzsz
      - mtr
      - nmap
[root@nginx01 states]# cat init/limit.sls 
limit-conf-config:
  file.managed:
    - name: /etc/security/limits.conf
    - source: salt://init/files/limits.conf
    - user: root
    - group: root
    - mode: 644
[root@nginx01 states]# ll init/files/
total 4
-rw-r--r-- 1 root root 1876 Sep 20 12:59 limits.conf

salt master里我配置的file_roots

file_roots:
  base:
    - /etc/salt/states
  prod:
    - /etc/salt/states/prod

salt master版本号: salt-master 2015.5.5 (Lithium)
salt minion版本号: salt-minion 2015.5.5 (Lithium)

求组为什么出现如上错误,求解。

hunterD

unread,
Sep 20, 2015, 8:22:04 AM9/20/15
to 中国SaltStack用户组
salt '*' state.sls init.limit 通过这个方式执行是OK的。但是 salt '*' state.highstate  是不可以的。求组。。。

在 2015年9月20日星期日 UTC+8下午8:15:40,hunterD写道:

JL

unread,
Apr 24, 2016, 10:15:42 AM4/24/16
to 中国SaltStack用户组
遇到同样的问题,请问楼主怎么解决?
Reply all
Reply to author
Forward
0 new messages