Handle SSH key changes in upgrades and downgrades
authorHrvoje Ribicic <riba@google.com>
Thu, 5 Nov 2015 13:13:58 +0000 (14:13 +0100)
committerHrvoje Ribicic <riba@google.com>
Fri, 20 Nov 2015 10:14:17 +0000 (11:14 +0100)
commite3a489401eab9041788b231532a8c2c4971aa3cf
tree6bc6ee23e58e7f19f1d25f694025957a0664f393
parentc64af824018a505c59453d6a645f11f0b8fb8877
Handle SSH key changes in upgrades and downgrades

When performing an upgrade of an old cluster, it is necessary to set
the SSH key parameters to the exact same values earlier versions
implicitly used - DSA with 1024 bits.

In the other direction, we simply do not permit downgrades if keys
other than DSA are being used. Triggering a gnt-cluster renew-crypto
might be time-consuming and surprising for the user, so we are simply
throwing out an error message, explaining that the downgrade cannot be
performed in the current state of the cluster.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
lib/tools/cfgupgrade.py
test/py/cfgupgrade_unittest.py