根據官網步驟操作
master:
[root@linux-node1 ~]# salt 'linux-node2.example.com' test.ping --return mysql
linux-node2.example.com:
True
mysql> use salt
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from salt_returns;
Empty set (0.00 sec)
minion端查看log顯示:
[root@linux-node2 ~]# tail -f /var/log/salt/minion
2018-08-03 04:40:26,483 [salt.minion :1725][ERROR ][1811] Returner mysql.returner could not be loaded: 'mysql' __virtual__ returned False: Could not import mysql returner; mysql python client is not installed.
master和minion端都有安裝
[root@linux-node2 ~]# yum install -y MySQL-python.x86_64
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Setting up Install Process
---------------------
master和minion配置:
mysql.host: '172.20.46.93'
mysql.user: 'salt'
mysql.pass: 'salt'
mysql.db: 'salt'
mysql.port: 3306
求大神看下為什么會這樣!網上也沒找到有報這個錯的!感謝
uj5u.com熱心網友回復:
解決了嗎?我也是這個問題uj5u.com熱心網友回復:
你好,你可查看下日志 /var/log/salt/minion這個問題應該是你安裝的是py3的版本,要多安裝python36-mysql軟體包即可解決。
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/99057.html
標籤:系統維護與使用區
上一篇:樹莓派還是沒聲音
下一篇:manjaro怎么關閉自動掛起
