Gerrit upgrade from 2.11.7 to 2.14.2 directly

1,220 views
Skip to first unread message

Sakshi Sood

unread,
Aug 1, 2017, 4:59:58 AM8/1/17
to Repo and Gerrit Discussion
I am planning to upgrade gerrit from version 2.11.7 to 2.14.2 , it is possible to upgrade directly ? I want to use online reindexing too . It looks like i have to first upgrade to 2.12.X version then 2.13.x version and finally 2.14.2 inorder to user online reindexing?

Matthew Webber

unread,
Aug 1, 2017, 5:14:20 AM8/1/17
to Repo and Gerrit Discussion
I am planning to upgrade gerrit from version 2.11.7 to 2.14.2 , it is possible to upgrade directly ? I want to use online reindexing too . It looks like i have to first upgrade to 2.12.X version then 2.13.x version and finally 2.14.2 inorder to user online reindexing?

As I think you already noticed, the 2.13 Release Notes say
To use online reindexing for the changes secondary index when upgrading to 2.13.x, the server must first be upgraded to 2.8 (or 2.9) and then through 2.10, 2.11 and 2.12. Skipping a version will prevent the online reindexer from working.

So, it looks like you can't upgrade directly from 2.11.7 to 2.14.2 - not if you want online reindexing. I suggest you upgrade in steps unless someone who has deep knowledge in this area says that you don't need to.

Matthew

Tien-Chi Lee

unread,
Aug 13, 2017, 10:16:41 PM8/13/17
to Repo and Gerrit Discussion
I suggest you upgrade  2.11.7-> 2.12 ->  2.13 -> 2.13.7  and stop at 2.13

2.11.7 -> 2.12 , only to do reindex offline and start gerri
2.12 -> 2.13.7 , If you have the slave server , please remember to copy All-Users from master to slave . 
                         because 2.13 change the place to store ssh-key from DB to Al-Users git
                         I suggest you running reindex offline, and before you start gerrit , set index.threads = 2


devops於 2017年8月1日星期二 UTC+8下午4時59分58秒寫道:

Narendra Choudhary

unread,
Nov 21, 2017, 4:15:23 PM11/21/17
to Repo and Gerrit Discussion
Can you please provide the steps to upgrade the gerrit from one version to another version.

Matthias Sohn

unread,
Nov 22, 2017, 3:40:56 AM11/22/17
to Narendra Choudhary, Repo and Gerrit Discussion
On Tue, Nov 21, 2017 at 10:15 PM, Narendra Choudhary <choudhar...@gmail.com> wrote:
Can you please provide the steps to upgrade the gerrit from one version to another version.

read the release notes of each of the releases you are upgrading to,

abhishek das

unread,
Jan 23, 2020, 12:45:28 PM1/23/20
to Repo and Gerrit Discussion


On Tuesday, August 1, 2017 at 9:59:58 AM UTC+1, devops wrote:
I am planning to upgrade gerrit from version 2.11.7 to 2.14.2 , it is possible to upgrade directly ? I want to use online reindexing too . It looks like i have to first upgrade to 2.12.X version then 2.13.x version and finally 2.14.2 inorder to user online reindexing?


I am getting error while upgrading from 2.12.9 -> 2.13 or 2.12.9 -> 2.13.14

Error details below. Any help or suggestion, please appreciated: 

# java -jar gerrit-war-2.13.war init --batch -d /site/gerrit
# java -jar gerrit-war-2.13.war init --batch -d /site/gerrit
Upgrading schema to 119 ...
Upgrading schema to 120 ...
Upgrading schema to 121 ...
Upgrading schema to 122 ...
Upgrading schema to 123 ...
Upgrading schema to 124 ...
Upgrading schema to 125 ...
Upgrading schema to 126 ...
Upgrading schema to 128 ...
Upgrading schema to 129 ...
Migrating data to schema 119 ...
Exception in thread "main" java.lang.IllegalArgumentException: No enum constant com.google.gerrit.extensions.client.GeneralPreferencesInfo.DownloadCommand.
        at java.lang.Enum.valueOf(Enum.java:238)
        at com.google.gerrit.extensions.client.GeneralPreferencesInfo$DownloadCommand.valueOf(GeneralPreferencesInfo.java:30)
        at com.google.gerrit.server.schema.Schema_119.toDownloadCommand(Schema_119.java:181)
        at com.google.gerrit.server.schema.Schema_119.migrateData(Schema_119.java:127)
        at com.google.gerrit.server.schema.SchemaVersion.migrateData(SchemaVersion.java:142)
        at com.google.gerrit.server.schema.SchemaVersion.upgradeFrom(SchemaVersion.java:81)
        at com.google.gerrit.server.schema.SchemaVersion.check(SchemaVersion.java:72)
        at com.google.gerrit.server.schema.SchemaUpdater.update(SchemaUpdater.java:109)
        at com.google.gerrit.pgm.init.BaseInit$SiteRun.upgradeSchema(BaseInit.java:361)
        at com.google.gerrit.pgm.init.BaseInit.run(BaseInit.java:129)
        at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:64)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:161)
        at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:102)
        at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:59)
        at Main.main(Main.java:25)

