Gerrit Upgrade 2.16.8 -> 3.0.0

485 views
Skip to first unread message

Andreas Pieber

unread,
May 20, 2019, 2:46:54 AM5/20/19
to Repo and Gerrit Discussion
Hello,

I hope I'm at the right here for my question - I've a running gerrit 2.16.8. If I try to upgrade to 3.0.0 (running the init command) I get the attached log output which is basically telling me that there is something wrong with my NoteDB, which works perfectly fine in gerrit 2.16.8. What am I missing here?

Thank you very much for any help and ideas!

Kind regards,
Andreas
log_gerrit.txt

Luca Milanesio

unread,
May 20, 2019, 2:48:42 AM5/20/19
to Andreas Pieber, Luca Milanesio, Repo and Gerrit Discussion

On 20 May 2019, at 07:18, Andreas Pieber <anpi...@gmail.com> wrote:

Hello,

I hope I'm at the right here for my question - I've a running gerrit 2.16.8. If I try to upgrade to 3.0.0 (running the init command) I get the attached log output which is basically telling me that there is something wrong with my NoteDB, which works perfectly fine in gerrit 2.16.8. What am I missing here?

Can you share your gerrit.config?
Are you sure you converted to NoteDb when you were in v2.16?

Luca.


Thank you very much for any help and ideas!

Kind regards,
Andreas

--
--
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/5d8517db-e99c-4af5-8a51-85c706c0a8ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<log_gerrit.txt>

David Pursehouse

unread,
May 20, 2019, 2:50:17 AM5/20/19
to Andreas Pieber, Repo and Gerrit Discussion
On Mon, May 20, 2019 at 3:46 PM Andreas Pieber <anpi...@gmail.com> wrote:
Hello,

I hope I'm at the right here for my question - I've a running gerrit 2.16.8. If I try to upgrade to 3.0.0 (running the init command) I get the attached log output

The log output seems to be from running the daemon.

What is the output from running the init?

 
which is basically telling me that there is something wrong with my NoteDB, which works perfectly fine in gerrit 2.16.8. What am I missing here?

Thank you very much for any help and ideas!

Kind regards,
Andreas

--

Andreas Pieber

unread,
May 20, 2019, 3:07:15 AM5/20/19
to Luca Milanesio, Repo and Gerrit Discussion

Hello Luca,

thank you very much for the fast response. I've attached my (anonymous) gerrit.config

Kind regards,
Andreas

gerrit.config

Andreas Pieber

unread,
May 20, 2019, 3:12:18 AM5/20/19
to David Pursehouse, Repo and Gerrit Discussion

Hello David,

thank you very much for your fast response. The log was basically the output of

ExecStartPre=/usr/bin/docker run \
        --rm \
        -v gerrit_git:/var/gerrit/git \
        -v gerrit_index:/var/gerrit/index \
        -v gerrit_cache:/var/gerrit/cache \
        -v gerrit_plugins:/var/gerrit/plugins \
        -v gerrit_db:/var/gerrit/db \
        -v gerrit_data:/var/gerrit/data \
        -v /etc/gerrit:/var/gerrit/etc \
        -e CANONICAL_WEB_URL="https://XXX/" \
        -p 29418:29418 \
        --net gerrit \
        gerritcodereview/gerrit:3.0.0 java -jar /var/gerrit/bin/gerrit.war init -d /var/gerrit

Kind regards,
Andreas

Luca Milanesio

unread,
May 20, 2019, 3:41:16 AM5/20/19
to Andreas Pieber, Luca Milanesio, David Pursehouse, Repo and Gerrit Discussion

On 20 May 2019, at 08:12, Andreas Pieber <anpi...@gmail.com> wrote:

Hello David,

thank you very much for your fast response. The log was basically the output of

ExecStartPre=/usr/bin/docker run \
        --rm \
        -v gerrit_git:/var/gerrit/git \
        -v gerrit_index:/var/gerrit/index \
        -v gerrit_cache:/var/gerrit/cache \
        -v gerrit_plugins:/var/gerrit/plugins \
        -v gerrit_db:/var/gerrit/db \
        -v gerrit_data:/var/gerrit/data \
        -v /etc/gerrit:/var/gerrit/etc \
        -e CANONICAL_WEB_URL="https://XXX/" \
        -p 29418:29418 \
        --net gerrit \
        gerritcodereview/gerrit:3.0.0 java -jar /var/gerrit/bin/gerrit.war init -d /var/gerrit


You should specify the --entrypoint option /entrypoint.sh init.

Once the migration is done, you can remove the entrypoint and run without options.

HTH

Luca.

Andreas Pieber

unread,
May 20, 2019, 3:57:41 AM5/20/19
to Luca Milanesio, David Pursehouse, Repo and Gerrit Discussion

