From 1dff8e07f07ac14ee33d688ea5614904b23ecbb4 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Thu, 12 Feb 2009 07:34:21 +0000
Subject: [PATCH] Fix RPC result handling in _AssembleInstanceDisks
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

For (status, data)-style RPC calls, the result data is in the β€˜payload’
attribute. This was missed in the conversion patch, with the only side
effect that gnt-instance activate-disks didn't show a nice output
anymore.

Reviewed-by: ultrotter
---
 lib/cmdlib.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index a06decbc5..13480c6af 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -2526,7 +2526,8 @@ def _AssembleInstanceDisks(lu, instance, ignore_secondaries=False):
                            " (is_primary=True, pass=2): %s",
                            inst_disk.iv_name, node, msg)
         disks_ok = False
-    device_info.append((instance.primary_node, inst_disk.iv_name, result.data))
+    device_info.append((instance.primary_node, inst_disk.iv_name,
+                        result.payload))
 
   # leave the disks configured for the primary node
   # this is a workaround that would be fixed better by
-- 
GitLab