<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 05/06/2015 01:54 PM, Martin Babinsky
wrote:<br>
</div>
<blockquote cite="mid:554A00FB.60205@redhat.com" type="cite">The
attached patch tries to fix
<a class="moz-txt-link-freetext" href="https://fedorahosted.org/freeipa/ticket/4378">https://fedorahosted.org/freeipa/ticket/4378</a>
<br>
<br>
After discussion with Thierry we concluded that while this issue
is more complex than it seems, the transition from REPLACE to
DEL/ADD operations when updating nsDS5ReplicaId should suffice for
this ticket.
<br>
<br>
</blockquote>
<font face="Times New Roman, Times, serif">Hello Martin,<br>
<br>
Few comments, you are using MOD_DEL 'replicaID' with None value.
So this is going to delete all previous values and it should be
equivalent to a MOD_REPL.<br>
I was thinking you wanted to retrieve the id_value and call
MOD_DEL 'replicaID' <current_value>. So that if by the time
you fetched the replicaId, an other replica updated the replicaId,
the MOD_DEL/MOD_ADD would fail and you need a new iteration.<br>
<br>
If replicaId was multi-valued and you want to make it single
valued, you may want to do create a more complex MOD (e.g. </font><tt>(ldap.MOD_DELETE,
'nsDS5ReplicaId', str(value1), (ldap.MOD_DELETE, 'nsDS5ReplicaId',
str(value2)...)<br>
<br>
</tt><font face="Times New Roman, Times, serif">If it is updating
successfully do you want to return 'retval' or 'retval+1' ?<br>
<br>
If several replicas try to update the replicaId of the master and
the current replicaId is 1000. <br>
Replica1 successfully updates the replicaId and gets 1001 as the
new value.<br>
Replica2 successfully updates the replicaId and gets 1002. <br>
The final value on master will be 1002, but replica1 will assum it
is 1001. Is it a problem ?<br>
<br>
thanks<br>
thierry<br>
</font>
</body>
</html>