Commit Graph

3749 Commits

Author SHA1 Message Date
Ryan Ernst b1c892b77d Merge pull request elastic/elasticsearch#2824 from rjernst/deguice5
Internal: Remove guice cyclic dependency with InternalClient

Original commit: elastic/x-pack-elasticsearch@9c24b1152d
2016-07-14 13:56:37 -07:00
Ryan Ernst e3defb4dbd Internal: Remove guice cyclic dependency with InternalClient
The InternalClient is used by xpack code making requests to other nodes,
to add the xpack user to the thread context. To do this, it uses has a
dependency on the AuthenticationService, which in turn transitively
depends on InternalClient (eg IndexAuditTrail). But to add the xpack
user, the full authentication service is not necessary. Only having the
crypto service is needed in order to encrypt the header.

This change simplifes construction of InternalClient both making it a
real class instead of an interface, and removing the dependency on the
AuthenticationService. It also removes the use of
Provider<InternalClient> in users of the client.

Original commit: elastic/x-pack-elasticsearch@10f633bdf3
2016-07-14 13:46:07 -07:00
Ryan Ernst d68970e4b9 Merge pull request elastic/elasticsearch#2822 from rjernst/deguice4
Remove use of Transport in audit trails

Original commit: elastic/x-pack-elasticsearch@26d9f18545
2016-07-14 13:05:40 -07:00
Ryan Ernst f481dea1d0 Internal: Remove use of Transport in audit trails
Both logfile and index audit trails currently depend on injection of
Transport in order to find the bound address of the local node. However,
the ClusterService provides access to information about the local node,
including the bound addresses. This change makes the audit trails use
the cluster service, and also makes the logging audit trail not use a
lifecycle.

Original commit: elastic/x-pack-elasticsearch@d747d64ee1
2016-07-14 11:22:41 -07:00
Chris Earle 4224d70986 [Monitoring UI] Use same Index Memory chart for Index page as Node page
This provides the same -- more useful -- index memory chart to the index page, instead of just "Lucene Memory", it now breaks down what it shows just like the Node page as as more generalized "Index Memory" chart. It also rolls Fielddata into the Index Memory. With Fielddata now in the Index Memory chart, I decided to add the Segment Count chart to the Index page.

Original commit: elastic/x-pack-elasticsearch@4e3490ce9c
2016-07-14 13:26:43 -04:00
Lee Hinman 7e4b200f43 [TEST] ensure "index1" is yellow before searching in MigrateToolIT
If the search runs before the primary shards are initialized for the
"index1" index, the search may fail for unrelated reasons.

Resolves elastic/elasticsearch#2818

Original commit: elastic/x-pack-elasticsearch@654ba9e142
2016-07-14 10:18:33 -06:00
Simon Willnauer 1fe0f5c7ac Followup for elastic/elasticsearchelastic/elasticsearch#19428 (elastic/elasticsearch#2815)
elastic/elasticsearchelastic/elasticsearch#19428 removes `node.mode` and `node.local` this PR
fixes xplugins to configure networking explicitly.

Original commit: elastic/x-pack-elasticsearch@ee8daa36dd
2016-07-14 13:21:27 +02:00
Ryan Ernst 7f6788af1a Fix line length
Original commit: elastic/x-pack-elasticsearch@50e9ef0667
2016-07-13 17:05:32 -07:00
Joe Fleming 26dd096fae Merge pull request elastic/elasticsearch#2655 from ycombinator/license-checking/reporting-ux
License checking UX for Reporting

Original commit: elastic/x-pack-elasticsearch@46bf6083bc
2016-07-13 16:30:29 -07:00
Joe Fleming 96d43a1929 Merge pull request elastic/elasticsearch#2765 from ycombinator/reporting/completion-notification-5.0
Adding notifications for completed jobs

Original commit: elastic/x-pack-elasticsearch@2bc6f7767f
2016-07-13 16:07:51 -07:00
Ryan Ernst f82fa65d7d Internal: Remove guice construction of most license classes
This change removes some of the complexity around licensing classes in
xpack. It removes the interfaces for registration and management so the
remaining LicensesService class is the thing that components wanting to
interact with the license should use. It also removes complexity around
the Licensee interface, removing generics and the registration at
construction time, as well as making the licensees no longer have a
lifecycle. There is still more to be done with simplification of license
classes construction, but this is a step towards a simpler world.

