This patch series introduces a backend function for
bulk-adding SSH keys to the cluster. This is useful
to reduce the run-time complexity of renew-crypto
from quadratic to linear as no longer each keys
is added individually.

To make reviewing of this patch series easier, this
works like that:
- Patch 1: add the bulk-adding backend function. This
  is easiest to review by checking the original key-
  adding function. The bulk-version is essentially
  a copy of it which is modified at the places where
  it was relevant for adding a list of keys instead
  of only one. Note that at this point, the bulk-
  and the original version are in the code base. In
  a later patch the original one is replaced by a
  call to the bulk version.
- Patch 2-3: These add more unit tests for the bulk
  version.
- Patch 4: This makes the original key-adding function
  use the bulk version.
- Patch 5: Finally, let renew-crypto use the bulk
  function.

Note that this does not yet fully reduce renew-crypto's
runtime to linear time. For this a similar patch series
like this one will come but for removing keys.

Helga Velroyen (5):
  Introduce bulk-adding of SSH keys
  Unit test for bulk-adding pot. master candidates
  Unit test bulk-adding normal nodes
  Make NodeSshKeyAdd use its *Bulk companion
  Use bulk-adding of keys in renew-crypto

 lib/backend.py                     | 194 ++++++++++++++++++++++++++-----------
 test/py/ganeti.backend_unittest.py | 175 ++++++++++++++++++++++++++++++++-
 2 files changed, 307 insertions(+), 62 deletions(-)

-- 
2.6.0.rc2.230.g3dd15c0

Reply via email to