Commit Graph

18166 Commits

Author SHA1 Message Date
Ryan Ernst ce78c2b280 Merge pull request #15087 from rjernst/standalone_tests_intellij
Setup standalone tests to compile in intellij
2015-12-07 16:02:49 -08:00
Ryan Ernst fa1c708ccd Merge branch 'master' into standalone_tests_intellij 2015-12-07 16:01:32 -08:00
David Pilato 7dcb40bcac Add support for proxy authentication for s3 and ec2
When using S3 or EC2, it was possible to use a proxy to access EC2 or S3 API but username and password were not possible to be set.

This commit adds support for this. Also, to make all that consistent, proxy settings for both plugins have been renamed:

* from `cloud.aws.proxy_host` to `cloud.aws.proxy.host`
* from `cloud.aws.ec2.proxy_host` to `cloud.aws.ec2.proxy.host`
* from `cloud.aws.s3.proxy_host` to `cloud.aws.s3.proxy.host`
* from `cloud.aws.proxy_port` to `cloud.aws.proxy.port`
* from `cloud.aws.ec2.proxy_port` to `cloud.aws.ec2.proxy.port`
* from `cloud.aws.s3.proxy_port` to `cloud.aws.s3.proxy.port`

New settings are `proxy.username` and `proxy.password`.

```yml
cloud:
    aws:
        protocol: https
        proxy:
            host: proxy1.company.com
            port: 8083
            username: myself
            password: theBestPasswordEver!
```

You can also set different proxies for `ec2` and `s3`:

```yml
cloud:
    aws:
        s3:
            proxy:
                host: proxy1.company.com
                port: 8083
                username: myself1
                password: theBestPasswordEver1!
        ec2:
            proxy:
                host: proxy2.company.com
                port: 8083
                username: myself2
                password: theBestPasswordEver2!
```

Note that `password` is filtered with `SettingsFilter`.

We also fix a potential issue in S3 repository. We were supposed to accept key/secret either set under `cloud.aws` or `cloud.aws.s3` but the actual code never implemented that.

It was:

```java
account = settings.get("cloud.aws.access_key");
key = settings.get("cloud.aws.secret_key");
```

We replaced that by:

```java
String account = settings.get(CLOUD_S3.KEY, settings.get(CLOUD_AWS.KEY));
String key = settings.get(CLOUD_S3.SECRET, settings.get(CLOUD_AWS.SECRET));
```

Also, we extract all settings for S3 in `AwsS3Service` as it's already the case for `AwsEc2Service` class.

Closes #15268.
2015-12-07 23:10:54 +01:00
Simon Willnauer 4e80a5e099 Merge pull request #15234 from s1monw/remove_ancient_settings
Remove ancient deprecated and alternative recovery settings
2015-12-07 21:15:49 +01:00
Adrien Grand c6a73dfcd5 Mapper parsers should not check for a `tokenized` property.
I don't recall of this property of any of our field mappers and it's not in our
docs so I suspect it's very old. The removal of this property will not fail
version upgrades since none of the field mappers use it in toXContent.
2015-12-07 19:15:15 +01:00
Adrien Grand 3a58af04c0 Merge pull request #15245 from jpountz/fix/check_type_name
Make MappedFieldType.checkTypeName part of MappedFieldType.checkCompatibility.
2015-12-07 18:03:07 +01:00
Christoph Büscher c57672c9b3 Adding checks and tests for exceptions on unknown fieldnames 2015-12-07 16:52:53 +01:00
Christoph Büscher 6a7eedd8ae Switching HighlighterBuilder to use ParseFields 2015-12-07 14:56:05 +01:00
Jason Tedor 914486795f Addtional simplifications in IndexingMemoryController
This commit removes some unneeded null checks from
IndexingMemoryController that were left over from the work in #15251,
and simplifies the try-catch block in
IndexingMemoryController#updateShardBuffers.
2015-12-07 08:42:11 -05:00
Jim Ferenczi da380af10b Merge pull request #15216 from jimferenczi/copy_to_dynamic_object
Fix copy_to when the target is a dynamic object field.
2015-12-07 14:16:18 +01:00
Jim Ferenczi 8558a40894 Fix copy_to when the target is a dynamic object field.
Fixes #11237
2015-12-07 14:14:00 +01:00
Christoph Büscher aa69c4a20b Add fromXContent method to HighlightBuilder
For the search refactoring the HighlightBuilder needs a way to
create new instances by parsing xContent. For bwc this PR start
by moving over and slightly modifying the parsing from
HighlighterParseElement and keeps parsing for top level highlighter
and field options separate. Also adding tests for roundtrip
of random builder (rendering it to xContent and parsing it and
making sure the original builder properties are preserved)
2015-12-07 11:24:27 +01:00
Simon Willnauer c1f7f8c03c add settings to migration guide 2015-12-07 09:54:23 +01:00
Ryan Ernst 5402277462 Fix plugin service check for missing descriptor to allow ioexception 2015-12-06 23:09:00 -08:00
Robert Muir 1329ef487a Merge pull request #15262 from rmuir/filter_classes_in_scripts
Filter classes loaded by scripts
2015-12-06 10:29:56 -05:00
Michael McCandless 6152d352aa Merge pull request #15266 from mikemccand/no_mac_address
If we can't get a MAC address for the node, use a dummy one
2015-12-06 08:19:53 -05:00
Michael McCandless fe5570dba8 use dummy mac address if anything goes wrong asking for the real one 2015-12-06 06:10:43 -05:00
Robert Muir 3c419c2186 do expressions consistently with other engines 2015-12-05 22:08:40 -05:00
Robert Muir 2169a123a5 Filter classes loaded by scripts
Since 2.2 we run all scripts with minimal privileges, similar to applets in your browser.
The problem is, they have unrestricted access to other things they can muck with (ES, JDK, whatever).
So they can still easily do tons of bad things

