Commit Graph

4330 Commits

Author SHA1 Message Date
Jason Tedor d30f20212c Remove unneeded dummy test
This commit removes an unneeded dummy test from
PreBuiltXPackTransportClientTests. The dummy test was needed when the
sole test in the suite was skipped in some configuration. This test is
no longer skipped though so the dummy test can be removed.

Original commit: elastic/x-pack-elasticsearch@9cdfcc3be5
2017-01-12 19:21:45 -05:00
Lee Hinman 0136b095d0 Add BWC indices for 5.1.2 (elastic/elasticsearch#4607)
Original commit: elastic/x-pack-elasticsearch@8f2311aca8
2017-01-12 14:31:41 -07:00
Lee Hinman ff15132832 Merge remote-tracking branch 'dakrone/disable-all-by-default'
Original commit: elastic/x-pack-elasticsearch@835b1b8ac7
2017-01-12 10:23:14 -07:00
Lee Hinman 41f4d1784d Remove `_all` configuration
Since the `_all` field is now disabled by default and no longer allowed to be
configured, these should be removed from the mapping templates.

Relates to https://github.com/elastic/elasticsearch/pull/22144

Original commit: elastic/x-pack-elasticsearch@3b17c2b9c6
2017-01-12 09:29:09 -07:00
Jason Tedor 694bb5d07b Upgrade to Netty 4.1.7
This commit upgrades the Netty dependency to version 4.1.7.Final,
picking up some important bug fixes.

Relates elastic/elasticsearch#4602

Original commit: elastic/x-pack-elasticsearch@a5d10a9b04
2017-01-12 10:59:26 -05:00
javanna 2c5aeba418 remove unused arguments from RestGraphAction private parse method
Original commit: elastic/x-pack-elasticsearch@f0f41fb0a7
2017-01-12 14:44:02 +01:00
javanna dcf5ce7a4e Remove ParseFieldMatcher usages from QueryParseContext
Original commit: elastic/x-pack-elasticsearch@93423ca15c
2017-01-12 14:44:02 +01:00
javanna 51302608cb remove some more ParseFieldMatcher usages
Original commit: elastic/x-pack-elasticsearch@4d3b7574cc
2017-01-12 14:44:02 +01:00
Jay Modi c5cab37db6 security: always restore the ThreadContext after invoking an action
This change ensure that the ThreadContext is always restored after an action has been invoked when
going through the SecurityActionFilter and authentication and authorization is enabled.

Original commit: elastic/x-pack-elasticsearch@5da70bd6fa
2017-01-11 13:41:14 -05:00
Chris Earle 33e670e3aa [Monitoring] Improve Exporter "skipped" logging for Cloud (elastic/elasticsearch#4581)
This removes the "skipped exporter" logging at the info level in favor of debug level. The LocalExporter has been updated so that non-elected master nodes will log a "waiting for elected master node..." message when they're ready, but are stuck waiting for the master node to setup indices.

Original commit: elastic/x-pack-elasticsearch@3f8b58bc37
2017-01-11 13:38:27 -05:00
Nik Everett 818c4e9791 Handle core removing SearchRequestParsers
Original commit: elastic/x-pack-elasticsearch@e2f0ef773b
2017-01-11 08:49:16 -05:00
Yannick Welsch 44d745bd92 [TEST] Missed @Test annotation
Original commit: elastic/x-pack-elasticsearch@57798e6763
2017-01-11 14:19:10 +01:00
Yannick Welsch 02ef018978 [TEST] Ensure that there is at least one enabled test in elasticsearch-transport-client
Original commit: elastic/x-pack-elasticsearch@092d35dc1c
2017-01-11 13:34:06 +01:00
Alexander Reelsen 56e3e107d4 Tests: Fix watcher test using DNS resolution (elastic/elasticsearch#4576)
Turns out that this test became flaky on dev machines with specific DNS setup.
This test uses an index action to provoke an error, thus there is no dependency
on anything network specific.

The reason it was uncovered now, was due to the change to the Apache HTTP client which is doing DNS lookups. This DNS lookup happened inadvertantly because of a bug in the test, which had a URI like http://http://127.0.0.1.... However having web request was not needed at all, so it was replaced.

Closes elastic/elasticsearch#4561

Original commit: elastic/x-pack-elasticsearch@158516b5e5
2017-01-10 17:26:54 +01:00
Yannick Welsch a890cfb81e Keep NodeConnectionsService in sync with current nodes in the cluster state
Companion commit to elastic/elasticsearchelastic/elasticsearch#22509

Original commit: elastic/x-pack-elasticsearch@d46a46bf68
2017-01-10 13:32:11 +01:00
Lee Hinman 28adc73220 Merge remote-tracking branch 'dakrone/add-noop-it'
Original commit: elastic/x-pack-elasticsearch@780992535c
2017-01-09 16:02:04 -07:00
Lee Hinman 45e84cde6e Add PreventFailingBuildIT in qa/smoke-test-watcher
The watcher tests were recently marked with `@Network`, which prevents them from
normally being run. Unfortunately, this means no tests run by default and the
entire suite fails.

Original commit: elastic/x-pack-elasticsearch@40cfc75b26
2017-01-09 15:59:32 -07:00
Nik Everett 66a2f0d49e Handle core replacing Suggesters with namedObject
Original commit: elastic/x-pack-elasticsearch@e68d82569f
2017-01-09 16:51:47 -05:00
Jay Modi e0f0b4b7b8 rename the kibana role to kibana_system
This commit renames the kibana role to kibana_system and provides a backwards compatibility
layer so that kibana access still works properly during a rolling upgrade.

Closes elastic/elasticsearch#4525

Original commit: elastic/x-pack-elasticsearch@5c5796e53a
2017-01-09 16:06:50 -05:00
Nik Everett ac260505af Handle core moving Aggregation parsing to namedObject
Original commit: elastic/x-pack-elasticsearch@a968c54e86
2017-01-09 13:05:56 -05:00
Nik Everett c597d37fbb Hande SearchExtParsers replaced by namedObject
Original commit: elastic/x-pack-elasticsearch@9691f9b772
2017-01-09 08:22:01 -05:00
jaymode a0090ac556 test: ensure the roles store is called when verifying mock interations
The CompositeRolesStoreTests#testNegativeLookupsAreCached test had a bug where it was expected to
retrieve the superuser role but the mockito verification on the call failed. This was because there
is also randomization on the number of times to call, which could be 0.

Closes elastic/elasticsearch#4562

Original commit: elastic/x-pack-elasticsearch@5c62df15b7
2017-01-09 08:05:59 -05:00
Tanguy Leroux a86b112f1e [Watcher] Delete JIRA issues after integration tests execution (elastic/elasticsearch#4552)
This commit delete the JIRA issues after the integration test execution. All issues from the testing project XWT are deleted, even if they have not been created during this specific test execution.

closes elastic/elasticsearch#4535

Original commit: elastic/x-pack-elasticsearch@0362463633
2017-01-09 10:41:48 +01:00
Tim Vernum 525364cf0e Add TRACE logging for LDAP traffic (elastic/elasticsearch#4551)
We frequently have support requests to diagnose LDAP realm problems.
One of the tools that would be useful in those cases is to be able to turn on trace logging and be able to see the LDAP searches and their results

Original commit: elastic/x-pack-elasticsearch@632d8e4f19
2017-01-09 11:26:22 +11:00
Jason Tedor c1d44d7d71 Mark failing action throttle test as awaits fix
This commit marks ActionThrottleTests#testFailingActionDoesGetThrottled
as awaits fix as this test fails reliably.

Original commit: elastic/x-pack-elasticsearch@465c48b603
2017-01-08 16:47:54 -05:00
javanna 8d31827f28 Migrate ToXContent impls to ToXContentObject
Original commit: elastic/x-pack-elasticsearch@b09f537ef4
2017-01-06 23:32:05 +01:00
javanna 0b93bc98bf WatchSourceBuilder to extend ToXContentToBytes
Original commit: elastic/x-pack-elasticsearch@b97ad8f92c
2017-01-06 23:32:05 +01:00
javanna c23de42f29 Adapt to ToXContentObject introduction
Changes required are for two reasons:

1) SearchResponse is a self contained valid object which doesn't need to be wrapped in a new object anymore
2) RestToXContentBuilderListener requires ToXContentObject, hence GraphExploreResponse needs to be moved over

Original commit: elastic/x-pack-elasticsearch@12277d0220
2017-01-06 23:32:05 +01:00
Tanguy Leroux 19cbab4ac3 [Watcher] Update triggering interval in Jira integration tests
In Jira integration tests, some watches are triggered every second whereas they are executed using the watch execute API. This commit increases the triggering interval to 1d so that the watches are not executed on slow machines.

Original commit: elastic/x-pack-elasticsearch@4d0462bc00
2017-01-05 21:00:53 +01:00
javanna 80dc895450 remove ParseFieldMatcher usages from Script parsing code
Original commit: elastic/x-pack-elasticsearch@4be5f83084
2017-01-05 19:33:15 +01:00
Tim B f71733ec4d Replace com.sun.net.httpserver.Http/Https server usages with MockHttpServer. (elastic/elasticsearch#4476)
Original commit: elastic/x-pack-elasticsearch@4b2d184f53
2017-01-05 11:29:31 -06:00
Tanguy Leroux b72dd8a2d1 [Monitoring] Schedule data collection instead of sleeping (elastic/elasticsearch#4266)
This commit renames the current AgentService into MonitoringService and changes the way it works: it was previously based on thread sleeping and it now use thread scheduling instead. 

At every given time interval, a MonitoringExecution is executed. It first checks if monitoring data can be collected and if so it will collect data from Collectors and then export the data using the Exporters. There are cases where the data cannot be collected: when the service is stopping, when the interval has been set to -1 after the MonitoringExecution has been scheduled, or when the previous data collection is not yet terminated. In this last case, MonitoringExecution will still be executed at the given interval but will not collect any data.

All tasks are executed on the generic thread pool.

closes elastic/elasticsearch#2866

Original commit: elastic/x-pack-elasticsearch@d37b4d3731
2017-01-05 17:45:17 +01:00
Tanguy Leroux 3d2d1d49b6 [Watcher] Move Jira integration tests to smoke-test-watcher (elastic/elasticsearch#4534)
This commit moves the Jira rest integration tests from the smoke-test-watcher-with-mustache project to the smoke-test-watcher project.

Original commit: elastic/x-pack-elasticsearch@c6b03d557f
2017-01-05 15:22:59 +01:00
Alexander Reelsen 63f4bbba98 Watcher: Use Apache HttpClient for internal Watcher HttpClient (elastic/elasticsearch#4434)
Watcher: Use Apache HttpClient for internal Watcher HttpClient

The current implementation based on URLConnection has several drawbacks.

* If server returned HTTP header but then got stuck, no timeout would help, the connection remained stuck
* GET requests with a body were not supported, the method was silently changed to POST
* More complex handling of input/error stream handling, the body could not be read from a single input stream

NOTE: This is a BWC breaker. From now on every part of the URL needs to be encoded properly before it is configured in the requeust builder. This requires an upgrade of all watches.

Closes elastic/elasticsearch#1141

Original commit: elastic/x-pack-elasticsearch@bbc8f85dd8
2017-01-05 14:25:58 +01:00
Tanguy Leroux 125a2c9c03 [Watcher] Enable Jira integration tests (elastic/elasticsearch#4331)
This commit enables the Jira integration tests with the Jira project and account provided by Edward Sy.

closes elastic/infraelastic/elasticsearch#1498

Original commit: elastic/x-pack-elasticsearch@78d1005064
2017-01-05 13:44:04 +01:00
Alexander Reelsen 9f43a5320e Watcher: Fix test failure in case watch alias was created before
An integration test was failing due to the possibility of the
.watch index being an alias (which only happens rarely).

Original commit: elastic/x-pack-elasticsearch@d53a4ebdd4
2017-01-05 11:44:41 +01:00
Nik Everett 93b16f0615 Fix another qa project
Original commit: elastic/x-pack-elasticsearch@9609036dde
2017-01-05 10:56:09 +01:00
Nik Everett f2ae490b32 Switch from standalone-test to standalone-rest-test
standalone-rest-test doesn't configure unit tests and for these
integTest only projects that is what we want.

Original commit: elastic/x-pack-elasticsearch@f576dfdfbb
2017-01-05 10:56:09 +01:00
Nik Everett 5b6bfffa9a Require either BuildPlugin or StandaloneTestBasePlugin to use RestTestPlugin
It used to be that RestTestPlugin "came with" StandaloneTestBasePlugin
but we'd like to use it with BuildPlugin for the high level rest client.

Also fix some license headers.

Original commit: elastic/x-pack-elasticsearch@3d5549d170
2017-01-05 10:56:09 +01:00
Alexander Reelsen cb7f916485 Watcher: Remove async code in sync code block (elastic/elasticsearch#4506)
Watcher: Remove async code in sync code block

When removing the watch store this code snippet sneaked in.
A call to get a watch in order to find out if it exists was async, but
the code checking the result was called immediately afterwards without
waiting for the result, thus always using the default value.

This also removes some unused code in TriggeredWatchStore.

Original commit: elastic/x-pack-elasticsearch@c47e70bf8a
2017-01-05 10:24:17 +01:00
Tim Vernum c64ad22579 Use Version.compareTo when calculating minimum version (elastic/elasticsearch#4505)
Results from elasticsearch change elastic/elasticsearch#22378 (6ad5486)

Original commit: elastic/x-pack-elasticsearch@73c09657bb
2017-01-05 17:43:10 +11:00
Tim Vernum ca3bbc7da0 [TESTS] Test resolving ldap groups with preloaded attributes (elastic/elasticsearch#4530)
Add a test for the `UserAttributeGroupsResolver` when using attributes provided as a parameter.

(ported from commit elastic/x-pack@ebc62b7, elastic/elasticsearch#4522)

Original commit: elastic/x-pack-elasticsearch@6502fdb801
2017-01-05 17:42:28 +11:00
Chris Earle 3c68e6dd23 Ignore 5m and 15m system load averages in resolver tests so that Mac users can run them
Original commit: elastic/x-pack-elasticsearch@4a2a75b046
2017-01-04 11:59:05 -05:00
Chris Earle 35b405d029 [Monitoring] Add 'logstash' type to old .monitoring-data-2 indices (elastic/elasticsearch#4517)
Add `logstash`, in addition to `kibana` type mappings if they are missing from the _existing_ .monitoring-data-2 indices. This allows existing indices to be upgraded in place to support the Logstash monitoring feature added in 5.2 without having to delete the .monitoring-data-2 index.

Original commit: elastic/x-pack-elasticsearch@864343a116
2017-01-04 00:43:30 -05:00
Thomas Neirynck b799c1603b Merge pull request elastic/elasticsearch#3480 from thomasneirynck/enhancement-tileurl
Add license id when retrieving map metadata

Original commit: elastic/x-pack-elasticsearch@ff50a72fb4
2017-01-03 19:15:09 -05:00
Chris Earle 0d62207f8f [Monitoring] BWC Allow New Types to be added to .monitoring-data-2 index (elastic/elasticsearch#4504)
* [Monitoring] BWC Allow New Types to be added to .monitoring-data-2 index

This adds the new Logstash (and technically Kibana) types to the index mapping if they're not already there. Pre-existing indices will be blocked from creating new types in the index due to the index setting. The index setting cannot be flipped without opening/closing the index, so manually adding the new types is easier.

Original commit: elastic/x-pack-elasticsearch@e85e800335
2017-01-03 16:47:09 -05:00
javanna cd2e608ecc Remove unused ParseFieldMatcher argument from SearchInput and SearchTransform parse methods
Original commit: elastic/x-pack-elasticsearch@6cf7323961
2017-01-03 22:39:48 +01:00
javanna 4359a0508f remove unused ParseFieldMatcher imports
Original commit: elastic/x-pack-elasticsearch@c5c4834a8b
2017-01-03 22:26:17 +01:00
Jay Modi e41b53c344 roles with FLS and/or DLS are ignored when unlicensed (elastic/elasticsearch#4481)
Currently, roles making use of field or document level security are still applied when
the license level does not enable field and document level security. There is no indication
that these roles are not being applied so it is misleading to users. This change prevents
these roles for applying to authorization and also adds a transient metadata to the response
that indicates which features of a role is unlicensed.

Additionally, this PR prevents the addition or modification of roles to include field or
document level security.

Closes elastic/elasticsearch#2472

Original commit: elastic/x-pack-elasticsearch@c9455958f5
2017-01-03 12:06:33 -05:00
Chris Earle f4b9e794e8 [Monitoring] Fix test that fails with Cgroups missing on some machines
Original commit: elastic/x-pack-elasticsearch@23b7c2a25a
2017-01-03 12:02:12 -05:00