highstate报错:server5: ---ID: states Function: no.None Result: False

问题环境:

 

我已经用salt-master 配置好了salt-minion:172.25.17.5 的nginx 宾伽服务已经启动,现在在salt-master 执行:

ERROR:

[root@server1 salt]#  salt server5 state.highstate
server5:
----------
          ID: states
    Function: no.None
      Result: False
     Comment: No Top file or master_tops data matches found.
     Changes:   

Summary for server5
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   0.000 ms
ERROR: Minions returned with non-zero exit code

解决;

修改/srv/salt/top.sls

[root@server1 salt]# cat top.sls
base:
  'server2': 
    - httpd.service

  'server5':
    - nginx.service

此时重新推进:

[root@server1 salt]#  salt '*' state.highstate
server2:
----------
          ID: install-httpd
    Function: pkg.installed
      Result: True
     Comment: All specified packages are already installed
     Started: 08:10:14.587003
    Duration: 1071.229 ms
     Changes:   
----------
          ID: /etc/httpd/conf/httpd.conf
    Function: file.managed
      Result: True
     Comment: File /etc/httpd/conf/httpd.conf is in the correct state
     Started: 08:10:15.662873
    Duration: 45.82 ms
     Changes:   
----------
          ID: httpd-service
    Function: service.running
        Name: httpd
      Result: True
     Comment: The service httpd is already running
     Started: 08:10:15.711142
    Duration: 64.609 ms
     Changes:   

Summary for server2
------------
Succeeded: 3
Failed:    0
------------
Total states run:     3
Total run time:   1.182 s
server5:
----------
          ID: nginx-install
    Function: pkg.installed
      Result: True
     Comment: All specified packages are already installed
     Started: 08:10:14.760569
    Duration: 1059.632 ms
     Changes:   
----------
          ID: nginx-install
    Function: file.managed
        Name: /mnt/nginx-1.15.7.tar.gz
      Result: True
     Comment: File /mnt/nginx-1.15.7.tar.gz is in the correct state
     Started: 08:10:15.825096
    Duration: 84.16 ms
     Changes:   
----------
          ID: nginx-install
    Function: cmd.run
        Name: cd /mnt && tar zxf nginx-1.15.7.tar.gz && cd nginx-1.15.7 && sed -i 's/CFLAGS="$CFLAGS -g"/#CFLAGS="$CFLAGS -g"/g' auto/cc/gcc && ./configure --prefix=/usr/local/nginx  && make  && make install  && cd .. && rm -fr nginx-1.15.7
      Result: True
     Comment: /usr/local/nginx exists
     Started: 08:10:15.912183
    Duration: 1.319 ms
     Changes:   
----------
          ID: nginx
    Function: user.present
      Result: True
     Comment: User nginx is present and up to date
     Started: 08:10:15.914960
    Duration: 2.706 ms
     Changes:   
----------
          ID: /usr/local/nginx/conf/nginx.conf
    Function: file.managed
      Result: True
     Comment: File /usr/local/nginx/conf/nginx.conf is in the correct state
     Started: 08:10:15.918005
    Duration: 29.772 ms
     Changes:   
----------
          ID: nginx-service
    Function: file.managed
        Name: /etc/systemd/system/nginx.service
      Result: True
     Comment: File /etc/systemd/system/nginx.service is in the correct state
     Started: 08:10:15.948519
    Duration: 32.801 ms
     Changes:   
----------
          ID: nginx-service
    Function: service.running
        Name: nginx
      Result: True
     Comment: The service nginx is already running
     Started: 08:10:15.984769
    Duration: 58.095 ms
     Changes:   

Summary for server5
------------
Succeeded: 7
Failed:    0
------------
Total states run:     7
Total run time:   1.268 s
ERROR: Minions returned with non-zero exit code

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值