This PR restricts what classes scripts can load via the classloader mechanism, to make life more difficult.
The "standard" list was populated from the old list used for the groovy sandbox: though
a few more were needed for tests to pass (java.lang.String, java.util.Iterator, nothing scary there).

Additionally, each scripting engine typically needs permissions to some runtime stuff.
That is the downside of this "good old classloader" approach, but I like the transparency and simplicity,
and I don't want to waste my time with any feature provided by the engine itself for this, I don't trust them.

This is not perfect and the engines are not perfect but you gotta start somewhere. For expert users that
need to tweak the permissions, we already support that via the standard java security configuration files, the
specification is simple, supports wildcards, etc (though we do not use them ourselves).
2015-12-05 21:46:52 -05:00
Jason Tedor b538343f61 Merge pull request #15259 from jasontedor/shard-inactive-logging
Simplify shard inactive logging
2015-12-05 11:30:56 -05:00
Jason Tedor 74a81b4a26 Remove logging statement when no shards are active 2015-12-05 11:30:17 -05:00
Jason Tedor fe0b9be472 Simplify shard inactive logging
This commit simplifies shard inactive debug logging to only log when the
physical shard is marked as inactive. This eliminates duplicate logging
that existed in IndexShard#checkIdle and
IndexingMemoryController#checkIdle, and eliminates excessive logging
that was occurring when the shard was already inactive as a result of
the work in #15252.
2015-12-05 11:20:23 -05:00
Jason Tedor 73a0cc6488 Clarify variable name in IndexingMemoryController#availableShards 2015-12-05 09:23:46 -05:00
Clinton Gormley cea1c465d4 Update rolling_upgrade.asciidoc
`--path.config` -> `--path.conf`

Closes #15242
2015-12-05 13:30:47 +01:00
Clinton Gormley d82a685f57 Update upgrade.asciidoc
Closes #15240
2015-12-05 13:27:25 +01:00
Ryan Ernst 7ac094fdc5 Remove unused dependency on rest spec in core integ tests 2015-12-04 19:48:40 -08:00
Ryan Ernst 62a0e0bc2b Fix plugin test to account for possibly extra dir by mock fs 2015-12-04 17:55:31 -08:00
Ryan Ernst 801425397e Merge pull request #15254 from rjernst/just_one_rest_tests
Remove duplicate runs of packaged rest tests
2015-12-04 15:39:05 -08:00
Robert Muir 506fa617da Merge pull request #15253 from rmuir/getClassLoader
ban RuntimePermission("getClassLoader")
2015-12-04 18:34:08 -05:00
Ryan Ernst 06f7d693bf Merge pull request #15200 from rjernst/old_plugin_error
Add nicer error message when a plugin descriptor is missing
2015-12-04 14:24:52 -08:00
Ryan Ernst 50716c3941 Plugins: Add nicer error message when an existing plugin's descriptor is missing
Currently, when a user tries to install an old plugin (pre 2.x) on a 2.x
node, the error message is cryptic (just printing the file path that was
missing, when looking for the descriptor). This improves the message to
be more explicit that the descriptor is missing, and suggests the
problem might be the plugin was built before 2.0.

closes #15197
2015-12-04 14:11:37 -08:00
Ryan Ernst 3d9d8bd45a Build: Remove duplicate runs of packaged rest tests
We currently use the full suite of packaged rest tests for each
distribution. We also used to run rest tests within core integ tests,
but this stopped working when we split out the test-framework, since the
test files are in there.