Luca Milanesio

unread,
Jan 23, 2020, 12:55:48 PM1/23/20
to abhishek das, Luca Milanesio, Repo and Gerrit Discussion

On 23 Jan 2020, at 08:20, abhishek das <abhi.da...@gmail.com> wrote:



On Tuesday, August 1, 2017 at 9:59:58 AM UTC+1, devops wrote:
I am planning to upgrade gerrit from version 2.11.7 to 2.14.2 , it is possible to upgrade directly ? I want to use online reindexing too . It looks like i have to first upgrade to 2.12.X version then 2.13.x version and finally 2.14.2 inorder to user online reindexing?


I am getting error while upgrading from 2.12.9 -> 2.13 or 2.12.9 -> 2.13.14

Error details below. Any help or suggestion, please appreciated: 

# java -jar gerrit-war-2.13.war init --batch -d /site/gerrit
# java -jar gerrit-war-2.13.war init --batch -d /site/gerrit
Upgrading schema to 119 ...
Upgrading schema to 120 ...
Upgrading schema to 121 ...
Upgrading schema to 122 ...
Upgrading schema to 123 ...
Upgrading schema to 124 ...
Upgrading schema to 125 ...
Upgrading schema to 126 ...
Upgrading schema to 128 ...
Upgrading schema to 129 ...
Migrating data to schema 119 ...
Exception in thread "main" java.lang.IllegalArgumentException: No enum constant com.google.gerrit.extensions.client.GeneralPreferencesInfo.DownloadCommand.

What’s your gerrit.config look like?
It seems that one of the enum values of the download command isn’t supported.

Luca.

        at java.lang.Enum.valueOf(Enum.java:238)
        at com.google.gerrit.extensions.client.GeneralPreferencesInfo$DownloadCommand.valueOf(GeneralPreferencesInfo.java:30)
        at com.google.gerrit.server.schema.Schema_119.toDownloadCommand(Schema_119.java:181)
        at com.google.gerrit.server.schema.Schema_119.migrateData(Schema_119.java:127)
        at com.google.gerrit.server.schema.SchemaVersion.migrateData(SchemaVersion.java:142)
        at com.google.gerrit.server.schema.SchemaVersion.upgradeFrom(SchemaVersion.java:81)
        at com.google.gerrit.server.schema.SchemaVersion.check(SchemaVersion.java:72)
        at com.google.gerrit.server.schema.SchemaUpdater.update(SchemaUpdater.java:109)
        at com.google.gerrit.pgm.init.BaseInit$SiteRun.upgradeSchema(BaseInit.java:361)
        at com.google.gerrit.pgm.init.BaseInit.run(BaseInit.java:129)
        at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:64)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:161)
        at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:102)
        at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:59)
        at Main.main(Main.java:25)

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/794c3d26-8909-4f34-b111-6585216df0d3%40googlegroups.com.

Matthias Sohn

unread,
Jan 23, 2020, 4:56:40 PM1/23/20
to Luca Milanesio, abhishek das, Repo and Gerrit Discussion
On Thu, Jan 23, 2020 at 6:55 PM Luca Milanesio <luca.mi...@gmail.com> wrote:


On 23 Jan 2020, at 08:20, abhishek das <abhi.da...@gmail.com> wrote:



On Tuesday, August 1, 2017 at 9:59:58 AM UTC+1, devops wrote:
I am planning to upgrade gerrit from version 2.11.7 to 2.14.2 , it is possible to upgrade directly ? I want to use online reindexing too . It looks like i have to first upgrade to 2.12.X version then 2.13.x version and finally 2.14.2 inorder to user online reindexing?


