[PATCH] samba-tool dbcheck: handle name conflict objects

Felix Botner botner at univention.de
Wed Mar 19 11:01:25 MDT 2014


Am Mittwoch, 5. März 2014, 10:16:37 schrieb Andrew Bartlett:
> What we need now is to improve the tool, because conflict resolution is
> a manual process, not one that we can do anything more than guide.
> 
> The tool should present both objects to the user, and ask them which one
> should survive.  You will have to find the other record by figuring out
> what the name would have been.   We can have --yes simply prune the
> conflict record (which will be the newer record), but the admin should
> be presented with the choice, and be able to keep the conflict record
> instead.

Yes, i see that, how should i ask the user

(a)

Found conflict object and corresponding non-conflict object!
Delete conflict object "conflict dn"? [Y,n] -> n
Delete the non-conflict object "non-conflict dn"? [Y,n] -> y
Rename the conflict object to "non-conflict dn"? [Y,n] -> y

if --fix is set, the default would be to delete all conflict objects

(b)

Found conflict object and corresponding non-conflict object! 
Which object should be deleted?
  [1] the conflict object (dn)
  [2] the non-conflict object (dn)
  [3] none
[1, 2, 3] -> 2
Should the conflict object be renamed to 'non-conflict dn'? [Y,n] -> y

(b) is maybe a bit more user friendly, because we present them all the options 
(delete conflict or delete non-conflict) in one step not just "delete 
conflict" as in (a)

> 
> It also shouldn't be presented as an ERROR - it isn't an error, but can
> be cleaned up.  Perhaps call it 'WARNING:' instead?

OK

> 
> Also, we shouldn't specify the DBCHECK control - the deletion needs to
> be a normal delete, and go though the normal processes.
>

Yes
 
> Finally, as I mentioned before we also should have a test for this,
> running on and fixing real conflicts generated by
> source4/torture/drs/python/replica_sync.py, and on a test database
> (perhaps the same one you plan to submit for the missing objectclass).

-- 

Felix Botner

Open Source Software Engineer

Univention GmbH
be open
Mary-Somerville-Str.1
28359 Bremen
Tel. : +49 421 22232-0
Fax : +49 421 22232-99

<botner at univention.de>
http://www.univention.de

Geschäftsführer: Peter H. Ganten
HRB 20755 Amtsgericht Bremen
Steuer-Nr.: 71-597-02876 


More information about the samba-technical mailing list