Hi,
On 03/12/2013 05:18 PM, Guido Trotter wrote:
Mirroring no disk is a no-op. As such we can treat them like mirrored
instances, since the data they need (none) will be present on all nodes.
This is definitely enough to failover or migrate instances with a manual
target node. Further work might be needed for support in hail.
We might want to add a target node to 'MigrateInstance' from
GanetiRapiClient then, as mentioned in a comment in
http://code.google.com/p/ganeti/issues/detail?id=237#c2
or as a patch:
diff --git a/lib/rapi/client.py b/lib/rapi/client.py
index 6f106af..4d17494 100644
--- a/lib/rapi/client.py
+++ b/lib/rapi/client.py
@@ -1193,7 +1193,7 @@ class GanetiRapiClient(object): # pylint:
disable=R0904
("/%s/instances/%s/export" %
(GANETI_RAPI_VERSION, instance)), None,
body)
- def MigrateInstance(self, instance, mode=None, cleanup=None):
+ def MigrateInstance(self, instance, mode=None, cleanup=None,
target_node=None):
"""Migrates an instance.
@type instance: string
@@ -1202,6 +1202,8 @@ class GanetiRapiClient(object): # pylint:
disable=R0904
@param mode: Migration mode
@type cleanup: bool
@param cleanup: Whether to clean up a previously failed migration
+ @type target_node: string
+ @param target_node: Target Node for migration
@rtype: string
@return: job id
@@ -1209,6 +1211,7 @@ class GanetiRapiClient(object): # pylint:
disable=R0904
body = {}
_SetItemIf(body, mode is not None, "mode", mode)
_SetItemIf(body, cleanup is not None, "cleanup", cleanup)
+ _SetItemIf(body, target_node is not None, "target_node", target_node)
return self._SendRequest(HTTP_PUT,
("/%s/instances/%s/migrate" %