thatch45/salt — Issue #171: States should work the first call
Author: thatch45
Created: 2011-10-28 22:33:18+00:00
State: open

[root@server ~]# salt-call state.highstate
22:31:54,107 [salt.crypt ][INFO ] Generating minion key: /etc/salt/pki/minion.pem
........++
...............................................................++
Traceback (most recent call last):
File "/usr/bin/salt-call", line 17, in
main()
File "/usr/bin/salt-call", line 14, in main
client.run()
File "/usr/lib/python2.7/site-packages/salt/cli/__init__.py", line 557, in run
caller.run()
File "/usr/lib/python2.7/site-packages/salt/cli/caller.py", line 71, in run
ret = self.call()
File "/usr/lib/python2.7/site-packages/salt/cli/caller.py", line 34, in call
*self.opts['arg']
File "/usr/lib/python2.7/site-packages/salt/modules/state.py", line 63, in highstate
st_ = salt.state.HighState(__opts__)
File "/usr/lib/python2.7/site-packages/salt/state.py", line 508, in __init__
self.client = salt.minion.FileClient(opts)
File "/usr/lib/python2.7/site-packages/salt/minion.py", line 487, in __init__
self.auth = salt.crypt.SAuth(opts)
File "/usr/lib/python2.7/site-packages/salt/crypt.py", line 305, in __init__
self.crypticle = self.__authenticate()
File "/usr/lib/python2.7/site-packages/salt/crypt.py", line 314, in __authenticate
creds = self.sign_in()
File "/usr/lib/python2.7/site-packages/salt/crypt.py", line 188, in sign_in
payload = salt.payload.package(self.minion_sign_in_payload())
File "/usr/lib/python2.7/site-packages/salt/crypt.py", line 126, in minion_sign_in_payload
key = self.get_priv_key()
File "/usr/lib/python2.7/site-packages/salt/crypt.py", line 116, in get_priv_key
key = gen_keys(self.opts['pki_dir'], 'minion', 4096)
File "/usr/lib/python2.7/site-packages/salt/crypt.py", line 43, in gen_keys
gen.save_key(priv, callback=foo_pass)
File "/usr/lib/python2.7/site-packages/M2Crypto/RSA.py", line 109, in save_key
bio = BIO.openfile(file, 'wb')
File "/usr/lib/python2.7/site-packages/M2Crypto/BIO.py", line 186, in openfile
return File(open(filename, mode))
IOError: [Errno 2] No such file or directory: '/etc/salt/pki/minion.pem'