From: Apollon Oikonomopoulos Date: Tue, 18 Jan 2011 10:30:12 +0000 (+0200) Subject: Fix disk adoption breakage X-Git-Tag: v2.4.0rc1~55^2~2 X-Git-Url: https://code.grnet.gr/git/ganeti-local/commitdiff_plain/f7c94c17b1ea35b8552bafa9718108be08334426 Fix disk adoption breakage Disk adoption is currently broken by 84d7e26b, which added multiple LVM volume group support. This patch fixes the calls to rpc.call_vg_list, which are multi-node calls but were handled as single-node calls in 84d7e26b. Signed-off-by: Apollon Oikonomopoulos Signed-off-by: Iustin Pop Reviewed-by: Iustin Pop --- diff --git a/lib/cmdlib.py b/lib/cmdlib.py index f7bfc45..4895576 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -2425,7 +2425,8 @@ class LUClusterVerifyDisks(NoHooksLU): return result vg_names = self.rpc.call_vg_list(nodes) - vg_names.Raise("Cannot get list of VGs") + for node in nodes: + vg_names[node].Raise("Cannot get list of VGs") for node in nodes: # node_volume @@ -7444,12 +7445,11 @@ class LUInstanceCreate(LogicalUnit): raise errors.OpPrereqError("LV named %s used by another instance" % lv_name, errors.ECODE_NOTUNIQUE) - vg_names = self.rpc.call_vg_list([pnode.name]) + vg_names = self.rpc.call_vg_list([pnode.name])[pnode.name] vg_names.Raise("Cannot get VG information from node %s" % pnode.name) node_lvs = self.rpc.call_lv_list([pnode.name], - vg_names[pnode.name].payload.keys() - )[pnode.name] + vg_names.payload.keys())[pnode.name] node_lvs.Raise("Cannot get LV information from node %s" % pnode.name) node_lvs = node_lvs.payload