2016-07-15 91 views
0

我正在測試salt-cloudsaltify在目標機器上部署/安裝salt-minions。salt-master salt-cloud not acting idempotent

我創建了三個流浪漢機和名稱他們奴才-01奴才-02

所有的機器都是這樣的;

[email protected]:/home/vagrant# lsb_release -a 
No LSB modules are available. 
Distributor ID: Ubuntu 
Description: Ubuntu 14.04.4 LTS 
Release: 14.04 
Codename: trusty 

然後在主我跟着此http://repo.saltstack.com/#ubuntu 安裝鹽主(手動ofcourse)。

然後在主人我添加這三個文件。

/etc/salt/cloud.providers:/etc/salt/cloud.profiles.d

[email protected]:/etc/salt/cloud.providers.d# cat bare_metal.conf 
my-saltify-config: 
    minion: 
    master: 192.168.33.10 
    driver: saltify 

[email protected]:/etc/salt/cloud.profiles.d# cat saltify.conf 
make_salty: 
    provider: my-saltify-config 
    script_args: git v2016.3.1 

的/ etc /鹽/ saltify-map

[email protected]:/etc/salt# cat saltify-map 
make_salty: 
    - minion-01: 
     ssh_host: 192.168.33.11 
     ssh_username: vagrant 
     password: vagrant 
    - minion-02: 
     ssh_host: 192.168.33.12 
     ssh_username: vagrant 
     password: vagrant 

然後在小嘍喲我跑salt-cloud -m /etc/salt/saltify-map 這是非常緩慢,但它運行沒有錯誤。 012_這兩個小號01和小號02的鍵被鹽師傅接受。

我可以這樣做:

[email protected]:/home/vagrant# salt 'minion*' test.ping 
    minion-01: 
     True 
    minion-02: 
     True 

和這一點;

[email protected]:/home/vagrant# salt-key 
Accepted Keys: 
minion-01 
minion-02 
Denied Keys: 
Unaccepted Keys: 
Rejected Keys: 

問題;

現在當我再次執行這個salt-cloud -m /etc/salt/saltify-map salt-master重新運行整個執行然後我有這個;

[email protected]:/home/vagrant# salt 'minion*' test.ping 
minion-02: 
    Minion did not return. [No response] 
minion-01: 
    Minion did not return. [No response] 

和這個;

[email protected]:/etc/salt# salt-key 
Accepted Keys: 
minion-01 
minion-02 
Denied Keys: 
minion-01 
minion-02 
Unaccepted Keys: 
Rejected Keys: 

總之鹽雲不做功冪等

我在做什麼錯?

第二個問題是,雖然在第一次運行salt-cloud -m /etc/salt/saltify-map安裝和接受的關鍵奴才-01奴才-02對鹽主,但僕從機器已經沿安裝了所有這些事情salt-minion

[email protected]:/home/vagrant# salt 
salt   salt-call salt-cp  salt-master salt-proxy salt-ssh  salt-unity 
salt-api  salt-cloud salt-key  salt-minion salt-run  salt-syndic 

如何確保僅安裝了salt-minion

感謝。

PS:

[email protected]:/etc/salt# salt-master --version 
salt-master 2016.3.1 (Boron) 

回答

1

你寫的: 「這是非常慢」

您已設置script_args到從GitHub從源代碼安裝的一切價值觀。您可能希望刪除參數(或使用不同的參數)以快速安裝預先打包的版本。有關可用選項,請參閱https://github.com/saltstack/salt-bootstrap,特別是bootstrap-salt.sh

你寫的:「鹽雲不是演戲冪等」

你做正確的一切。 salt-cloud不是冪等的。據我所知,它不是冪等的。

你寫:「走狗機器擁有所有這些東西連同鹽馬仔安裝」

這可能是例因使用git參數和從源代碼安裝它。請嘗試預包裝版本的Salt。

0

Vagrant不會破壞機器之間的運行,是嗎?

從外觀上看,在第二次運行中,鹽爪牙已經開始使用新鑰匙並且重新向主人註冊。因爲他們已經有了相同的名字,所有人都感到困惑.....

跑步前試試「流浪摧毀」,這樣機器每次都是新鮮的?

0

看來它是一個saltify錯誤。所以,對這個問題無能爲力。該錯誤報告,並希望這將在未來的版本中得到解決。

相關問題