Questions about setting up master/slave server

190 views
Skip to first unread message

李大明

unread,
Jun 5, 2017, 8:05:48 AM6/5/17
to Repo and Gerrit Discussion
Hi, 

   I am trying to setup an master/slave gerrit server (2.9) in our team. After reading the document and doing so experiments, I have a few questions:

   1. The replication is done via host ssh or ssh of gerrit server?   

       Here is one of the config I have tested:

       [remote "backup-01"]

       mirror = true
       push = +refs/heads/*:refs/heads/*
       push = +refs/tags/*:refs/tags/*
       timeout = 30
       threads = 3
       authGroup = rd_group

      I got 

      ERROR com.googlesource.gerrit.plugins.replication.ReplicationQueue : Cannot replicate to ssh://172.22.55.204:20001/home/jenkins/gerrit/my_site/git/platform-external-wpa_supplicant.git
org.eclipse.jgit.errors.TransportException: ssh://172.22.55.204:20001/home/jenkins/gerrit/my_site/git/platform-external-wpa_supplicant.git: Auth fail

      But if I change the URL to  url = ssh://172.22.55.204:22/home/jenkins/gerrit/my_site/git/${name}.git, I got connection refused.

      So can how does the replication works? Server push the git directly via host ssh to the file system or Server push via Gerrit ssh daemon?

   2. It seems starting Gerrit in slave mode still need database access. Do we need to sync database between master and slave? (We use MySQL)
       And how do I make sure the proper access control applied?
       


      

Sven Selberg

unread,
Jun 15, 2017, 11:32:03 AM6/15/17
to Repo and Gerrit Discussion
1. Via host ssh. The url should contain a username if the user running gerrit is not the same user you ssh to on the remote mirror.

2. The mirror needs connection to the db. You can choose to replicate the db to the mirror server or connect to the same db as master.

p.s.
You should consider using later versions than 2.9, which is pretty old by now.
d.s.

BR
Sven
Reply all
Reply to author
Forward
0 new messages