You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by James Marca <jm...@translab.its.uci.edu> on 2011/11/02 06:43:39 UTC

replicator database is missing design docs

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.

I flailed about with a number of options (sticking passwords and
usernames in the source URL, trying out the user contexts that are
poorly documented, and so on), but nothing worked.  I had to revert to
the manual replication tool in Futon.

Is this a bug, a feature, or am I doing something wrong?  (Probably the latter.)


I am running Couch 1.1.1 on the source database, and am testing out
1.2 on the target end ("version":"1.2.0a-b0baa80-git").




Re: replicator database is missing design docs

Posted by James Marca <jm...@translab.its.uci.edu>.
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 <bc...@gmail.com> wrote:
> > On Wednesday, November 2, 2011, Dan Everton <da...@iocaine.org> wrote:
> >> On Wed, Nov 2, 2011 at 3:43 PM, James Marca <jm...@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."


Re: replicator database is missing design docs

Posted by Filipe David Manana <fd...@apache.org>.
Add a user_ctx top level property to the replication document:

"user_ctx": { "roles": [ "_admin" ] }

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

On Wednesday, November 2, 2011, Benoit Chesneau <bc...@gmail.com> wrote:
> On Wednesday, November 2, 2011, Dan Everton <da...@iocaine.org> wrote:
>> On Wed, Nov 2, 2011 at 3:43 PM, James Marca <jm...@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."

Re: replicator database is missing design docs

Posted by Benoit Chesneau <bc...@gmail.com>.
On Wednesday, November 2, 2011, Dan Everton <da...@iocaine.org> wrote:
> On Wed, Nov 2, 2011 at 3:43 PM, James Marca <jm...@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

Re: replicator database is missing design docs

Posted by Dan Everton <da...@iocaine.org>.
On Wed, Nov 2, 2011 at 3:43 PM, James Marca <jm...@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