CandyShop / gerrit

Automatically exported from code.google.com/p/gerrit
Apache License 2.0
1 stars 0 forks source link

Replication script could not create target repository on mirror controlled by gitosis #2722

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
************************************************************
***** NOTE: THIS BUG TRACKER IS FOR GERRIT CODE REVIEW *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, INTERNAL *****
***** ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.    *****
***** THOSE ISSUE BELONG IN DIFFERENT ISSUE TRACKERS!  *****
************************************************************

Affected Version: 2.8.5

What steps will reproduce the problem?
1. Set up replication to push change to mirror
[remote "test-mirror"]
  url = git@xxx.com:cust/${name}.git
  push = +refs/heads/*:refs/heads/*
  push = +refs/tags/*:refs/tags/*
  authGroup = Replication
  replicatePermissions = false
  mirror = true

2. Create new repo in gerrit
3. Gerrit keep trying to push repo forever without complete

What is the expected output? What do you see instead?
It should create repository on mirror successfully but log show it keep trying 
to create the repo

[2014-06-19 16:25:40,102] INFO  
com.googlesource.gerrit.plugins.replication.ReplicationQueue : Created remote 
repository: git@xxx.com:cust/test.git
[2014-06-19 16:25:40,103] WARN  
com.googlesource.gerrit.plugins.replication.ReplicationQueue : Missing 
repository created; retry replication to git@xxx.com:cust/test.git
[2014-06-19 16:26:46,820] INFO  
com.googlesource.gerrit.plugins.replication.ReplicationQueue : Created remote 
repository: git@xxx.com:cust/test.git
[2014-06-19 16:26:46,820] WARN  
com.googlesource.gerrit.plugins.replication.ReplicationQueue : Missing 
repository created; retry replication to git@xxx.com:cust/test.git

Please provide any additional information below.
I have set up gitosis and I can try manual push it to gitosis successfully 
using git command

$ git remote add origin git@xxx.com:cust/test.git
$ git push origin master

After repository created, gerrit replication script working correctly by mirror 
change from gerrit to my mirror controlled by gitosis so the problem is only 
when it try to create the new repository on target mirror.

Original issue reported on code.google.com by kungcst...@gmail.com on 19 Jun 2014 at 10:45

GoogleCodeExporter commented 9 years ago
Possibly a duplicate of issue 2421.

Original comment by david.pu...@sonymobile.com on 15 Jul 2014 at 1:55

GoogleCodeExporter commented 9 years ago
I am having the same issue, did you find any help?

Original comment by joy.hunk...@gmail.com on 21 Jul 2014 at 2:41

GoogleCodeExporter commented 9 years ago
I'm afraid not!

How could you work around this issue? 
Do you manual push new project in gerrit to gitosis every time you create new 
one?

Original comment by kungcst...@gmail.com on 29 Aug 2014 at 4:39

GoogleCodeExporter commented 9 years ago
Replication plugin will only create missing repositories when using the shh 
protocol or when the url is a local folder.

If you want to replicate using the git protocol, you need to configure the 
adminUrl in the remote section and it will be used to create the repository and 
the other url (the one using git protocol) will be used to replicate. The 
adminUrl only must be using the ssh protocol.

There is also a parameter that enable creating missing repositories if there is 
a replication error because the remote repo does not exist. This is to cover 
the case when the remote was not available when the repo was created. To enable 
that, you must add this your remote section:
createMissingRepositories = true

Original comment by huga...@gmail.com on 30 Jan 2015 at 3:23