首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >对永续盐业的反思?

对永续盐业的反思?
EN

Stack Overflow用户
提问于 2014-04-03 14:48:57
回答 2查看 2.2K关注 0票数 2

我一直在用盐做实验,我成功地封锁了我的上级指挥部。它已经运行了几个小时了,尽管没有什么能保证这样的时间。

我做的最后一个修改是修改nginx的service.watch状态。目前的案文如下:

代码语言:javascript
复制
nginx:
  pkg.installed:
    - name: nginx
  service:
    - running
    - enable: True
    - restart: True
    - watch:
      - file: /etc/nginx/nginx.conf
      - file: /etc/nginx/sites-available/default.conf
      - pkg: nginx

我所做的最后一个更改是将第二个file:参数添加到watch中。

在让它运行了一整晚,没有任何变化的状态,我随后Ctrl的进程。sudo salt -v 'web*' state.highstate -l debug的最后一个输出是:

代码语言:javascript
复制
[DEBUG   ] Checking whether jid 20140403022217881027 is still running
[DEBUG   ] get_returns for jid 20140403103702550977 sent to set(['web1.mysite.com']) will timeout at 10:37:04
[DEBUG   ] jid 20140403103702550977 found all minions
Execution is still running on web1.mysite.com
^CExiting on Ctrl-C
This job's jid is:                                                                                                                                     
20140403022217881027
The minions may not have all finished running and any remaining minions will return upon completion. To look up the return data for this job later run:
salt-run jobs.lookup_jid 20140403022217881027

马上再运行一次,我得到了这个:

代码语言:javascript
复制
$ sudo salt -v 'web*' state.highstate -l debug
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Missing configuration file: /home/eykd/.salt
[DEBUG   ] Configuration file path: /etc/salt/master
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Missing configuration file: /home/eykd/.salt
[DEBUG   ] LocalClientEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] LocalClientEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
Executing job with jid 20140403103715454952
-------------------------------------------

[DEBUG   ] Checking whether jid 20140403103715454952 is still running
[DEBUG   ] get_returns for jid 20140403103720479720 sent to set(['web1.praycontinue.com']) will timeout at 10:37:22
[INFO    ] jid 20140403103720479720 minions set(['web1.mysite.com']) did not return in time
[DEBUG   ] Loaded no_out as virtual quiet
[DEBUG   ] Loaded json_out as virtual json
[DEBUG   ] Loaded yaml_out as virtual yaml
[DEBUG   ] Loaded pprint_out as virtual pprint
web1.praycontinue.com:
    Minion did not return

然后运行相同的命令,并收到以下命令

代码语言:javascript
复制
$ sudo salt -v 'web*' state.highstate -l debug
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Missing configuration file: /home/eykd/.salt
[DEBUG   ] Configuration file path: /etc/salt/master
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Missing configuration file: /home/eykd/.salt
[DEBUG   ] LocalClientEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] LocalClientEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
Executing job with jid 20140403103729848942
-------------------------------------------

[DEBUG   ] Loaded no_out as virtual quiet
[DEBUG   ] Loaded json_out as virtual json
[DEBUG   ] Loaded yaml_out as virtual yaml
[DEBUG   ] Loaded pprint_out as virtual pprint
web1.mysite.com:
    Data failed to compile:
----------
    The function "state.highstate" is running as PID 4417 and was started at 2014, Apr 03 02:22:17.881027 with jid 20140403022217881027

没有进程在PID 4417下运行。运行sudo salt-run jobs.lookup_jid 20140403022217881027不会显示任何内容。

不幸的是,我无法通过ssh连接到这个仆从,因为salt还没有提供我的authorized_keys。*\

所以,关于我的问题:到底是什么错了,我是怎么发现的呢?

EN

回答 2

Stack Overflow用户

发布于 2014-04-04 05:36:43

因此,经过大量调试,这是一个配置不当的Nginx服务的结果。service nginx start被绞死了,盐仆从也是如此.

票数 1
EN

Stack Overflow用户

发布于 2014-10-01 15:55:20

当我用Ctrl在盐主上中止运行state.highstate时,我就发生了这种情况。结果表明,错误消息中引用的PID实际上是微信机器上盐分过程的PID。

我能够解决这个问题,方法是在minion上重新启动盐分进程,然后在主服务器上重新执行state.highstate。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22841230

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档