Adding interdiff to fix the test failures present at this patch time:

diff --git a/test/py/ganeti.client.gnt_cluster_unittest.py b/test/py/
ganeti.client.gnt_cluster_unittest.py
index be28eb2..595864a 100755
--- a/test/py/ganeti.client.gnt_cluster_unittest.py
+++ b/test/py/ganeti.client.gnt_cluster_unittest.py
@@ -380,6 +380,7 @@ class TestBuildGanetiPubKeys(testutils.GanetiTestCase):
   _CLUSTER_NAME = "cluster_name"
   _PRIV_KEY = "master_private_key"
   _PUB_KEY = "master_public_key"
+  _MODIFY_SSH_SETUP = True
   _AUTH_KEYS = "a\nb\nc"

   def _setUpFakeKeys(self):
@@ -411,7 +412,7 @@ class TestBuildGanetiPubKeys(testutils.GanetiTestCase):
     self.mock_cl = mock.Mock()
     self.mock_cl.QueryConfigValues = mock.Mock()
     self.mock_cl.QueryConfigValues.return_value = \
-      (self._CLUSTER_NAME, self._MASTER_NODE_NAME)
+      (self._CLUSTER_NAME, self._MASTER_NODE_NAME, self._MODIFY_SSH_SETUP)

     self._get_online_nodes_mock = mock.Mock()
     self._get_online_nodes_mock.return_value = \

On Thu, Nov 19, 2015 at 2:47 PM, Helga Velroyen <[email protected]> wrote:

> LGTM, thanks
>
> On Thu, 19 Nov 2015 at 14:06 'Hrvoje Ribicic' via ganeti-devel <
> [email protected]> wrote:
>
>> Prior to this patch, gnt-cluster renew-crypto still created the
>> ganeti_pub_keys file regardless of whether the cluster was initiated
>> with --no-ssh-init or not. Instead, query the matching config parameter
>> and build the file only if Ganeti manages SSH keys.
>>
>> Signed-off-by: Hrvoje Ribicic <[email protected]>
>> ---
>>  lib/client/gnt_cluster.py | 18 ++++++++++++------
>>  1 file changed, 12 insertions(+), 6 deletions(-)
>>
>> diff --git a/lib/client/gnt_cluster.py b/lib/client/gnt_cluster.py
>> index 0aa1bb4..2da9832 100644
>> --- a/lib/client/gnt_cluster.py
>> +++ b/lib/client/gnt_cluster.py
>> @@ -1211,18 +1211,24 @@ def _BuildGanetiPubKeys(options,
>> pub_key_file=pathutils.SSH_PUB_KEYS, cl=None,
>>    """Recreates the 'ganeti_pub_key' file by polling all nodes.
>>
>>    """
>> +
>> +  if not cl:
>> +    cl = GetClient()
>> +
>> +  (cluster_name, master_node, modify_ssh_setup) = \
>> +    cl.QueryConfigValues(["cluster_name", "master_node",
>> "modify_ssh_setup"])
>> +
>> +  # In case Ganeti is not supposed to modify the SSH setup, simply exit
>> and do
>> +  # not update this file.
>> +  if not modify_ssh_setup:
>> +    return
>> +
>>    if os.path.exists(pub_key_file):
>>      utils.CreateBackup(pub_key_file)
>>      utils.RemoveFile(pub_key_file)
>>
>>    ssh.ClearPubKeyFile(pub_key_file)
>>
>> -  if not cl:
>> -    cl = GetClient()
>> -
>> -  (cluster_name, master_node) = \
>> -    cl.QueryConfigValues(["cluster_name", "master_node"])
>> -
>>    online_nodes = get_online_nodes_fn([], cl=cl)
>>    ssh_ports = get_nodes_ssh_ports_fn(online_nodes + [master_node], cl)
>>    ssh_port_map = dict(zip(online_nodes + [master_node], ssh_ports))
>> --
>> 2.1.4
>>
>> --
>
> Helga Velroyen
> Software Engineer
> [email protected]
>
> Google Germany GmbH
> Dienerstraße 12
> 80331 München
>
> Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
> Registergericht und -nummer: Hamburg, HRB 86891
> Sitz der Gesellschaft: Hamburg
>
> Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind,
> leiten Sie diese bitte nicht weiter, informieren Sie den Absender und
> löschen Sie die E-Mail und alle Anhänge. Vielen Dank.
>
> This e-mail is confidential. If you are not the right addressee please do
> not forward it, please inform the sender, and please erase this e-mail
> including any attachments. Thanks.
>
>
Hrvoje Ribicic
Ganeti Engineering
Google Germany GmbH
Dienerstr. 12, 80331, München

Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind,
leiten Sie diese bitte nicht weiter, informieren Sie den Absender und
löschen Sie die E-Mail und alle Anhänge. Vielen Dank.

This e-mail is confidential. If you are not the right addressee please do
not forward it, please inform the sender, and please erase this e-mail
including any attachments. Thanks.

Reply via email to