SaltStack遇到的一些问题及解决

1、salt-api删除key报没有权限!

修改/etc/salt/master.d/文件夹下的,eauth.conf

external_auth:
  pam:
    saltapi:   # 用户
      - .*     # 该配置文件给予saltapi用户所有模块使用权限,出于安全考虑一般只给予特定模块使用权限
      - '@runner'
      - '@wheel'

salt-api的用户添加wheel的权限。

参考:

python 操作 saltstack Api(二) 示例 - FRESHMANS - 博客园

saltstack api wheel模块报错HTTP/1.1 401 Unauthorized_weixin_34405925的博客-CSDN博客

简单测试:

from devops.lib.saltcommand import SaltCommand

salt = SaltCommand().get_salt_handle()
node_name = 'bb93e33f-dd75-42a7-a4f2-ec3d429c146b'
result = salt.salt_delete_key(node_name)
print(result)

2、[WARNING ][11366] IMPORTANT: Do not use md5 hashing algorithm! Please set "hash_type" to SHA256 in Salt Minion config!

报上面的错误是因为加密算法出了问题,打开minion的配置文件,找到如下的配置项进行修改!

# hash_type: md5

或者

# hash_type: sha256

改成

hash_type: sha256

3、[WARNING ] Key 'file_ignore_glob' with value None has an invalid type of NoneType, a list is required for this value

/etc/salt/master的配置文件中,将file_ignore_glob的注释全部打开,重启master即可。

4、Unable to call _return_pub_multi on 192.168.xx.xx, trying another...

The minion failed to return the job information for job xxxxxxxxxxxxxxxxxxxxxxxx. This is often due to the master being shut down or o...hreads value.

未解决

5、salt-master[8155]: [ERROR   ] An extra return was detected from minion xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, please verify the minion, this could be a replay attack

未解决

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值