17981 Commits

Author SHA1 Message Date
Simon Willnauer
ce417540c5 apply review from @clintongormley 2015-12-09 12:24:40 +01:00
Simon Willnauer
8e0a610c26 add simple javadoc reference to usage 2015-12-09 12:24:20 +01:00
Simon Willnauer
f0add6239e make enum names all uppercase 2015-12-09 11:57:27 +01:00
Simon Willnauer
85a1b54867 fix compilation 2015-12-09 11:41:14 +01:00
Simon Willnauer
fd79e40e65 fix expcetion msg comparison 2015-12-09 11:14:35 +01:00
Simon Willnauer
83ef665cba fix tests 2015-12-09 10:36:25 +01:00
Simon Willnauer
3d946871e8 move setting registration into settings module - this stuff needs to be present for transport clients as well. 2015-12-09 10:30:18 +01:00
Simon Willnauer
d4e7bd2cc3 predicate -> consumer 2015-12-09 10:14:33 +01:00
Simon Willnauer
c9d7c92243 fold ClusterSettingsService into ClusterSettings 2015-12-09 09:57:39 +01:00
Simon Willnauer
edd98b0e6c remove descritpion for now 2015-12-08 22:15:08 +01:00
Simon Willnauer
6c7e5069d4 apply review comments from @nik9000 2015-12-08 21:50:24 +01:00
Simon Willnauer
5d7f4ef394 include default settigns 2015-12-08 15:27:11 +01:00
Simon Willnauer
dfb8bf658b expose default settings on /_cluster/settings?defaults=true 2015-12-08 15:22:19 +01:00
Simon Willnauer
44df6814d4 fix imports 2015-12-08 14:39:16 +01:00
Simon Willnauer
8502926327 fuck you linefeed 2015-12-08 14:39:16 +01:00
Simon Willnauer
2e27ee393f add rest API to reset settings 2015-12-08 14:39:16 +01:00
Simon Willnauer
fbbb04b87e Add infrastructure to transactionally apply and reset dynamic settings
This commit adds the infrastructure to make settings that are updateable
resetable and changes the application of updates to be transactional. This means
setting updates are either applied or not. If the application failes all values are rejected.

This initial commit converts all dynamic cluster settings to make use of the new infrastructure.
All cluster level dynamic settings are not resettable to their defaults or to the node level settings.
The infrastructure also allows to list default values and descriptions which is not fully implemented yet.

Values can be reset using a list of key or simple regular expressions. This has only been implemented on the java
layer yet. For instance to reset all recovery settings to their defaults a user can just specify `indices.recovery.*`.

This commit also adds strict settings validation, if a setting is unknown or if a setting can not be applied the entire
settings update request will fail.
2015-12-08 14:39:15 +01:00
Boaz Leskes
0809e4a65f typo fix 2015-12-08 09:36:10 +01:00
Boaz Leskes
82b502c21f Make IndexShard operation be more explicit about whether they are expected to run on a primary or replica
This commit cherry picks some infrastructure changes from the `feature/seq_no` branch to make merging from master easier.

More explicitly, IndexShard current have  prepareIndex and prepareDelete methods that are called both on the primary as the replica, giving it a different origin parameter. Instead, this commits creates two explicit prepare*OnPrimary and prepare*OnReplica methods. This has the extra added value of not expecting the caller to use an Engine enum.

Also, the commit adds some code reuse between TransportIndexAction and TransportDeleteAction and their TransportShardBulkAction counter parts.

Closes #15282
2015-12-08 09:08:08 +01:00
Adrien Grand
47bcb33006 Merge pull request #15289 from jpountz/fix/mapper_tokenized
Mapper parsers should not check for a `tokenized` property.
2015-12-08 09:02:38 +01:00
Jason Tedor
618c2f7af5 Add missing license header to o.e.m.Probes 2015-12-07 22:07:20 -05:00
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
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
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
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