This patch series contains a couple of improvements for
the handling of SSH keys. Each patch is pretty independent
and there will be more patches than in this series to
come, I am just sending these out as each of them is
an improvement already and I'd like to get them in as
soon as possible.

A few notes about the changes:
- The first three patches are a bigger refactoring of
  the unit tests of backend.AddNodeSshKey and
  backend.RemoveNodeSshKey. The tests were rather
  big and have shown to be difficult to extend or
  maintain. The first patch of the series introduces
  a testutils tool which will simulate the entire
  set of SSH key files (authorized_keys and
  ganeti_pub_keys) for all nodes. This way, the
  unit tests become much smaller and readable and it
  is possible to write tests that only cover one
  aspect as a time. Note that this testutils_ssh
  module seems like a lot of code, but it pays off
  soon.
- There are a few patches just removing superfluous
  things on the way.
- There are a few patches which make the two backend
  functions consider the offline status of nodes
  before contacting them.
- The last patch is a first introduction of retries
  to SSH update operations and unit tests for that.
  There will come more of these in the future.

Apart from that, this is the foundation for fixing
a lot of small SSH bugs that are currently assigned
to me.

Helga Velroyen (8):
  Introduce (testutils) SSH file manager
  Use SSH file manager in key adding unit tests
  Use SSH file manager for unittests removing keys
  Consider offline nodes in NodeSshKeyAdd
  Consider offline nodes when removing SSH keys
  Simplify testdata setup and teardown
  Remove obsolete constant SSHS_RENAME
  AddNodeSshKey: retry when target node not reachable

 Makefile.am                        |   1 +
 lib/backend.py                     |  36 +-
 src/Ganeti/Constants.hs            |   3 -
 test/py/ganeti.backend_unittest.py | 696 +++++++++++++++++++++++--------------
 test/py/testutils_ssh.py           | 546 +++++++++++++++++++++++++++++
 5 files changed, 1009 insertions(+), 273 deletions(-)
 create mode 100644 test/py/testutils_ssh.py

-- 
2.2.0.rc0.207.ga3a616c

Reply via email to