[Ovirt-devel] [PATCH] Fix optimistic locking during vm migration

Michel Loiseleur mloiseleur at linagora.com
Wed Jun 9 11:37:27 UTC 2010


Le 09/06/2010 01:16, Ian Main a écrit :
> On Tue, 2010-06-08 at 11:31 +0200, Loiseleur Michel wrote:
>   
>> Signed-off-by: Loiseleur Michel <mloiseleur at linagora.com>
>> ---
>>  src/db-omatic/db_omatic.rb |    3 +++
>>  1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/src/db-omatic/db_omatic.rb b/src/db-omatic/db_omatic.rb
>> index da11bfa..79f29d2 100755
>> --- a/src/db-omatic/db_omatic.rb
>> +++ b/src/db-omatic/db_omatic.rb
>> @@ -195,6 +195,9 @@ class DbOmatic < Qmf::ConsoleHandler
>>          end
>>  
>>          @logger.info "Updating VM #{domain['name']} to state #{state}"
>> +        # Optimistic locking often fails for this operation
>> +        # See http://api.rubyonrails.org/classes/ActiveRecord/Locking/Pessimistic.html#M001320
>> +        vm.lock!
>>     
> I haven't looked at the code this is going into yet, but don't you need
> a way to retry on failure?  
>   
Db-o-matic is already re-trying to update status of a vm if it was not
done before. IMHO,  there's no need to re-implement it at this level.

Regards,

-- 
Loiseleur Michel
Directeur de l'OSSA
Linagora / 80, rue Roque de Fillol / 92800 PUTEAUX
Tel/Fax : +33 1 46 96 63 63 / +33 1 46 96 63 64
http://www.08000linux.com/ | http://www.tosca-project.net
"Ce n'est pas le logiciel qui est libre, c'est vous"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20100609/780068ee/attachment.sig>


More information about the ovirt-devel mailing list