2016-07-15 93 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错误。所以,对这个问题无能为力。该错误报告,并希望这将在未来的版本中得到解决。

相关问题