SaltStack 和 GitFS - 找不到 Top 文件或外部节点数据匹配 [英] SaltStack and GitFS - No Top file or external nodes data matches found

查看:53
本文介绍了SaltStack 和 GitFS - 找不到 Top 文件或外部节点数据匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的/etc/salt/master 配置:

#GitFSgitfs_provider: pygit2gitfs_base:开发gitfs_env_whitelist:- 根据文件服务器后端:- 混帐gitfs_remotes:- ssh://git@github.com/myrepo/salt-states.git:- 公钥:/root/.ssh/my.pub- 私钥:/root/.ssh/my- 挂载点:salt:///srv/salt/salt-states

这是我的 repo 目录结构:

<预><代码>.|-- README.md|-- 公式|`-- 测试||-- 测试.sls`--top.sls

这是我非常基本的 top.sls:

基础:'*':- 测试

如果我尝试在我的测试节点上运行 highstate,我会得到:

root@saltmaster:/etc/salt] salt -v '*' state.highstate使用 jid 执行作业 1234567890-------------------------------------测试minion.domain:----------ID:状态功能:无.无结果:错误评论:未找到 Top 文件或外部节点数据匹配.开始:期间:变化:test-minion.domain 的摘要------------成功:0失败:1------------运行状态总数:1总运行时间:0.000 毫秒

我不知道为什么这不起作用,希望得到任何帮助.我试过只应用 test.sls 来查看它是否是问题所在的顶级文件,但我得到了这个:

root@saltmaster:/etc/salt] salt -v '*' state.sls 测试使用 jid 执行作业 1234567890-------------------------------------测试minion.domain:数据编译失败:----------在 env 'base' 中找不到与 'test' 匹配的 sls

解决方案

我和 saltstack IRC 上的人聊过,有人帮我解决了这个问题.添加挂载点似乎把一切都搞砸了.归功于:

12:20] == 真名:Thomas Phipps[12:20] == 频道:#salt[12:20] == 服务器:orwell.freenode.net [NL][12:20] == :正在使用安全连接[12:20] == 账号:whytewolf[12:20] == WHOIS 结束

Here is my /etc/salt/master config:

#GitFS
gitfs_provider: pygit2
gitfs_base: DEVELOPMENT
gitfs_env_whitelist:
  - base

fileserver_backend:
  - git
gitfs_remotes:
  - ssh://git@github.com/myrepo/salt-states.git:
    - pubkey: /root/.ssh/my.pub
    - privkey: /root/.ssh/my
    - mountpoint: salt:///srv/salt/salt-states

Here is my directory structure for the repo:

.
|-- README.md
|-- formulas
|   `-- test
|       |-- test.sls
`-- top.sls

Here is my very basic top.sls:

base:
  '*':
    - test

If i try to run highstate on my test node I get:

root@saltmaster:/etc/salt] salt -v '*' state.highstate
Executing job with jid 1234567890
-------------------------------------------

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

Summary for test-minion.domain
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   0.000 ms

I'm not sure why this isn't working and would appreciate any help with this. I've tried just applying the test.sls to see if it was the top file that was the issue but I got this:

root@saltmaster:/etc/salt] salt -v '*' state.sls test
Executing job with jid 1234567890
-------------------------------------------

test-minion.domain:
    Data failed to compile:
----------
    No matching sls found for 'test' in env 'base'

解决方案

I talked to the folks on the saltstack IRC and someone helped me fix the problem. It seems that adding a mountpoint was screwing everything up. Credit goes to:

12:20] ==  realname : Thomas Phipps
[12:20] ==  channels : #salt
[12:20] ==  server   : orwell.freenode.net [NL]
[12:20] ==           : is using a secure connection
[12:20] ==  account  : whytewolf
[12:20] == End of WHOIS

这篇关于SaltStack 和 GitFS - 找不到 Top 文件或外部节点数据匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