Repository navigation
Closed
Labels
Corerelates to code central or existential to SaltP4Priority 4bugbroken, incorrect, or confusing behaviorhelp-wantedCommunity help is needed to resolve thisseverity-low4th level, cosemtic problems, work around exists
Milestone
Description
Description of Issue/Question
If the master_finger configuration option on the minion doesn't match the fingerprint of the master to which it's connecting, it stacktraces and hangs, rather than giving a nice error and failing gracefully as it does when the public key itself doesn't match:
root@vagrant-ubuntu-trusty-64:~# salt-minion
[ERROR ] Exception in callback <functools.partial object at 0x7fbb68467158>
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tornado/ioloop.py", line 600, in _run_callback
ret = callback()
File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 275, in null_wrapper
return fn(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/tornado/ioloop.py", line 615, in <lambda>
self.add_future(ret, lambda f: f.result())
File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 232, in result
raise_exc_info(self._exc_info)
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 1014, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python2.7/dist-packages/salt/crypt.py", line 433, in _authenticate
creds = yield self.sign_in()
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 1008, in run
value = future.result()
File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 232, in result
raise_exc_info(self._exc_info)
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 1017, in run
yielded = self.gen.send(value)
File "/usr/lib/python2.7/dist-packages/salt/crypt.py", line 563, in sign_in
self._finger_fail(self.opts['master_finger'], m_pub_fn)
AttributeError: 'AsyncAuth' object has no attribute '_finger_fail'
Steps to Reproduce Issue
Set master_finger on the minion to a fingerprint which doesn't match the master RSA key
Versions Report
Salt Version:
Salt: 2015.8.5
Dependency Versions:
Jinja2: 2.7.2
M2Crypto: 0.21.1
Mako: Not Installed
PyYAML: 3.10
PyZMQ: 14.0.1
Python: 2.7.6 (default, Jun 22 2015, 17:58:13)
RAET: Not Installed
Tornado: 4.3
ZMQ: 4.0.4
cffi: Not Installed
cherrypy: Not Installed
dateutil: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
libgit2: Not Installed
libnacl: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.3.0
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
python-gnupg: Not Installed
smmap: Not Installed
timelib: Not Installed
System Versions:
dist: Ubuntu 14.04 trusty
machine: x86_64
release: 3.13.0-85-generic
system: Ubuntu 14.04 trusty
Metadata
Metadata
Assignees
Labels
Corerelates to code central or existential to SaltP4Priority 4bugbroken, incorrect, or confusing behaviorhelp-wantedCommunity help is needed to resolve thisseverity-low4th level, cosemtic problems, work around exists
Activity
jfindlay commentedon May 3, 2016
Thanks for reporting, @basepi.
basepi commentedon May 3, 2016
I think this should actually be medium severity. Nothing is broken, it should just give a better error and quit graciously. I'm going to fix the labels.
abednarik commentedon May 7, 2016
Hi @basepi
I think the issue is related to method _finger_fail because is defined inside SAuth class but in this case is called in the class AsyncAuth. The issue is that SAuth is a subclass of AsyncAuth, so this last class doesn't know about the method, that's why we get an Attribute error.
Moving that method to the parent class should fix the issue probably. I will send a PR for you to review.
Thanks
abednarik commentedon May 7, 2016
Here is the PR #33106
basepi commentedon May 9, 2016
@abednarik awesome! I knew it would be something simple I just didn't have time to look into it myself.
abednarik commentedon May 9, 2016
No problem :) Glad I can help.