LGTM with interdiffs

On Wed, Nov 25, 2015 at 11:24 AM, Oleg Ponomarev <[email protected]>
wrote:

> And one more interdiff:
>
> --- a/lib/hooksmaster.py
> +++ b/lib/hooksmaster.py
> @@ -163,7 +163,7 @@ class HooksMaster(object):
>
>      """
>      if node_list is None or not node_list:
> -      return
> +      return {}
>
>      # Convert everything to strings
>      env = dict([(str(key), str(val)) for key, val in env.iteritems()])
>
>
> On 11/25/2015 02:23 PM, Oleg Ponomarev wrote:
>
>> Fixed with the following interdiff:
>>
>> diff --git a/lib/hooksmaster.py b/lib/hooksmaster.py
>> index 3769d45..4699335 100644
>> --- a/lib/hooksmaster.py
>> +++ b/lib/hooksmaster.py
>> @@ -159,6 +159,9 @@ class HooksMaster(object):
>>      return env
>>
>>    def _CheckParamsAndExecHooks(self, node_list, hpath, phase, env):
>> +    """Check rpc parameters and call hooks_execution_fn (rpc).
>> +
>> +    """
>>      if node_list is None or not node_list:
>>        return
>>
>> @@ -208,6 +211,8 @@ class HooksMaster(object):
>>      if not is_global:
>>        return self._CheckParamsAndExecHooks(node_list, hpath, phase, env)
>>
>> +    # For global hooks, we need to send different env values to master
>> and
>> +    # to the others
>>      ret = dict()
>>      env["GANETI_IS_MASTER"] = constants.GLOBAL_HOOKS_MASTER
>>      master_set = frozenset([self.master_uuid])
>> @@ -217,6 +222,7 @@ class HooksMaster(object):
>>        node_list = frozenset(set(node_list) - master_set)
>>      env["GANETI_IS_MASTER"] = constants.GLOBAL_HOOKS_NOT_MASTER
>>      ret.update(self._CheckParamsAndExecHooks(node_list, hpath, phase,
>> env))
>> +
>>      return ret
>>
>>    def RunPhase(self, phase, node_uuids=None, is_global=False,
>>
>>
>> Sincerely, Oleg Ponomarev
>>
>
>
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