I am getting error while upgrading from 2.12.9 -> 2.13 or 2.12.9 -> 2.13.14

Error details below. Any help or suggestion, please appreciated: 

# java -jar gerrit-war-2.13.war init --batch -d /site/gerrit
# java -jar gerrit-war-2.13.war init --batch -d /site/gerrit
Upgrading schema to 119 ...
Upgrading schema to 120 ...
Upgrading schema to 121 ...
Upgrading schema to 122 ...
Upgrading schema to 123 ...
Upgrading schema to 124 ...
Upgrading schema to 125 ...
Upgrading schema to 126 ...
Upgrading schema to 128 ...
Upgrading schema to 129 ...
Migrating data to schema 119 ...
Exception in thread "main" java.lang.IllegalArgumentException: No enum constant com.google.gerrit.extensions.client.GeneralPreferencesInfo.DownloadCommand.
The enum itself
public static enum DownloadCommand {
REPO_DOWNLOAD, PULL, CHECKOUT, CHERRY_PICK, FORMAT_PATCH
}
didn't change between these two releases but moved to another package.

The DownloadCommand class moved from
in 2.12 to
in 2.13. 

Allowed configuration values for download.command:

if your server's etc/gerrit.config contains an unsupported value for this option this may cause this error.

-Matthias

David Ostrovsky

unread,
Jan 24, 2020, 4:55:38 AM1/24/20
to Repo and Gerrit Discussion

Am Donnerstag, 23. Januar 2020 18:45:28 UTC+1 schrieb abhishek das:


On Tuesday, August 1, 2017 at 9:59:58 AM UTC+1, devops wrote:
I am planning to upgrade gerrit from version 2.11.7 to 2.14.2 , it is possible to upgrade directly ? I want to use online reindexing too . It looks like i have to first upgrade to 2.12.X version then 2.13.x version and finally 2.14.2 inorder to user online reindexing?


I am getting error while upgrading from 2.12.9 -> 2.13 or 2.12.9 -> 2.13.14

Error details below. Any help or suggestion, please appreciated: 

# java -jar gerrit-war-2.13.war init --batch -d /site/gerrit
# java -jar gerrit-war-2.13.war init --batch -d /site/gerrit
Upgrading schema to 119 ...
Upgrading schema to 120 ...
Upgrading schema to 121 ...
Upgrading schema to 122 ...
Upgrading schema to 123 ...
Upgrading schema to 124 ...
Upgrading schema to 125 ...
Upgrading schema to 126 ...
Upgrading schema to 128 ...
Upgrading schema to 129 ...
Migrating data to schema 119 ...
Exception in thread "main" java.lang.IllegalArgumentException: No enum constant com.google.gerrit.extensions.client.GeneralPreferencesInfo.DownloadCommand.

It is a known issue: [1]. See my recommendation how to fix it in this thread: [2].


abhishek das

unread,
Jan 24, 2020, 6:23:41 AM1/24/20
to Repo and Gerrit Discussion
Hi 

Thanks for getting back.
I understood what you were saying but in the gerrit.config, there is no download section being defined.
Just for the sake of it, I put in the download section as per the documentation (https://gerrit-documentation.storage.googleapis.com/Documentation/2.12.9/config-gerrit.html#download), rerun the init command and still get the same error.
Any idea?

Thanks.

On Thursday, January 23, 2020 at 9:56:40 PM UTC, Matthias Sohn wrote:

David Ostrovsky

unread,
Jan 24, 2020, 6:54:15 AM1/24/20
to Repo and Gerrit Discussion

Am Freitag, 24. Januar 2020 12:23:41 UTC+1 schrieb abhishek das:
Hi 

Thanks for getting back.
I understood what you were saying but in the gerrit.config, there is no download section being defined.
Just for the sake of it, I put in the download section as per the documentation (https://gerrit-documentation.storage.googleapis.com/Documentation/2.12.9/config-gerrit.html#download), rerun the init command and still get the same error.
Any idea?

Re read my comment.

abhishek das

unread,
Jan 27, 2020, 4:57:57 AM1/27/20
to Repo and Gerrit Discussion
Hi

The manual update setting the column to NULL does help.
I have to update other enum columns to NULL as well (eg date_format etc)
But at least the upgrade schema to 119 has been completed.
I am confronted with other issue on 120, I will see if I can fix that myself.
Otherwise, will ask for more help later.
Thank you very much!!! 
Reply all
Reply to author
Forward
0 new messages