[Cubicweb] force LDAP source synchronization at startup

Christophe de Vienne christophe at unlish.com
Thu Oct 23 14:07:41 CEST 2014


I would not do it in postcreate because I would not feel comfortable 
syncing the source in the same process as the database creation.

Moreover you may need to create the database without syncing (for 
debugging purpose), which would be painful if done in postcreate.

Another reason is that postcreate is not used when restoring a database.

You should use a separate command line.

Cheers

Christophe

PS: I am resending this message for it was sent as a private message in 
the first place.

Le 18 octobre 2014 11:04:11 CEST, Dimitri Papadopoulos Orfanos 
<dimitri.papadopoulos at cea.fr> a écrit :

    Hi Christophe,

    Thank you, that's exactly what I was after.

    There is even a SynchronizeSourceCommand class in server/serverctl.py  <http://serverctl.py>
    (actually there is such a class for each cubicweb-ctl command). I guess
    SynchronizeSourceCommand.run() can be be called frompostcreate.py  <http://postcreate.py>,
    can't it?

    Best,
    Dimitri

    Le 17/10/2014 21:07, Christophe de Vienne a écrit :

        Hi Dimitri, I think you are looking for "cubicweb-ctl
        source-sync" Christophe Le 17/10/2014 18:45, Dimitri
        Papadopoulos Orfanos a écrit :

            Dear list, We run CubicWeb servers with accounts and groups
            defined in an LDAP server. For a specific CubicWeb instance,
            we plan on restoring the database to a previous state quite
            often. Thus we need to be able to create an instance and
            reload the database dump rapidly. The script that reloads
            the database requires some groups to exist. The problem is
            that account/group sync'ing from LDAP is started long after
            instantiating and starting an instance. Is there a way of
            forcing LDAP sync'ing as soon as possible, for example at
            post-install? Best, 

        ------------------------------------------------------------------------
        Cubicweb mailing list Cubicweb at lists.cubicweb.org
        http://lists.cubicweb.org/mailman/listinfo/cubicweb 


    ------------------------------------------------------------------------

    Cubicweb mailing list
    Cubicweb at lists.cubicweb.org
    http://lists.cubicweb.org/mailman/listinfo/cubicweb


Christophe de Vienne

-- 
Envoyé en itinerance. Excusez la brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20141023/fa7009c9/attachment-0186.html>


More information about the Cubicweb mailing list