Commit 78062de9 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Make Paramiko an optional dependency for listrunner

With the move away from “setup-ssh”, Paramiko is no longer necessary to
configure SSH on nodes.
Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parent 8a670753
......@@ -41,8 +41,8 @@ Before installing, please verify that you have the following programs:
python 2.4 (optional, used for node daemon memory locking)
- `socat <>`_, see :ref:`note
<socat-note>` below
- `Paramiko <>`_, if you want automated SSH
setup; optional otherwise but manual setup of the nodes required
- `Paramiko <>`_, if you want to use
- `affinity Python module <>`_,
optional python package for supporting CPU pinning under KVM
- `ElementTree Python module <>`_,
......@@ -663,14 +663,7 @@ AC_PYTHON_MODULE(pyparsing, t)
AC_PYTHON_MODULE(pyinotify, t)
# This is optional but then we've limited functionality
if test "$HAVE_PYMOD_PARAMIKO" = "no"; then
AC_MSG_WARN(m4_normalize([You do not have Paramiko installed. While this is
optional you have to configure SSH and the node
daemon on the joining nodes yourself.]))
AC_CONFIG_FILES([ Makefile ])
......@@ -26,7 +26,6 @@
import os
import logging
import re
from ganeti import utils
from ganeti import errors
......@@ -37,18 +36,6 @@ from ganeti import vcluster
from ganeti import compat
def FormatParamikoFingerprint(fingerprint):
"""Format paramiko PKey fingerprint.
@type fingerprint: str
@param fingerprint: PKey fingerprint
@return: The string hex representation of the fingerprint
assert len(fingerprint) % 2 == 0
return ":".join(re.findall(r"..", fingerprint.lower()))
def GetUserFiles(user, mkdir=False, dircheck=True, kind=constants.SSHK_DSA,
"""Return the paths of a user's SSH files.
......@@ -49,12 +49,6 @@ class TestKnownHosts(testutils.GanetiTestCase):
"%s ssh-rsa %s\n" % (cfg.GetClusterName(),
def testFormatParamikoFingerprintCorrect(self):
self.assertEqual(ssh.FormatParamikoFingerprint("C0Ffee"), "c0:ff:ee")
def testFormatParamikoFingerprintNotDividableByTwo(self):
self.assertRaises(AssertionError, ssh.FormatParamikoFingerprint, "C0Ffe")
class TestGetUserFiles(unittest.TestCase):
def setUp(self):
......@@ -64,7 +64,14 @@ import sys
import time
import traceback
import paramiko
import paramiko
except ImportError:
print >> sys.stderr, \
("The \"paramiko\" module could not be imported. Install it from your"
" distribution's repository. The package is usually named"
" \"python-paramiko\".")
REMOTE_PATH_BASE = "/tmp/listrunner"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment