[Kimchi-devel] [v2 1/1] Virtual machine migration

Crístian Viana vianac at linux.vnet.ibm.com
Thu Nov 13 12:45:53 UTC 2014


On 13-11-2014 04:46, simonjin wrote:
>>> +        if self.conn.get().getInfo()[0] != _destConn.getInfo()[0]:
>>> +            kimchi_log.debug('vm %s can not migrate to different 
>>> arch server.' % (name, _destConn.getInfo()[0]))
>>> +            raise OperationFailed("KCHVM00034E", {'name': name,
>>> +                                          'srcarch': 
>>> self.conn.get().getType(),
>>> +                                          'destarch': 
>>> _destConn.getType()})
>>
>> 'srcarch' and 'destarch' don't seem to contain the servers' 
>> architectures, but their hypervisor type.
>>
> _destConn.getInfo()[0] contains the servers' architectures like x86_64 
> or ppc.
>

Exactly, but that's not what the exception parameters 'srcarch' and 
'destarch' have. They contain the return of "getType".
>>> +        # Record vm migrate task for future querying
>>> +        try:
>>> +            with self.objstore as session:
>>> +                session.store('migrate', name, task_id)
>>> +            return task_id
>>
>> If I'm not mistaken, the AsyncTask constructor (which is called 
>> inside the function "add_task" above) already registers the task in 
>> the local object store.
> No, it doesn't .

Please, take a look at the function "_save_helper" in 
src/kimchi/asynctask.py. It is called from the AsyncTask constructor and 
it registers the current task in the object store.
>
> -Simon




More information about the Kimchi-devel mailing list