I've tried using "gerritcodreview/gerrit:3.0.0 init" instead but got exactly the same behavior. This wasn't actually too surprising since looking at https://github.com/GerritCodeReview/docker-gerrit/blob/master/ubuntu/18/entrypoint.sh is showing that it's only running:

java -jar /var/gerrit/bin/gerrit.war init --batch --install-all-plugins -d /var/gerrit

which should be basically the same as my command.

Kind regards,
Andreas

luca.mi...@gmail.com

unread,
May 20, 2019, 4:00:59 AM5/20/19
to Andreas Pieber, David Pursehouse, Repo and Gerrit Discussion


Sent from my iPhone

On 20 May 2019, at 08:57, Andreas Pieber <anpi...@gmail.com> wrote:

I've tried using "gerritcodreview/gerrit:3.0.0 init" instead but got exactly the same behavior. This wasn't actually too surprising since looking at https://github.com/GerritCodeReview/docker-gerrit/blob/master/ubuntu/18/entrypoint.sh is showing that it's only running:

java -jar /var/gerrit/bin/gerrit.war init --batch --install-all-plugins -d /var/gerrit

which should be basically the same as my command.


And the output is?

Andreas Pieber

unread,
May 20, 2019, 10:56:31 PM5/20/19
to luca.mi...@gmail.com, David Pursehouse, Repo and Gerrit Discussion

Hello Luca,

I just got the chance to try it again. I get exactly the same output (see attachment).

Kind regards,
Andreas

full-log-of-command.txt

Luca Milanesio

unread,
May 21, 2019, 1:55:34 AM5/21/19
to Andreas Pieber, Luca Milanesio, David Pursehouse, Repo and Gerrit Discussion
Adding 'java -jar /var/gerrit/bin/gerrit.war -d /var/gerrit' doesn't actually do anything, because the entrypoint just run /entrypoint.sh

Example:
docker run -ti gerritcodereview/gerrit:3.0.0 echo hello

You may expect that it would say "hello" but instead just runs Gerrit.
You need to specify the command using --entrypoint.

HTH

Luca.

<full-log-of-command.txt>

Andreas Pieber

unread,
May 21, 2019, 5:23:05 AM5/21/19
to Luca Milanesio, David Pursehouse, Repo and Gerrit Discussion

OK - finally I see the problem. I can do "init" all I like since the Dockerfile [1] is using

ENTRYPOINT /entrypoint.sh

instead of

ENTRYPOINT ["/entrypoint.sh"]

and the first version is simply ignoring all params... good to know. I'll provide a pull request for this, since I don't assume that this is by purpuse.

Now that I'm doing the right thing right I see the real problem. I geht hundrets of errors like in "migration-exception.txt" ending with a final "final-exception.txt". I assume this comes from manually deleting things in the database some years ago. Is there any chance doing a "migrate what you can and ignore the rest" migration or do I really have to reimport everything into a new gerrit 3 instance?

Thank you very much and kind regards, Andreas

[1] https://github.com/GerritCodeReview/docker-gerrit/blob/master/ubuntu/18/Dockerfile

final-exception.txt
migration-exception.txt

Andreas Pieber

unread,
May 23, 2019, 2:18:51 AM5/23/19
to Luca Milanesio, David Pursehouse, Repo and Gerrit Discussion

Just to make sure, before I go down that road - there is no other way to get rid of those migration errors, instead of setting up a new gerrit instance and importing all the current projects?

Thank you very much and kind regards, Andreas

Luca Milanesio

unread,
May 23, 2019, 4:33:17 PM5/23/19
to Andreas Pieber, Luca Milanesio, David Pursehouse, Repo and Gerrit Discussion

On 23 May 2019, at 07:19, Andreas Pieber <anpi...@gmail.com> wrote:

Just to make sure, before I go down that road - there is no other way to get rid of those migration errors, instead of setting up a new gerrit instance and importing all the current projects?

Thank you very much and kind regards, Andreas

On 21.05.19 11:23, Andreas Pieber wrote:

OK - finally I see the problem. I can do "init" all I like since the Dockerfile [1] is using

ENTRYPOINT /entrypoint.sh

instead of

ENTRYPOINT ["/entrypoint.sh"]

and the first version is simply ignoring all params... good to know. I'll provide a pull request for this, since I don't assume that this is by purpuse.

Now that I'm doing the right thing right I see the real problem. I geht hundrets of errors like in "migration-exception.txt" ending with a final "final-exception.txt". I assume this comes from manually deleting things in the database some years ago. Is there any chance doing a "migrate what you can and ignore the rest" migration or do I really have to reimport everything into a new gerrit 3 instance?

Thank you very much and kind regards, Andreas

I see lots of high-availability events in the log, trying to send the reindex command to the other node.
You should disable the plugin, upgrade, reindex and then enable it again.

HTH

Luca.
Reply all
Reply to author
Forward
0 new messages