Original commit: elastic/x-pack-elasticsearch@5307d67b5b
2016-07-13 14:23:23 -07:00
Chris Earle 870a855827 [License] Fix expected endpoint from [_xpack/_license] to [_xpack/license]
Original commit: elastic/x-pack-elasticsearch@7a48bc674c
2016-07-13 16:06:02 -04:00
Chris Earle 2c3a0db9ec [Watcher] Fix typoed deprecated endpoint
{actions/_ack was accidentally duplicated. It should be _ack/{actions} in the first case.

Original commit: elastic/x-pack-elasticsearch@38895522b5
2016-07-13 14:57:52 -04:00
Areek Zillur b674e016cb [TEST] ensure test license registration is always acknowledged
Original commit: elastic/x-pack-elasticsearch@3a928ba54a
2016-07-13 14:29:39 -04:00
Chris Earle a7c884be61 [License] Log Deprecation Warnings for old API usage
This makes use of the registerAsDeprecatedHandler method to automatically warn users when they're using deprecated functionality.

This will also automatically provide a Warning header for anyone using HTTP clients (though they have to be looking for it...).

- This also adds deprecated `/_licenses` variants of the endpoint. Users are consistently making that mistake, and it's easy enough to support this way. Can remove it if people disagree though.

License portion only

Original commit: elastic/x-pack-elasticsearch@431c871fcf
2016-07-13 13:36:05 -04:00
Chris Earle 641caabdae [Watcher] Log Deprecation Warnings for old API usage
This makes use of the registerAsDeprecatedHandler method to automatically warn users when they're using deprecated functionality.

This will also automatically provide a Warning header for anyone using HTTP clients (though they have to be looking for it...).

- This also changes from PUT _start, _restart, _stop (Watcher endpoints) to POST _start, _restart, _stop
    - The deprecated variant still honors PUT
- Nothing about the hijack endpoints was deprecated because they did not change from 2.x

Watcher portion only

Original commit: elastic/x-pack-elasticsearch@36f87a6526
2016-07-13 13:23:10 -04:00
Karel Minarik 63add2c959 Monitoring: Added `timeout: 60s` to the setup section of "Bulk indexing of monitoring data" test
When the monitoring tests are run in isolation, they succeed. However, when the whole suite of
REST tests is being run at the same time, the "Bulk indexing of monitoring data" intermittently
fails with a timeout. Therefore, a timeout of 60 seconds has been added.

Closes elastic/elasticsearch#2809

Original commit: elastic/x-pack-elasticsearch@d11dc7a2be
2016-07-13 17:40:20 +02:00
Alexander Reelsen e124e211c9 Watcher: Move YAML test into own project to not interfere with client tests (elastic/elasticsearch#2804)
This particular test requires Elasticsearch to run on port 9400, which is not
guaranteed if the clients run their own tests, as it is a matter of configuration
in gradle.

Therefore these tests need to run in their project.

Original commit: elastic/x-pack-elasticsearch@da38407766
2016-07-13 16:08:13 +02:00
Simon Willnauer 89f98c60dc [TEST] Use valid file extension for mapping tests
Original commit: elastic/x-pack-elasticsearch@080699aeb8
2016-07-13 10:37:08 +02:00
Simon Willnauer 691bdfcf14 Merge pull request elastic/elasticsearch#2792 from elastic/modularize_netty
this is a followup for elastic/elasticsearchelastic/elasticsearch#19392 Modularizing Netty

Original commit: elastic/x-pack-elasticsearch@504c8110dd
2016-07-13 09:52:34 +02:00
Tim Sullivan b7a38e7898 Merge pull request elastic/elasticsearch#2803 from tsullivan/monitoring-ui-fix-sorting-unassignedshards
monitoring ui: fix sorting by unassigned shards column

Original commit: elastic/x-pack-elasticsearch@d76a0ad844
2016-07-12 21:43:17 -07:00
Nik Everett d46f83c53b Fix compilation error
Core changed...

Original commit: elastic/x-pack-elasticsearch@c80d5fd042
2016-07-12 22:47:20 -04:00
Shaunak Kashyap eec6a54d75 Merge pull request elastic/elasticsearch#2766 from ycombinator/reporting/ignore-missing-objects-5.0
For missing objects, render warning message in PDF

Original commit: elastic/x-pack-elasticsearch@27b1f59b6b
2016-07-12 19:29:39 -06:00
Ryan Ernst 16793ad260 Merge pull request elastic/elasticsearch#2786 from rjernst/deguice1
Remove guice from watcher http client and related classes.

Original commit: elastic/x-pack-elasticsearch@3b321c20f5
2016-07-12 15:07:23 -07:00
Ryan Ernst ed3b4afca9 Sync createComponents signature with core
Original commit: elastic/x-pack-elasticsearch@7874ff411f
2016-07-12 15:06:51 -07:00
Ryan Ernst 464e1bee37 Merge branch 'master' into deguice1
Original commit: elastic/x-pack-elasticsearch@078230ed0d
2016-07-12 15:04:49 -07:00
Joe Fleming 819333337c Merge pull request elastic/elasticsearch#2764 from Bargs/reportingUbuntuDocs
Fixes elastic/elasticsearch#2595 Add note to reporting docs about Ubuntu dependencies

Original commit: elastic/x-pack-elasticsearch@80f4865bd8
2016-07-12 14:09:52 -07:00
Ryan Ernst 8b2cdebf88 Merge pull request elastic/elasticsearch#2788 from rjernst/license1
Internal: Simplify creation of trial license

Original commit: elastic/x-pack-elasticsearch@1c92544b65
2016-07-12 13:44:21 -07:00
javanna c86c433aab Rest client: move to async client under the hood
Some configuration changes are needed due to the move to the async http client

Original commit: elastic/x-pack-elasticsearch@2f28dec0a0
2016-07-12 18:25:27 +02:00
Simon Willnauer 6522f49d83 Add MockNettyPlugin to sidestep permissions assertion in pseudo integ tests
Original commit: elastic/x-pack-elasticsearch@9e7f6532fb
2016-07-12 17:56:06 +02:00
Simon Willnauer 9204920d9a fix tests to use the transport-netty plugin
Original commit: elastic/x-pack-elasticsearch@65c0cd0cf2
2016-07-12 14:35:07 +02:00
Luca Cavanna 1de203dcef Merge pull request elastic/elasticsearch#2789 from javanna/enhancement/rest_client_builder_callback
Rest Client: add callbacks to customize http client settings

Original commit: elastic/x-pack-elasticsearch@739d37fb73
2016-07-12 13:30:35 +02:00
javanna 50c24ba4ce RestClient: simplify ssl configuration
Original commit: elastic/x-pack-elasticsearch@1600743249
2016-07-12 12:31:40 +02:00
javanna 107ab2d71d Rest Client: add callback to customize http client settings
The callback replaces the ability to fully replace the http client instance. By doing that, one used to lose any default that the RestClient had set for the underlying http client. Given that you'd usually override one or two things only, like a couple of timeout values, the ssl factory or the default credentials providers, it is not uder friendly if by doing that users end up replacing the whole http client instance and lose any default set by us.

Original commit: elastic/x-pack-elasticsearch@03adca6f62
2016-07-12 12:31:40 +02:00
Alexander Reelsen 4360cccad7 Watcher: Prevent NPE on chained input toXContent (elastic/elasticsearch#2776)
If a chained input was aborted with an exception, then toXContent ran
into a NPE instead of rendering.

Closes elastic/elasticsearch#2774

Original commit: elastic/x-pack-elasticsearch@a3795f2290
2016-07-12 09:33:32 +02:00
Ryan Ernst a2359d13f3 Add jar dependency on netty module
Original commit: elastic/x-pack-elasticsearch@f653855378
2016-07-11 23:57:08 -07:00
Ryan Ernst a9ace27107 Internal: Simplify creation of trial license
Currently each node monitors the cluster state for a license, and if it
does not find one, it sends a request to the master to generate a trial
license. However, the master node has this same logic. Since the master
node is the only thing that can change the cluster state, we know that
once some node becomes master, it will notice the lack of license,
generate a trial license, and send a cluster state update. The trigger
from every node telling the master to generate the trial license is not
needed.

This change removes the register_trial_license action that the non
master nodes used. It removes the need for the TransportService in the
LicensesService, which will help with deguicing.

Original commit: elastic/x-pack-elasticsearch@a71656847e
2016-07-11 22:37:23 -07:00
Ryan Ernst dd89a7b061 Remove guice from watcher http client and related classes.
This is the first deguicing for xplugins to use the new
createComponents(). The removal was very straightforward. One thing to
note is HttpAuthFactory only has one implementation (basic auth), but I
kept the registry and such for now. Also, HttpRequest.Parser is only
used in 2 tests, not at all in main code, it should probably be removed.

Original commit: elastic/x-pack-elasticsearch@839e7e4900
2016-07-11 18:05:33 -07:00
Shaunak Kashyap 4e7fc5b625 Merge branch 'master' into license-checking/reporting-ux
Original commit: elastic/x-pack-elasticsearch@545fbfc478
2016-07-11 16:36:48 -07:00
Areek Zillur 149df1fd44 [FIX] adapt licensing rest tests to new spec-api name
Original commit: elastic/x-pack-elasticsearch@c307c2afda
2016-07-11 18:27:05 -04:00
Tim Sullivan 9556ee1e76 Merge pull request elastic/elasticsearch#2779 from tsullivan/monitoring-ui-fix-exportsyntax
monitoring ui: fix module.export syntax

Original commit: elastic/x-pack-elasticsearch@fcbb53d0a6
2016-07-11 14:40:39 -07:00
Ryan Ernst e92860f552 Plugin node modules/services rename to guice related
See elastic/elasticsearchelastic/elasticsearch#19371

Original commit: elastic/x-pack-elasticsearch@40f7e43cc5
2016-07-11 14:28:47 -07:00
Karel Minarik 87ea79bad6 License Plugin: Removed installing a special license in the delete REST test
We can rely on the automatically installed license being present.

Related: elastic/elasticsearch#2782

Original commit: elastic/x-pack-elasticsearch@a038ac71e9
2016-07-11 23:08:49 +02:00
Karel Minarik 22c19acbcf License Plugin: Added a `teardown` to put license back
Since the "Should throw 404 after license deletion" test deletes the license,
a subsequent test run fails for many tests in other components.

This patch adds a `teardown` section to install back a trial development license.

Closes elastic/elasticsearch#2782

Original commit: elastic/x-pack-elasticsearch@45ec5d4244
2016-07-11 23:08:34 +02:00
Ryan Ernst f90f0c0149 Merge pull request elastic/elasticsearch#2781 from rjernst/deguice_cryptoservice
Internal: Create CryptoService without guice

Original commit: elastic/x-pack-elasticsearch@a4f8a3e2ca
2016-07-11 12:36:32 -07:00
Ryan Ernst 7438177313 Internal: Create CryptoService without guice
This change creates the CryptoService during xpack plugin construction,
and also collapses the only implementation of CryptoService into a
class instead of an interface.

Original commit: elastic/x-pack-elasticsearch@7f00a5d6ef
2016-07-11 12:18:39 -07:00
jaymode 84a60d2548 test: mute audit trail test that fails periodically
Original commit: elastic/x-pack-elasticsearch@83972e5c2b
2016-07-11 15:08:32 -04:00
Ryan Ernst 5c7279773c Merge pull request elastic/elasticsearch#2754 from rjernst/clock_init_without_guice
Initialize Clock directly instead of with guice

Original commit: elastic/x-pack-elasticsearch@17ab249b95
2016-07-11 11:49:19 -07:00
Ryan Ernst 2827c686bd Fix spacing in watcher test class
Original commit: elastic/x-pack-elasticsearch@49b94780d7
2016-07-11 11:48:51 -07:00
Ryan Ernst f13764dbc0 Merge branch 'master' into clock_init_without_guice
Original commit: elastic/x-pack-elasticsearch@8a1e4758c9
2016-07-11 11:48:29 -07:00