This change simplifies the code to run packaged rest tests just once,
for the integ-test-zip, and removes the unused rest tests from
test-framework. Distributions rest tests now check that all modules
were loaded.
2015-12-04 13:43:40 -08:00
Jason Tedor bbef8acd3c Cleanup ClusterServiceIT#testClusterStateBatchedUpdates
This commit addresses some issues that arose during the review of #14899
but were lost during squash while integrating into master.
 - the number of test threads is dropped to at most eight
 - a local variable is renamed for clarity
 - task priorities are randomized
2015-12-04 16:36:29 -05:00
Jason Tedor e7952e2023 Fix test bug in ClusterServiceIT#testClusterStateBatchedUpdates
This commit fixes a test bug in
ClusterService#testClusterStateBatchedUpdates. In particular, in the
case that an executor did not receive a task assignment from the random
assignments, it would not have an entry in the map of executors to
counts of assigned tasks. The fix is to just check if each executor has
an entry in the counts map.
2015-12-04 16:25:36 -05:00
Jason Tedor 3ab7451ca5 Merge pull request #15252 from jasontedor/indexing-memory-controller-check-idle-simplification
Simplify IndexingMemoryController#checkIdle
2015-12-04 16:11:04 -05:00
Jason Tedor b1a67b1c69 Simplify IndexingMemoryController#checkIdle
This commit further simplifies IndexingMemoryController#checkIdle after
the changes in #15251.
2015-12-04 16:10:43 -05:00
Robert Muir 46377778a9 Merge branch 'master' into getClassLoader 2015-12-04 15:58:36 -05:00
Robert Muir b0c64910b0 ban RuntimePermission("getClassLoader")
this gives more isolation between modules and plugins.
2015-12-04 15:58:02 -05:00
Jason Tedor 5a391f116b Merge pull request #15251 from jasontedor/stateless-indexing-memory-controller
IndexingMemoryController should not track shard index states
2015-12-04 15:18:40 -05:00
Jason Tedor 56328160c9 Absorb core ShardsIndicesStatusChecker logic into body of run 2015-12-04 15:16:22 -05:00
Jason Tedor 5341404f01 IndexingMemoryController should not track shard index states
This commit modifies IndexingMemoryController to be stateless. Rather
than statefully tracking the indexing status of shards,
IndexingMemoryController can grab all available shards, check their idle
state, and then resize the buffers based on the number of and which
shards are not idle.

The driver for this change is a performance regression that can arise in
some scenarios after #13918. One scenario under which this performance
regression can arise is if an index is deleted and then created
again. Because IndexingMemoryController was previously statefully
tracking the state of shards via a map of ShardIds, the new shards with
the same ShardIds as previously existing shards would not be detected
and therefore their version maps would never be resized from the
defaults. This led to an explosion in the number of merges causing a
degradation in performance.

Closes #15225
2015-12-04 15:01:47 -05:00
Ryan Ernst 70107c5c3c Merge pull request #15233 from rjernst/jigsaw
Add modules to distributions, and move lang-expression and lang-groovy to them
2015-12-04 11:44:27 -08:00
Ryan Ernst 2dbd93d3b0 Tweaked module error message against non integ-test-zip and made checks
for limiting configuration to certain distributions prettier
2015-12-04 11:40:08 -08:00
Ryan Ernst 01d48e2062 Merge branch 'master' into jigsaw 2015-12-04 11:29:49 -08:00
Ryan Ernst a6752c4da9 Merge pull request #15210 from rjernst/buildsrc_test_cleanup
Cleanup integ test classes in buildSrc to be less groovyish
2015-12-04 11:24:21 -08:00
Lee Hinman 46ca2d679d Merge remote-tracking branch 'dakrone/remove-get-forcemerge' 2015-12-04 10:21:57 -07:00
David Pilato 619fb998e8 Update Azure Service Management API to 0.9.0
Azure team released new versions of their Java SDK.

According to https://github.com/Azure/azure-sdk-for-java/wiki/Azure-SDK-for-Java-Features, it comes with 2 versions.
We should at least update to `0.9.0` of V1 but also consider moving to the new APIs (V2).

This commit first updates to latest API V1.

```xml
<dependency>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-svc-mgmt-compute</artifactId>
    <version>0.9.0</version>
</dependency>
```

Closes #15209
2015-12-04 17:32:11 +01:00
Adrien Grand be033f1362 Make MappedFieldType.checkTypeName part of MappedFieldType.checkCompatibility. 2015-12-04 17:15:49 +01:00
Yannick Welsch 1905f495bf Merge pull request #15212 from ywelsch/fix/rejectedexecution-on-shutdown
Ignore RejectedExecutionException in NodesFaultDetection
2015-12-04 16:36:08 +01:00
Yannick Welsch 8dcc692373 Ignore RejectedExecutionException in NodesFaultDetection
Closes #15212
2015-12-04 16:35:20 +01:00