History | View | Annotate | Download (14.6 kB)
Make setup-ssh behave more friendly
So while testing my previous patch I run setup-ssh manually withoutany arguments, and it did nothing (no complains, no messages,anything). That was very surprising, so let's make it behave better ifno nodes are passed....
Silence Paramiko deprecation warnings
This works around a problem in Paramiko, but which looks like it's aGaneti problem:
[cluster] root@node4:~# gnt-node add --readd node3/usr/lib/python2.6/dist-packages/Crypto/Util/randpool.py:40:RandomPool_DeprecationWarning: This application uses RandomPool, which...
DeprecationWarning fixes for pylint
In version 0.21, pylint unified all the disable-* (and enable-*)directives to disable (resp. enable). This leads to a lot ofDeprecationWarning being emitted even if one uses the recommendedversion of pylint (0.21.1, as stated in devnotes.rst)....
setup-ssh: Better error reporting
Together with Michael we refactored the code to make it better andeasier error reporting. Without printing backtraces for authenticationand verification issues.
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Adjust the error message of setup-ssh if join check fails
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Merge branch 'devel-2.2'
Merge branch 'stable-2.2' into devel-2.2
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
Adding functionality to check feasability of joining the host
This checks if the host might possibily belong already to anothercluster. If this is the case we abort without any further actionunless we are forced by --force-join.
Signed-off-by: René Nussbaumer <rn@google.com>...
If we had any errors in setup in one of the hosts, exit with non-zero
Fix the output of the key fingerprint from binary to hex
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Fix some epydoc warnings
Signed-off-by: Manuel Franceschini <livewire@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Revert behaviour for calling SetupNodeDaemon
This was previously done in setup-ssh which was the wrong place
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Adding host key verification to setup-ssh
setup-ssh: fix updating of authorized_keys
Due to what seems like a bug (or inconsistency) in paramiko, filesopened with a+ over SFTP need a seek() in order for the user to be ableto read data from them. We implement this, and rely on the fact that wedo iterate over all lines before writing and that the file is opened in...
setup-ssh: Also use keys from the ssh-agent
Currently, setup-ssh only uses one disk-based key. This means that anysetup where we use keys from ssh-agent (which do not necessarily existon disk) will break when moving from the old method to setup-ssh.
This patch moves the SSH key handling to separate functions, and uses...
setup-ssh: fix the logging error message
This took a bit of interesting debugging, but the issue seems to be thaton older python/logging/paramiko (I'm not sure which is at fault here),the other threads are finishing later than the main thread, so thelogging module closes the logging file (but doesn't unregister it)...
setup-ssh: only read the ssh port once
Then reuse it. With certain setups, this could be slow when pre-seedingan entire cluster.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
setup-ssh: redo the logging levels
There is not enough logged by default on stderr, and way too muchinformation in the log file.
Since we don't want to debug paramiko itself, we filter only warningsand above.
Otherwise, we make WARNINGS the default level, with verbose meaning INFO...
setup-ssh: try to use key auth first
This patch changes the setup-ssh workflow to try key authenticationfirst, and then fall-back to password authentication. The password isalso read lazily, with no prompts if we can authenticate via keys.
Signed-off-by: Iustin Pop <iustin@google.com>...
Disable 'invalid name' pylint warning for tools/setup-ssh
Signed-off-by: Manuel Franceschini <livewire@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Adding tool to setup SSH on a remote host
This prepares the remote node to be joined into a cluster