On Mon, Apr 08, 2013 at 11:55:15AM +0200, Pavel Březina wrote: > On 04/05/2013 01:43 PM, Pavel Březina wrote: > >On 04/05/2013 12:41 PM, Pavel Březina wrote: > >>On 04/03/2013 11:48 AM, Pavel Březina wrote: > >>>On 04/02/2013 03:55 PM, Pavel Březina wrote: > >>>>On 03/27/2013 03:00 PM, Jakub Hrozek wrote: > >>>>>On Wed, Mar 27, 2013 at 11:22:49AM +0100, Pavel Březina wrote: > >>>>>>Later, we can place the plugin architecture inside a module that > >>>>>>knows about SSSD and is placed above resolver. You said you want to > >>>>>>decouple fail over to fail over -> cache -> resolver. This is nice > >>>>>>idea. > >>>>>> > >>>>>>The plugin architecture can be put inside the cache, because cache > >>>>>>is responsible for resolving expired uris and _srv_ and it does not > >>>>>>really say that is has to use resolver directly. > >>>>> > >>>>>OK, this would be the best approach. After more discussion on #sssd > >>>>>with Pavel and Simo we agreed that Pavel will carry on with this > >>>>>approach for the time being. > >>>>> > >>>>>The only two changes in these patches would be better namespacing of > >>>>>the functions used and unifying the resolver initialization with what > >>>>>I'm working on wrt dynamic DNS updates. > >>>>> > >>>>>In the next release, we will create the additional layer and move > >>>>>the plugins there. I moved https://fedorahosted.org/sssd/ticket/1083 > >>>>>which is tracking that effort to NEEDS_TRIAGE so we can put it into > >>>>>an appropriate milestone tomorrow. > >>>> > >>>>Hi, > >>>>I'm sending new patch set. > >>>> > >>>>I created async_resolv_utils.c and put there functions for domain > >>>>detection and for resolving SRV with fallback discovery domains. > >>>>This is > >>>>similar to resolve_srv_send and resolve_get_domain_send from the first > >>>>patchset. > >>>> > >>>>resolve_srv_send() was renamed to fo_discover_srv_send() and it wraps > >>>>resolv_discover_srv_send() so that it returns fo_server_info instead of > >>>>ares. > >>>> > >>>>The plugin was renamed to fo_resolve_srv_dns_send(). It is a little bit > >>>>more complicated since it performs domain detection (originally in > >>>>resolve_srv_send()) if the domain is not provided from fail over. > >>>> > >>>>Hostname is passed via plugin context. It is currently retrieved via > >>>>gethostname() so the current behaviour does not change. Later, when the > >>>>plugin initialization will be moved to provider code, the provider will > >>>>decide what hostname will be used (ipa_hostname for example). > >>> > >>>Rebased on top of latest be_res patches. > >> > >>When working on IPA plugin I've done some changes to this code. Since it > >>is still review pending, I have squashed the changes to this patch set. > >> > >>1. all SRV plugin related things are in a separate header file named > >>fail_over_srv.h. This way we don't have to #include the whole fail over > >>when developing new plugin. The only thing which remained in fail_over.h > >>is fo_set_srv_lookup_plugin(), because it should remain hidden for > >>providers, see #2 > >> > >>2. be_fo_set_srv_lookup_plugin() was added, to keep the fail over opaque > >>for providers. > >> > >>3. the original sixth patch (set plugin for all providers) was meant to > >>be reverted, once we agreed on further steps. Now it is completely > >>rewritten to final solution on which we agreed with Jakub. > >> > >>I have the IPA plugin already written (not tested yet), so I believe > >>this is the final version if there won't be any review comments. > >//lists.fedorahosted.org/mailman/listinfo/sssd-devel > > > >OK. One more time :-) > >I have slightly enhanced debug messages. > > I forgot to check if a server is already present in the list. The fifth > patch was split in two. > >
I will review the code but for starters the failover suite is failing: Program received signal SIGSEGV, Segmentation fault. 0x0000000000406879 in fo_add_server_to_list (to_list=0x632790, check_list=0x0, server=0x633000, service_name=0x632810 "ntp") at /home/remote/jhrozek/devel/sssd/src/providers/fail_over.c:682 682 const char *debug_name = server->common->name; Missing separate debuginfos, use: debuginfo-install libattr-2.4.46-7.fc18.x86_64 libbasicobjects-0.1.0-0.fc18.x86_64 libcollection-0.6.2-0.fc18.x86_64 libini_config-1.0.0.1-0.fc18.x86_64 libref_array-0.1.3-0.fc18.x86_64 (gdb) bt #0 0x0000000000406879 in fo_add_server_to_list (to_list=0x632790, check_list=0x0, server=0x633000, service_name=0x632810 "ntp") at /home/remote/jhrozek/devel/sssd/src/providers/fail_over.c:682 #1 0x0000000000406ee8 in fo_add_server (service=0x632760, name=0x0, port=123, user_data=0x0, primary= true) at /home/remote/jhrozek/devel/sssd/src/providers/fail_over.c:762 #2 0x0000000000403765 in test_fo_resolve_service (_i=0) at /home/remote/jhrozek/devel/sssd/src/tests/fail_over-tests.c:241 #3 0x00007ffff7bd7f82 in tcase_run_tfun_nofork (sr=sr@entry=0x61f220, tc=tc@entry=0x61f030, i=i@entry= 0, tfun=0x61f1f0, tfun=0x61f1f0) at check_run.c:332 #4 0x00007ffff7bd8396 in srunner_iterate_tcase_tfuns (tc=0x61f030, sr=0x61f220) at check_run.c:192 #5 srunner_run_tcase (tc=0x61f030, sr=0x61f220) at check_run.c:318 #6 srunner_iterate_suites (tcname=0x0, sname=0x0, sr=0x61f220, print_mode=<optimized out>) at check_run.c:161 #7 srunner_run (sr=0x61f220, sname=0x0, tcname=0x0, print_mode=<optimized out>) at check_run.c:596 #8 0x0000000000403b8f in main (argc=1, argv=0x7fffffffdd28) at /home/remote/jhrozek/devel/sssd/src/tests/fail_over-tests.c:321 _______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel