From: Iustin Pop Date: Tue, 20 Nov 2012 16:44:26 +0000 (+0100) Subject: Fix tools/move-instance after networks addition X-Git-Tag: v2.7.0beta1~579 X-Git-Url: https://code.grnet.gr/git/ganeti-local/commitdiff_plain/f500d80b14d82dc20eaea21fd0b16d7b5e521d9d Fix tools/move-instance after networks addition Commits d4117a72 (“Modify LUInstanceCreate to support networks”) and 09a3d21f (“Pass detailed network info in hooks“) expanded the nic information as computed by _NICToTuple, which means that the format of the result value from LUInstanceQueryData has changed, and move-instance has not been changed to deal with this. A proper fix needs to support correctly importing from old clusters, right now this is a temporary fix to ensure QA still passes. Signed-off-by: Iustin Pop Reviewed-by: Helga Velroyen --- diff --git a/tools/move-instance b/tools/move-instance index 716b00c..8490ecf 100755 --- a/tools/move-instance +++ b/tools/move-instance @@ -496,7 +496,8 @@ class MoveDestExecutor(object): constants.INIC_MAC: mac, constants.INIC_MODE: mode, constants.INIC_LINK: link, - } for ip, mac, mode, link in instance["nics"]] + constants.INIC_NETWORK: network + } for ip, mac, mode, link, network, _ in instance["nics"]] if len(override_nics) > len(nics): raise Error("Can not create new NICs")