From f930531f306513a3d407efa6fc5000d2a433555c Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Mon, 26 May 2014 22:44:46 +0000 Subject: [PATCH] Reindex Gerrit after project move/rename * doc/source/gerrit.rst: When project names change, Gerrit's lucene indexes must be rebuilt while the service is still offline. If this is not done, searches on the new project names will not find existing changes and Zuul will ignore some events for them. Change-Id: I99cd657298e05f7c213cf770e92d06016043f547 --- doc/source/gerrit.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/source/gerrit.rst b/doc/source/gerrit.rst index 4adc6a2870..5e25e26a9b 100644 --- a/doc/source/gerrit.rst +++ b/doc/source/gerrit.rst @@ -425,6 +425,12 @@ To rename a project: sudo mv ~gerrit2/review_site/git/openstack/{OLD,NEW}.git sudo mv /var/lib/git/openstack/{OLD,NEW}.git +#. Reindex the lucene search index on review.openstack.org:: + + sudo su - gerrit2 + cp -ax review_site/index index.backup.`date +%s` + java -jar review_site/bin/gerrit.war reindex -d /home/gerrit2/review_site + #. Move the git repository on git{01-04}.openstack.org:: sudo mv /var/lib/git/openstack/{OLD,NEW}.git