[SSSD] [PATCH] Duplicate detection in fail over did not work.

Michal Zidek mzidek at redhat.com
Mon Aug 13 15:25:15 UTC 2012


On 08/13/2012 11:13 AM, Jakub Hrozek wrote:
> On Fri, Aug 10, 2012 at 07:12:38PM +0200, Jakub Hrozek wrote:
>> On Fri, Aug 10, 2012 at 07:09:13PM +0200, Jakub Hrozek wrote:
>>> On Fri, Aug 10, 2012 at 05:13:48PM +0200, Michal Zidek wrote:
>>>> This should fix the duplicate detection. Patch is attached. Please
>>>> review with caution, i was in hurry.
>>>>
>>>> https://fedorahosted.org/sssd/ticket/1472
>>>>
>>>> Thanks
>>>> Michal
>>> I think the general approach with compare function is good, but it
>>> should be a property of the fo_service. I don't think there is any
>>> scenario where we'd like to treat two servers with same user_data
>>> contents as the same.
>> ^^^ Sorry, this should have read "two servers from the same service".
> You also need to amend the testsuite as well when changing the fo_
> interface, otherwise the test suite doesn't work:
>
>    CC     src/resolv/fail_over_tests-async_resolv.o
> src/tests/fail_over-tests.c: In function ‘test_fo_resolve_service’:
> src/tests/fail_over-tests.c:233:5: warning: passing argument 5 of ‘fo_add_server’ makes pointer from integer without a cast [enabled by default]
> In file included from ./src/providers/dp_backend.h:26:0,
>                   from ./src/providers/ldap/sdap.h:25,
>                   from ./src/tests/common.h:31,
>                   from src/tests/fail_over-tests.c:35:
> ./src/providers/fail_over.h:120:5: note: expected ‘int (*)(void *, void *)’ but argument is of type ‘int’
> src/tests/fail_over-tests.c:233:5: error: too few arguments to function ‘fo_add_server’

Ok. I rewrote it, so the user_data_cmp is now part of fo_service.
If it is set to NULL, user_data is not used as part of duplicity detection.
Also testsuite is now updated.

New patch is attached.

Thanks
Michal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Duplicate-detection-in-fail-over-did-not-work.patch
Type: text/x-patch
Size: 8843 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120813/02b4afb4/attachment.bin>


More information about the sssd-devel mailing list