LGTM, thanks

On Fri, 5 Jun 2015 at 18:05 'Petr Pudlak' via ganeti-devel <
[email protected]> wrote:

> .. so it retries correctly when communicating on a non-master node.
>
> Signed-off-by: Petr Pudlak <[email protected]>
> ---
>  lib/metad.py | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/lib/metad.py b/lib/metad.py
> index deb4d66..34d8a56 100644
> --- a/lib/metad.py
> +++ b/lib/metad.py
> @@ -77,6 +77,15 @@ if constants.ENABLE_METAD:
>            logging.debug("Will retry")
>            time.sleep(try_no * 10 + 10 * random.random())
>
> +      def _InitTransport(self):
> +        """(Re)initialize the transport if needed.
> +
> +        """
> +        if self.transport is None:
> +          self.transport = self.transport_class(self._GetAddress(),
> +                                                timeouts=self.timeouts,
> +                                                allow_non_master=True)
> +
>  else:
>    class Client(object):
>      """An empty client representation that just throws an exception.
> --
> 2.2.0.rc0.207.ga3a616c
>
>

Reply via email to