Malena Ebert [Tue, 17 Nov 2020 08:29:18 +0000 (09:29 +0100)]
BUILD Fix unauthorized builds with artifactory repo
Due to a misbehavior in artifactory, the wrong http status code is returned and the build will stop immediately. This happens if you access a virtual repository which contains a repository which requires authentication.
As a workaround a virtual repository is used, which does not include non-public repositories.
Michal Duda [Fri, 30 Oct 2020 12:31:18 +0000 (13:31 +0100)]
SONAR-12686 Fix Elasticsearch properties for a single node
- https://www.elastic.co/guide/en/elasticsearch/reference/7.x/breaking-changes-7.0.html#_discovery_configuration_is_required_in_production
Michal Duda [Tue, 27 Oct 2020 22:02:20 +0000 (23:02 +0100)]
SONAR-13979 Fail when sonar.search.host or sonar.search.port are defined in DCE
- Orchestrator upgrade was required as by default it was setting these properties
Jacek [Thu, 9 Jan 2020 08:26:53 +0000 (09:26 +0100)]
SONAR-12686 upgrade es client to 7.9.3 and move to HTTP
- add should minimum match eq 1 to user index queries
ES 7.X changed behaviour in case filter query with bool it defaults to '0'
https://www.elastic.co/guide/en/elasticsearch/reference/7.x/breaking-changes-7.0.html#_the_filter_context_has_been_removed
- fix issue index routing param
ES 7.X helped discover this bug as new setting has been auto configured which is 'index.number_of_routing_shards'.
This has changed how documents are distributed across shards depending on how many shards the index has.
Without that change issues docs has been incorrectly routed to the same shard hash as projects and it worked no matter what routing key you used projectUuid or auth_projectUuid.
- update ngram and edge_ngram names to match with es 7.x
nGram and edgeNgram has been deprecated in favour of ngram and edge_ngram
https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking-changes-7.0.html#deprecated-ngram-edgengram-token-filter-cannot-be-used
- remove `_all : enabled` usage from UT
This field was already deprecated in 6.X, now it has been removed.
https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking-changes-7.0.html#all-meta-field-removed
- add Elasticsearch High Level REST client dependency
- use sonar.search.port for ES HTTP
- main process use ES Rest client to check ES status
- sonar.cluster.search.hosts has HTTP ports on APP nodes
also sonar.search.port and sonar.search.host MUST be configured on each Search node with the host and HTTP port of the current node
- use Elasticsearch high level rest client
- use in EsTester
- use as primary es client
- use indices api to get all indices name instead of cluster api
- use cluster health api to check cluster state
- support raw requests for 'nodes/_stats' and '_cluster/stats'
- support raw requests for 'indices/_stats'
- leave netty4plugin as testCompile dependency it is used in UTs
SONAR-12686 fix ES discovery settings in cluster mode
deprecated "discovery.zen.ping.unicast.hosts" has been removed, "discovery.seed_hosts" should be used instead
"discovery.zen.minimum_master_nodes" is ignored now: stop setting it and drop sonar property "sonar.search.minimumMasterNodes"
SONAR-12686 MaxDirectMemorySize JVM option should be defined for ES
This option was set by default in ES 6.X already but we had missed it.
ES sets it to half the max heap from Java code (see class JvmErgonomics)
To not have to get into the complexity of interpreting options to know what is the configured max heap,
we just add this option to the defaults and document it
SONAR-12686 update JVM options to match defaults in ES 7.X
Elastic introduced "system" JVM settings in 7.X:
* "system" settings are set from Java code (class SystemJvmOptions)
* which means these JVM settings are not defined in "jvm.options" file anymore
new sources unpack from ElasticSearch 7.9.3 artifact for Linux OSS only (without bundled JDK and under Apache 2.0 license)
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-7.9.3-no-jdk-linux-x86_64.tar.gz