python 2.4 (optional, used for node daemon memory locking)
- `socat <http://www.dest-unreach.org/socat/>`_, see :ref:`note
<socat-note>` below
-- `Paramiko <http://www.lag.net/paramiko/>`_, if you want automated SSH
- setup; optional otherwise but manual setup of the nodes required
+- `Paramiko <http://www.lag.net/paramiko/>`_, if you want to use
+ ``ganeti-listrunner``
- `affinity Python module <http://pypi.python.org/pypi/affinity/0.1.0>`_,
optional python package for supporting CPU pinning under KVM
- `ElementTree Python module <http://effbot.org/zone/element-index.htm>`_,
AC_PYTHON_MODULE(pyinotify, t)
AC_PYTHON_MODULE(pycurl, t)
AC_PYTHON_MODULE(affinity)
-
-# This is optional but then we've limited functionality
AC_PYTHON_MODULE(paramiko)
-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.]))
-fi
AC_CONFIG_FILES([ Makefile ])
import os
import logging
-import re
from ganeti import utils
from ganeti import errors
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,
_homedir_fn=None):
"""Return the paths of a user's SSH files.
"%s ssh-rsa %s\n" % (cfg.GetClusterName(),
mocks.FAKE_CLUSTER_KEY))
- 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):
import time
import traceback
-import paramiko
+try:
+ 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\".")
+ sys.exit(1)
REMOTE_PATH_BASE = "/tmp/listrunner"