GCP Issue: Replication to Google Source Repositories started failing for All-Projects and All-Users

128 views
Skip to first unread message

David Howden

unread,
Feb 12, 2020, 2:45:30 PM2/12/20
to Repo and Gerrit Discussion
Posting here as Cloud Source Repo made an undocumented behaviour change that will break a standard Gerrit replication setup (we only received confirmation after several rounds with production support, not clear if/when it will make it to the docs):

We setup replication to Google Cloud Source Repos ~ June 2018 and it has been running fine until recently.  Was configured to replicate everything from repos in Gerrit, so:

url = https://source.developers.google.com/p/<gcpProject>/r/${name}

In the last few weeks our All-Projects and All-Users repos in Google Source Repos have dropped out of the UI, and their contents have been borked.  Turns out Google now doesn't allow you to create repos named "All-Projects" and "All-Users" (hosted gerrit service on the way???) BUT if you already had repos with those names they silently remove them from view and mess up their contents.

The solution seems to be to create new repos in Cloud Source repos that don't use the All-Projects and All-Users names, and replicate the Gerrit versions to those.  Unfortunately this means the replication config is a lot more complicated, will try to post our solution once it's been setup!





Xut

unread,
Sep 26, 2023, 11:44:38 PM9/26/23
to Repo and Gerrit Discussion
Hi,

Was someone able to bypass that restriction?

I tried creating projects in Cloud Source with a different name (gerrit-all-projects &  gerrit-all-users) and setup replication.config as below:

[remote "gerrit-projects"]
    projects = All-projects
    url = ssh://source.developers.google.com:2022/p/$CGP_PROJECT/r/gerrit-all-projects
    mirror = true
    rescheduleDelay = 15

[remote "gerrit-users"]
    projects = All-Users
    url = ssh://source.developers.google.com:2022/p/$CGP_PROJECT/r/gerrit-all-users
    mirror = true
    rescheduleDelay = 15

According to the logs everything went fine from Gerrit's POV but repositories in Cloud Source remains empty

Replication to ssh://source.developers.google.com:2022/p/XXXXX/r/gerrit-all-users started... [CONTEXT pushOneId="dfd33131" request="SSH" ]
Replication to ssh://source.developers.google.com:2022/p/XXXXX/r/gerrit-all-users completed in 1079ms, 15005ms delay, 0 retries [CONTEXT pushOneId="dfd33131" request="SSH" ]    

In $GERRIT_SITE/data/replication/ref-updates no entry remains within waiting/running/building

(Any other repository created in Gerrit works without problems)

Björn Pedersen

unread,
Sep 27, 2023, 3:06:12 AM9/27/23
to Repo and Gerrit Discussion
Xut schrieb am Mittwoch, 27. September 2023 um 05:44:38 UTC+2:
Hi,

Was someone able to bypass that restriction?

I tried creating projects in Cloud Source with a different name (gerrit-all-projects &  gerrit-all-users) and setup replication.config as below:

[remote "gerrit-projects"]
    projects = All-projects
    url = ssh://source.developers.google.com:2022/p/$CGP_PROJECT/r/gerrit-all-projects
    mirror = true
    rescheduleDelay = 15

[remote "gerrit-users"]
    projects = All-Users
    url = ssh://source.developers.google.com:2022/p/$CGP_PROJECT/r/gerrit-all-users
    mirror = true
    rescheduleDelay = 15

According to the logs everything went fine from Gerrit's POV but repositories in Cloud Source remains empty

Replication to ssh://source.developers.google.com:2022/p/XXXXX/r/gerrit-all-users started... [CONTEXT pushOneId="dfd33131" request="SSH" ]
Replication to ssh://source.developers.google.com:2022/p/XXXXX/r/gerrit-all-users completed in 1079ms, 15005ms delay, 0 retries [CONTEXT pushOneId="dfd33131" request="SSH" ]    

In $GERRIT_SITE/data/replication/ref-updates no entry remains within waiting/running/building

(Any other repository created in Gerrit works without problems)

Check [1] 
 -> these need to be configured explicitly (mirror may not be enough)
Also check acces rights ([2]):

By default, replicates without group control, i.e. replicates
everything to all remotes.

*NOTE:* If an authGroup is provided, and you want a complete
mirror (for backup reasons or to run a Gerrit replica), at
least one of the provided authGroups must have "Access Database"
capability. Otherwise [db](../../../Documentation/note-db.html)
refs will not be replicated.



Xut

unread,
Nov 8, 2023, 7:28:19 PM11/8/23
to Repo and Gerrit Discussion
Thank you Björn 

It might have been working before but I had misunderstand these projects (first time using Gerrit). They appeared empty in Cloud Source because they simply don't have any branch but just refs.
I ended setting up the replication plugin this way and confirm all refs are there.
[remote "all-projects-and-all-users"]
projects = ^(All-Projects|All-Users)
mirror = true
rescheduleDelay = 15
push = +refs/*:refs/*
Reply all
Reply to author
Forward
0 new messages