Commit Graph

4146 Commits

Author SHA1 Message Date
Simon Willnauer 4033b8bff9 fix line length
Original commit: elastic/x-pack-elasticsearch@bdd50e8896
2016-11-22 21:10:55 +01:00
Simon Willnauer 7f28ca7fb7 Adopt changes to TransportClient constructor (elastic/elasticsearch#4141)
Follow-up for elastic/elasticsearchelastic/elasticsearch#21709

Original commit: elastic/x-pack-elasticsearch@40d3725ac2
2016-11-22 20:46:43 +01:00
jaymode 7821203422 test: add bwc index for 2.4.2
Original commit: elastic/x-pack-elasticsearch@f9fbd83b9c
2016-11-22 14:37:36 -05:00
Jay Modi 4239ba5415 allow reads of native users and roles when template version hasn't been updated
This change allows reads of our native users and roles when the template version has not been updated to
match the current version. This is useful for rolling upgrades where the nodes are also being actively
queried and/or indexed into. Without this, we can wreak havoc on a cluster by causing exceptions during
replication, which leads to shard failures. On nodes that match the version defined in the template,
write operations are allowed since we know that we are backwards compatible in terms of format but we
may have added new fields and shouldn't index them until the mappings and template have been updated.

As part of this, the rolling upgrade tests from core were used as the basis for a very basic set of tests
for doing a rolling upgrade with x-pack.

Closes elastic/elasticsearch#4126

Original commit: elastic/x-pack-elasticsearch@9be518ef00
2016-11-22 12:00:09 -05:00
Areek Zillur a9f3619b5a Enable merging license in tribe node (elastic/elasticsearch#4147)
Currently, a tribe node ignored underlying cluster licenses
due to inablity to select an appropriate license from  multiple
licenses. Now that tribe node supports merging custom metadata
(elasticsearch#elastic/elasticsearch#21552), we can enable license support in tribe
node.

Now, tribe node chooses license with the highest operation
mode from underlying cluster licenses. This commit also
adds integration tests for licensing to verify that:
 - autogenerated trial license propagates to tribe node
 - tribe node chooses the highest operation mode license
 - removing a license from underlying cluster license is
   removed from tribe

closes elastic/elasticsearch#3212

Original commit: elastic/x-pack-elasticsearch@b5c003decd
2016-11-22 11:42:51 -05:00
CJ Cenizal 9eed90525d Merge pull request elastic/elasticsearch#4019 from cjcenizal/chore/roles-test-selectors
Add data-test-subj selectors for Indices Privileges inputs and buttons in Edit Role view.

Original commit: elastic/x-pack-elasticsearch@fe764e3f96
2016-11-22 08:27:26 -08:00
Tanguy Leroux c9b3de6f23 Make HttpRequest toXContent / parse method coherent (elastic/elasticsearch#4153)
This commit changes the toXContent() method so that it generates content that can be parsed again by the parse() method. Before this commit, the authentication of the HTTP request is rendered as:

{ "auth": {"username": "foo", "password": "bar" } }

but the parsing method expects the authentication type to be a root object:

{ "auth":  { "basic" :  {"username": "foo", "password": "bar" } } }

The toXContent method has been adapted to include the type of authentication in the generated content.

Original commit: elastic/x-pack-elasticsearch@b740466109
2016-11-22 11:24:06 +01:00
Tanguy Leroux efe6524253 Mute JiraIssueTests.toToXContent()
Until "https://github.com/elastic/x-plugins/pull/4153" is solved

Original commit: elastic/x-pack-elasticsearch@c7720faddf
2016-11-22 10:07:27 +01:00
Alexander Reelsen a709d78e5a Tests: Ensure mock webserver binds always on arbitrary port (elastic/elasticsearch#4139)
This removes the mock webserver trying to bind to a port range, just
try to bind to any port.

Also removed unneeded wrapper class in the process.

Original commit: elastic/x-pack-elasticsearch@19b6ac393a
2016-11-22 09:24:32 +01:00
Tanguy Leroux 4978d3a8e0 [TEST] Fix JiraIssueTests.testEquals()
This commit fixes a test bug were a random field is picked out of an empty collection.

Original commit: elastic/x-pack-elasticsearch@a42dff7257
2016-11-22 09:09:44 +01:00
Jason Tedor 158ab2e724 Die with dignity on the network layer
When a fatal error is thrown on the network layer, such an error never
makes its way to the uncaught exception handler. This prevents the node
from being torn down if an out of memory error or other fatal error is
thrown while handling HTTP or transport traffic. This commit adds logic
to ensure that such errors bubble their way up to the uncaught exception
handler, even though Netty tries really hard to swallow everything.

Original commit: elastic/x-pack-elasticsearch@f76757674f
2016-11-21 22:14:45 -05:00
Tanguy Leroux 7c1f4326fc [TEST] Fix OldMonitoringIndicesBackwardsCompatibilityTests
This commit aims to fix the regularly failing test OldMonitoringIndicesBackwardsCompatibilityTests. It enables/disables monitoring data collection using time interval "-1" as well as stopping AgentService instances directly and checks multiple times if indices are still present at the end of the test.

closes elastic/elasticsearch#3999

Original commit: elastic/x-pack-elasticsearch@8ac785061a
2016-11-21 16:15:42 +01:00
Tanguy Leroux 18478d63c2 Watcher: Add JIRA action (elastic/elasticsearch#4014)
closes elastic/elasticsearch#493

Original commit: elastic/x-pack-elasticsearch@6b7387d3e4
2016-11-21 10:52:55 +01:00
Tim Vernum 74b0a1e71a Record audit trail even if indicies-resolver throws exception (elastic/elasticsearch#4116)
* Record audit trail even if indicies-resolver throws exception

If the IndicesAndAliasesResolver throws an exception, treat is as "accessDenied" for the purpose of the audit-trail.
This can occur when an index request has a wildcard that doesn't match (and "allowNoIndices" is false)

Closes elastic/elasticsearch#3719

Original commit: elastic/x-pack-elasticsearch@ca6567e5ed
2016-11-21 09:18:49 +11:00
Spencer 1ae83f65a4 Merge pull request elastic/elasticsearch#4074 from spalger/fix/xpack-info-races
Fix xPackInfo race conditions

Original commit: elastic/x-pack-elasticsearch@909b585120
2016-11-18 10:37:34 -07:00
Tim Vernum ae6eb0d159 Enforce username validation on PUT security/user (elastic/elasticsearch#4118)
Validation was being applied within UsersTool but not via the REST API
This also causes some validation messages in PutUser to change.

Closes elastic/elasticsearch#4018

Original commit: elastic/x-pack-elasticsearch@8e02146dee
2016-11-18 12:33:45 +11:00
CJ Cenizal ec19c10464 Merge pull request elastic/elasticsearch#4102 from cjcenizal/improvement/consistent-login-logo
Use kibanaWelcomeLogo in login form, for visual consistency with the loading screen.

Original commit: elastic/x-pack-elasticsearch@5f9f240458
2016-11-17 11:37:35 -08:00
Simon Willnauer cc22888417 Stabelize RemoteIndexAuditTrailStartingTests and improve IndexAuditTrail (elastic/elasticsearch#4112)
RemoteIndexAuditTrailStartingTests has been failing quite often due to several
race conditions. This change simplifies the test (one node per cluster, local and
remote) and fixes some issues in IndexAuditTrail. The interrupt based shutdown has
been removed from the `QueueConsumer` and an additional health call has been added
to trigger another start attempt if the first one failed. This stabilize the test
that now run in 1 second rather than 1 minute.

Original commit: elastic/x-pack-elasticsearch@a1c8131cd2
2016-11-17 17:57:15 +01:00
Jason Tedor 7309f11f51 Respond to exposing of executor service
This commit responds to a chance in core which modified the interface
for ThreadPool#executor and ThreadPool#generic to return an executor
service rather than an executor.

Relates elastic/elasticsearch#4107

Original commit: elastic/x-pack-elasticsearch@7c7c6a3b90
2016-11-17 09:19:15 -05:00
Simon Willnauer 92040ef72e Remove netty_3 support from xpack (elastic/elasticsearch#4097)
This is a followup from elastic/elasticsearchelastic/elasticsearch#21590 and needs to be
committed first or at the same time since netty_3 is removed

Original commit: elastic/x-pack-elasticsearch@131d74dd6b
2016-11-17 12:44:24 +01:00
Adrien Grand a5e410ba59 Remove expectations about store throttling stats now that it has been removed.
Original commit: elastic/x-pack-elasticsearch@244afb234a
2016-11-17 10:13:29 +01:00
Adrien Grand 67cc424303 Remove call to the store throttling stats.
Store throttling has been removed in elastic/elasticsearchelastic/elasticsearch#21573.

Original commit: elastic/x-pack-elasticsearch@40bcb51101
2016-11-17 09:48:26 +01:00
Nik Everett 042072410c Rename some tests from IT to Tests (elastic/elasticsearch#4106)
If these tests were in `:core` then then `IT` would be an appropriate
suffix, but in xplugins they should have `Tests`. This moves them
from the `integTest` task to the `test` task which is a good idea
because it lets them run in parallel with the other tests. Naming
them `IT` means that they are run not in parallel and they are run
with a running instance of Elasticsearch which they don't need.

This cuts the build from 15.5 minutes to 13.5 minutes for me.

Original commit: elastic/x-pack-elasticsearch@7b4bcf8bc5
2016-11-16 17:15:34 -05:00
jaymode 782fb6ad41 test: fix testDefaultMetaFields after adding _seq_no
Original commit: elastic/x-pack-elasticsearch@97faea1dd1
2016-11-16 12:32:28 -05:00
jaymode 766b89b2fd test: move indices:admin/seq_no/global_checkpoint_sync to handlers
Original commit: elastic/x-pack-elasticsearch@89ae75de6e
2016-11-16 12:24:18 -05:00
jaymode 586a8d4a00 add _seq_no field to allowed metafields
Original commit: elastic/x-pack-elasticsearch@875cbea3e0
2016-11-16 12:21:15 -05:00
Jason Tedor 52eec4736d Add global checkpoint to known actions/handlers
This commit adds the global checkpoint action to the known
action/handlers.

Original commit: elastic/x-pack-elasticsearch@db083911d2
2016-11-16 11:58:51 -05:00
Jason Tedor 5426a86ba0 Fix compilation issue introduced by seq. no merge
This commit fixes a compilation issue introduced by the merge of
sequence numbers branch into master. This merge introduced a new
constructor parameter for ShardStats.

Original commit: elastic/x-pack-elasticsearch@b234b8ee50
2016-11-16 11:49:57 -05:00
Nik Everett 260a51fabe Disabled testDynamicIndexAction
It is failing consistently.

Original commit: elastic/x-pack-elasticsearch@21c96694bd
2016-11-15 21:24:29 -05:00
Nik Everett fedca4ae31 Add bwc index for 5.0.1 release
Original commit: elastic/x-pack-elasticsearch@92bc318313
2016-11-15 19:12:29 -05:00
Jay Modi 31c851f5c2 migrate authentication service to an async model
This commit migrates the authentication service to an asynchronous model where we use listeners
instead of blocking and waiting for the authentication to return. This is the first part of making
authentication asynchronous as we still have blocking I/O inside of realms.

See elastic/elasticsearch#3790

Original commit: elastic/x-pack-elasticsearch@9339af4af8
2016-11-15 13:01:49 -05:00
jaymode 68c026d273 retain all user information for a run as request
In the authentication service, we currently only copy the username and roles of the
user that was authenticated but we should instead preserve all of their information
in the newly created user object. This change does that through the user of a new
constructor in the user class that takes in both users.

Closes elastic/elasticsearch#3877

Original commit: elastic/x-pack-elasticsearch@7455078841
2016-11-15 10:57:46 -05:00
jaymode ddb032b71c test: disable auto minimum master nodes for NoMasterNodeTests
Original commit: elastic/x-pack-elasticsearch@59e0b3e97e
2016-11-15 10:33:59 -05:00
jaymode 27cb25581b unknown run as users should not be allowed to execute any APIs
If a authenticated user with run as permission attempts to run as an unknown user, the unknown
user will be assigned the default role and anonymous role if enabled. This change prevents this
from happening as we require the run as user to have been looked up by a realm.

Closes elastic/elasticsearch#3878

Original commit: elastic/x-pack-elasticsearch@034f44757d
2016-11-15 09:47:45 -05:00
Tanguy Leroux 4badf28a8d Add Vagrant Gradle plugin (elastic/elasticsearch#3993)
This commit adds a new Gradle sub project that makes use of the VagrantTestPlugin in order to test the installation of X-Pack.

Original commit: elastic/x-pack-elasticsearch@e09db6602c
2016-11-15 15:30:13 +01:00
Boaz Leskes 667bb340b4 Update tests for new auto management of min master nodes (elastic/elasticsearch#4068)
The internal test cluster now auto manages min_master_nodes  ( see https://github.com/elastic/elasticsearch/pull/21458 ). This requires some code changes but also changes the timings of forming a cluster. This has had a funny side effect where the master is no longer always the first node to be started in the cluster. This caused issues with watcher tests which freeze time.

Original commit: elastic/x-pack-elasticsearch@1e5ea8ae94
2016-11-15 13:42:59 +00:00
Yannick Welsch 7b165504dc Use project-defined Java installation for keytool (elastic/elasticsearch#4066)
Companion commit for elastic/elasticsearchelastic/elasticsearch#21540

Original commit: elastic/x-pack-elasticsearch@a1c21ece25
2016-11-15 09:32:04 +01:00
Ryan Ernst 207feb2fa2 Fix test lookup of Discovery to cast instead of lookup in injector directly
Original commit: elastic/x-pack-elasticsearch@2718dab928
2016-11-14 23:27:02 -08:00
Ryan Ernst 190c036932 Fix test to use TestZenDiscovery to get access to pings
Original commit: elastic/x-pack-elasticsearch@83ea58c2dd
2016-11-14 22:09:19 -08:00
Ryan Ernst 96ba09436e Tests: Use TestZenDiscovery instead of MockZenPing (elastic/elasticsearch#4052)
This is the xplugins side of elastic/elasticsearchelastic/elasticsearch#21488

Original commit: elastic/x-pack-elasticsearch@d3db54498a
2016-11-14 22:00:53 -08:00
Ryan Ernst 3a03ccf548 Merge pull request elastic/elasticsearch#4071 from rjernst/less_generics
Remove generics from ActionRequest

Original commit: elastic/x-pack-elasticsearch@8b9d9fb947
2016-11-14 16:31:47 -08:00
Ryan Ernst f2c4d1f4da Remove generics from ActionRequest
x-plugins side of elastic/elasticsearchelastic/elasticsearch#21556

Original commit: elastic/x-pack-elasticsearch@a8e8873c84
2016-11-14 15:36:46 -08:00
Ryan Ernst 23e6cab7f1 Merge pull request elastic/elasticsearch#4044 from rjernst/realm_sig
Extensions: Make resource watcher available to custom realms

Original commit: elastic/x-pack-elasticsearch@3cb494e98d
2016-11-14 12:38:27 -08:00
jaymode a893f0d646 test: mock clusterservice to prevent NPE when remote indexing
This change mocks the ClusterService and sets it up so that when remote indexing, we see the
current node as the master.

Original commit: elastic/x-pack-elasticsearch@1f26b3df1f
2016-11-14 14:16:11 -05:00
Jay Modi 64288e9f37 Do not execute blocking calls on the cluster state update thread
This commit stops the index audit trail from executing blocking calls on the cluster
state update thread. Blocking calls were executed when indexing to a remote cluster
to get that cluster's state and also possibly put a template and mappings.

Closes elastic/elasticsearch#3989

Original commit: elastic/x-pack-elasticsearch@fc42efc639
2016-11-14 12:52:29 -05:00
jaymode 2ab7e52c79 improve comment
Original commit: elastic/x-pack-elasticsearch@a3662a81a2
2016-11-14 12:51:21 -05:00
Tim Sullivan b82be3de81 Monitoring ui add status column to indices (elastic/elasticsearch#3913)
* monitoring ui- add status column to indices listing

* add space before sort icon

* correctly identify sortColObj

* make metrics on index listing bigger

Original commit: elastic/x-pack-elasticsearch@01197214a6
2016-11-14 10:49:35 -07:00
jaymode 8285fbdd46 address feedback
Original commit: elastic/x-pack-elasticsearch@7f7f2c0e1f
2016-11-14 10:33:47 -05:00
jaymode 8e0f5f905e Merge branch 'master' into audit_index_csupdate
Original commit: elastic/x-pack-elasticsearch@5ca98373c7
2016-11-14 09:43:57 -05:00
Yannick Welsch 9d5ebe9e2a Use project-defined Java installation for keytool
Companion commit for elastic/elasticsearchelastic/elasticsearch#21540

Original commit: elastic/x-pack-elasticsearch@aa4e2df5bf
2016-11-14 15:43:11 +01:00