Dzahn has submitted this change and it was merged.

Change subject: replicate Gerrit repos to Jenkins slave gallium
......................................................................


replicate Gerrit repos to Jenkins slave gallium

gallium already has replicated repository under /var/lib/git which is a
different device than /srv/ where the jobs are doing the clone
operation.

/var/lib/git is hardcoded in too many place to let us do a migration so
to play it safe I am requesting to have a second replication setup under
/srv/ssd/gerrit just like lanthanum.

Once all jobs and scripts have been updated to use /srv/ssd/gerrit
instead of /var/lib/git, the replication 'inside-wmf' can be deleted.

Change-Id: I7428331e06ebeb08bb8ac3188ec745fa265ddf99
---
M manifests/role/gerrit.pp
M templates/gerrit/replication.config.erb
2 files changed, 12 insertions(+), 2 deletions(-)

Approvals:
  jenkins-bot: Verified
  Dzahn: Looks good to me, approved



diff --git a/manifests/role/gerrit.pp b/manifests/role/gerrit.pp
index f639b73..5a9bb09 100644
--- a/manifests/role/gerrit.pp
+++ b/manifests/role/gerrit.pp
@@ -26,13 +26,21 @@
                        smtp_host    => 'smtp.pmtpa.wmnet',
                        replication  => {
                                # If adding a new entry, remember to add the 
fingerprint to gerrit2's known_hosts
+
+                               # FIXME remove it when all Jenkins jobs have 
been migrated to the new
+                               # directory /srv/ssd/gerrit defined in 
'jenkins-gallium'
                                'inside-wmf'              => {
                                        'url'                  => 
'[email protected]:/var/lib/git/${name}.git',
                                        'threads'              => '4',
                                        'mirror'               => 'true',
                                },
+                               # All entries should have the same target 
directory '/srv/ssd/gerrit'
+                               # since it is referenced in Jenkins jobs.
                                'jenkins-slaves' => {
-                                       'url'     => 
'[email protected]:/srv/ssd/gerrit/${name}.git',
+                                       'url'     => [
+                                               
'[email protected]:/srv/ssd/gerrit/${name}.git',
+                                               
'[email protected]:/srv/ssd/gerrit/${name}.git',
+                                       ],
                                        'threads' => '4',
                                        'mirror'  => 'true',
                                },
diff --git a/templates/gerrit/replication.config.erb 
b/templates/gerrit/replication.config.erb
index 8446e8f..d88e3a8 100644
--- a/templates/gerrit/replication.config.erb
+++ b/templates/gerrit/replication.config.erb
@@ -11,9 +11,11 @@
   replication.sort.each { |remote,settings|
     %>[remote "<%= remote %>"]
 <%
-    settings.sort.each { |option,value|
+    settings.sort.each { |option,params|
+        Array(params).sort.each { |value|
       %>  <%= option %> = <%= value %>
 <%
+        }
     }
   }
 end

-- 
To view, visit https://gerrit.wikimedia.org/r/75500
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7428331e06ebeb08bb8ac3188ec745fa265ddf99
Gerrit-PatchSet: 7
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Demon <[email protected]>
Gerrit-Reviewer: Dzahn <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to