New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 9383 link

Starred by 2 users

Issue metadata

Status: Released
Owner: ----
Closed: Jul 4
Cc:
Components:



Sign in to add a comment

Elasticsearch init step adds localhost:9200 as default server even when servers are already configured

Project Member Reported by david.pu...@gmail.com, Jul 3

Issue description

*****************************************************************
*****                                                       *****
***** !!!! THIS BUG TRACKER IS FOR GERRIT CODE REVIEW !!!!  *****
*****                                                       *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, CYANOGENMOD,  *****
***** INTERNAL ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.*****
*****                                                       *****
*****   THOSE ISSUES BELONG IN DIFFERENT ISSUE TRACKERS     *****
*****                                                       *****
*****************************************************************

Affected Version: 2.14.9

What steps will reproduce the problem?
1. Add Elasticsearch servers named "elasticsearch1" and "elasticsearch2" in the gerrit config
2. Run the init in interactive mode and accept the defaults
3.

What is the expected output?

The init should detect the configured servers and prompt to use them. Accepting the default options should then result in the same config being kept, i.e.

[elasticsearch "elasticsearch1"]
        hostname = elasticsearch1
        protocol = http
        port = 9200
[elasticsearch "elasticsearch2"]
        hostname = elasticsearch2
        protocol = http
        port = 9200

What do you see instead?

A "default" server is added, which causes errors in the logs later because there is no ES running at that location:

[elasticsearch "elasticsearch1"]
        hostname = elasticsearch1
        protocol = http
        port = 9200
[elasticsearch "elasticsearch2"]
        hostname = elasticsearch2
        protocol = http
        port = 9200
[elasticsearch "default"]
        protocol = http
        hostname = localhost
        port = 9200

To avoid this, one has to either change the "default" name to one of the names already used in the config, or use a config where at least one of the servers is named "default".


Please provide any additional information below.

See also  issue 9372 .  I'm not sure if these should be the same issue; I think that this issue can be solved by the implementation done for that one.



 
Note: It also does this if the init is run in batch mode, which is worse because you don't even have chance to notice that it's doing anything with default servers.
Status: ChangeUnderReview (was: New)
https://gerrit-review.googlesource.com/c/gerrit/+/187213
Labels: FixedIn-2.14.10
Status: Submitted (was: ChangeUnderReview)
Status: Released (was: Submitted)

Sign in to add a comment