On Mon, Nov 24, 2014 at 10:25:46AM +0100, Sumit Bose wrote:
On Mon, Nov 24, 2014 at 10:20:18AM +0100, Sumit Bose wrote:
> On Sat, Nov 22, 2014 at 03:39:45PM +0100, Jakub Hrozek wrote:
> > On Wed, Nov 19, 2014 at 01:36:02PM +0100, Sumit Bose wrote:
> > > Hi,
> > >
> > > with this patch SSSD can switch to a new view at startup. There is a
> > > todo in the third patch. Currently the user and group entries are only
> > > invalidated so that the new view/override data is checked at the next
> > > request for the given object. Additionally we might want to start a
> > > background task with refreshes the existing entries in the cache
> > > unconditionally. But this might result in unwanted network peaks during
> > > startup. So I left the implementation for a later patch, if this is
> > > needed.
> > >
> > > bye,
> > > Sumit
> >
> > Do these patches depend on some other patchset? I'm getting:
> >
> > /home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_sysdb_views.c:237:59:
error: use of undeclared identifier 'TEST_VIEW_NAME'
> > ret = sysdb_update_view_name(test_ctx->domain->sysdb,
TEST_VIEW_NAME);
> > ^
> > /home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_sysdb_views.c:240:46:
error: use of undeclared identifier 'TEST_USER_NAME'
> > ret = sysdb_store_user(test_ctx->domain, TEST_USER_NAME, NULL,
> > ^
> > /home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_sysdb_views.c:246:65:
error: use of undeclared identifier 'TEST_USER_NAME'
> > ret = sysdb_search_user_by_name(test_ctx, test_ctx->domain,
TEST_USER_NAME,
> > ^
> > /home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_sysdb_views.c:255:34:
error: use of undeclared identifier 'TEST_ANCHOR_PREFIX'
> > TEST_ANCHOR_PREFIX TEST_USER_SID);
> > ^
> > /home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_sysdb_views.c:258:50:
error: use of undeclared identifier 'TEST_VIEW_NAME'
> > ret = sysdb_store_override(test_ctx->domain, TEST_VIEW_NAME,
> > ^
> > /home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_sysdb_views.c:272:59:
error: use of undeclared identifier 'TEST_VIEW_NAME'
> > ret = sysdb_delete_view_tree(test_ctx->domain->sysdb,
TEST_VIEW_NAME);
> > ^
> > CC src/responder/ifp/ifp_tests-ifpsrv_util.o
> > /home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_sysdb_views.c:299:59:
error: use of undeclared identifier 'TEST_VIEW_NAME'
> > ret = sysdb_update_view_name(test_ctx->domain->sysdb,
TEST_VIEW_NAME);
> > ^
> > /home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_sysdb_views.c:302:46:
error: use of undeclared identifier 'TEST_USER_NAME'
> > ret = sysdb_store_user(test_ctx->domain, TEST_USER_NAME, NULL,
> > ^
> > /home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_sysdb_views.c:308:65:
error: use of undeclared identifier 'TEST_USER_NAME'
> > ret = sysdb_search_user_by_name(test_ctx, test_ctx->domain,
TEST_USER_NAME,
> > ^
> > /home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_sysdb_views.c:317:34:
error: use of undeclared identifier 'TEST_ANCHOR_PREFIX'
> > TEST_ANCHOR_PREFIX TEST_USER_SID);
> > ^
> > CC src/responder/common/ifp_tests-responder_utils.o
> > /home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_sysdb_views.c:320:50:
error: use of undeclared identifier 'TEST_VIEW_NAME'
> > ret = sysdb_store_override(test_ctx->domain, TEST_VIEW_NAME,
> > ^
> > /home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_sysdb_views.c:328:59:
error: use of undeclared identifier 'TEST_VIEW_NAME'
> > ret = sysdb_delete_view_tree(test_ctx->domain->sysdb,
TEST_VIEW_NAME);
> > ^
> > /home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_sysdb_views.c:331:65:
error: use of undeclared identifier 'TEST_USER_NAME'
> > ret = sysdb_search_user_by_name(test_ctx, test_ctx->domain,
TEST_USER_NAME,
> > ^
> > /home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_sysdb_views.c:341:65:
error: use of undeclared identifier 'TEST_USER_NAME'
> > ret = sysdb_search_user_by_name(test_ctx, test_ctx->domain,
TEST_USER_NAME,
> > ^
> > 14 errors generated.
> >
>
> ah, sorry, I attached a new version with the missing defines.
and now with the patches ...
> > The code looks good, but I always get:
> > (Sat Nov 22 15:37:28 2014) [sssd[be[ipa.example.com]]]
> > [ipa_get_view_name_done] (0x0020): View name changed, this is currently
> > not supported!
> >
> > When switching from one view to another...I tested using idview-unapply
> > and then idview-apply to another view, is there some other way?
I retested with the same steps and it worked for me. I changed the log
message to "View name changed, this is not supported at runtime. Please
restart SSSD to get the new view applied." to hopefully make more clear
what is happening.
New version attached.
bye,
Sumit