Set up the Metad client with allow_non_master
authorPetr Pudlak <pudlak@google.com>
Thu, 2 Jul 2015 13:11:00 +0000 (15:11 +0200)
committerPetr Pudlak <pudlak@google.com>
Fri, 3 Jul 2015 07:56:09 +0000 (09:56 +0200)
.. since the communication takes place on non-master nodes.

This ensures the client properly retries if there is a communication
failure.

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

lib/backend.py

index 402aae1..3564b8f 100644 (file)
@@ -2237,7 +2237,8 @@ def ModifyInstanceMetadata(metadata):
       raise errors.HypervisorError("Failed to start metadata daemon")
 
   def _Connect():
-    return transport.Transport(pathutils.SOCKET_DIR + "/ganeti-metad")
+    return transport.Transport(pathutils.SOCKET_DIR + "/ganeti-metad",
+                               allow_non_master=True)
 
   retries = 5