incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Marca <jma...@translab.its.uci.edu>
Subject Re: replicator database is missing design docs
Date Wed, 02 Nov 2011 19:25:12 GMT
On Wed, Nov 02, 2011 at 11:15:45AM +0000, Filipe David Manana wrote:
> Add a user_ctx top level property to the replication document:
> 
> "user_ctx": { "roles": [ "_admin" ] }

Thanks, that works.

I used to add "user_ctx": {"name":"james","roles":["_admin"]}, but at
some point I stopped because started getting errors along the lines of
assigning roles beginning with underscore in delegated user contexts
was not allowed (I can't remember the exact wording, and in fact I
can't get this to happen right now in 1.1.1 and 1.3.git...).  

> 
> You can read about it at https://gist.github.com/832610 (the couch wiki
> points to it somewhere).
> 

Yes that page is quite clear on this point.  But ... the couch wiki
also points to
http://docs.couchbase.org/couchdb-release-1.1/index.html#couchdb-release-1.1-replicatordb-delegations
which says:

  When there's no user_ctx property in a replication document, the
  default user context is used:

  {
       "name": null,
       "roles": ["_admin"]
  }

  By default only administrators can trigger delegated
  replications. This rule is enforced by the default document update
  validation function of the replicator database's design document. 

In fact, from the gist page, "if it's missing it defaults to a user
context with name null and an empty list of roles"

The couchbase version should be corrected.

Regards,

James



> On Wednesday, November 2, 2011, Benoit Chesneau <bchesneau@gmail.com> wrote:
> > On Wednesday, November 2, 2011, Dan Everton <dan@iocaine.org> wrote:
> >> On Wed, Nov 2, 2011 at 3:43 PM, James Marca <jmarca@translab.its.uci.edu>
> > wrote:
> >>> Hi All,
> >>>
> >>> I am using the new-ish CouchDB replicator database documented here
> >>> <http://wiki.apache.org/couchdb/Replication#Replicator_database>.
> >>>
> >>> Today I noticed that my design docs are not replicating with this
> >>> mechanism.  The data copies fine, but the design docs do not.
> >>
> >> Huh, I was just looking in to this exact problem today with a 1.1.1
> >> install as well. We have a master/slave setup with the slave pulling
> >> continuously from the master. The _design documents never seem to
> >> replicate to the slave and there's no errors in the logs. I've checked
> >> for conflicts and other things and also recreated the slave from
> >> scratch and still nothing.
> >>
> >> At least it seems like I'm not alone.
> >>
> >> Cheers,
> >> Dan
> >>
> >
> > did you try to replicate them with an admin user? If the problem persist
> > anyway, please open a ticket.
> >
> > benoƮt
> >
> > - from my mobile
> >
> 
> -- 
> Filipe David Manana,
> 
> "Reasonable men adapt themselves to the world.
>  Unreasonable men adapt the world to themselves.
>  That's why all progress depends on unreasonable men."


Mime
View raw message