Commit Graph

294 Commits

Author SHA1 Message Date
Ryan Ernst 8fc51380de Tests: improve logging for vagrant to emit entire output on failure
This change makes the vagrant tasks extend LoggedExec, so that the
entire vagrant output can be dumped on failure (and completely logged
when using --info). It should help for debugging issues like #18122.
2016-05-04 17:29:23 -07:00
Jason Tedor 4c6cf7ee88 Pass ES_JAVA_OPTS to JVM for plugins script
This commit adds support for ES_JAVA_OPTS to the elasticsearch-plugin
script.

Relates #18140
2016-05-04 12:48:39 -04:00
Alexander Reelsen f71eb0b888 Version: Set version to 5.0.0-alpha2 2016-04-26 09:30:26 +02:00
Lee Hinman 9da88a99da Fix exit code
Exit with proper exit code (1) and an error message if elasticsearch
executable binary does not exists or has insufficient permissions to
execute.

Squashed commit of the following:

commit 9768d316303418ba4f9c96d3f87c376048a1b1bc
Author: Puru <tuladharpuru@gmail.com>
Date:   Fri Apr 22 23:26:47 2016 +0545

    Fixed ES_HOME typo

commit 79a2b0394297f8b02b6f71b71ba35ff79f1a684e
Author: Puru <tuladharpuru@gmail.com>
Date:   Sun Apr 10 11:00:24 2016 +0545

    Improve elasticsearch startup script test

    Added improvement as per conversation in https://github.com/elastic/elasticsearch/pull/17082#issuecomment-206459613

commit 7be38e1fefd4baa6ccdbdc14745c00f6dc052e0c
Author: Puru <tuladharpuru@gmail.com>
Date:   Wed Mar 23 13:23:52 2016 +0545

    Add elasticsearch startup script test

    The test ensures that elasticsearch startup script exists and is executable.

commit d10eed5c08260fa9c158a4487bbb3103a8d867ed
Author: Puru <tuladharpuru@gmail.com>
Date:   Wed Mar 23 12:30:25 2016 +0545

    Fixed IF syntax and failure message

commit 6dc66f616545572485b4d43bee05a4cbbf1bed72
Author: Puru <tuladharpuru@gmail.com>
Date:   Sat Mar 12 11:08:11 2016 +0545

    Fix exit code

    Exit with proper exit code (1) and an error message if elasticsearch executable binary does not exists or has insufficient permissions to execute.
2016-04-22 11:48:05 -06:00
Lee Hinman 2539d94bc9 Merge remote-tracking branch 'dakrone/vagrant-umask' 2016-04-21 12:31:07 -06:00
Lee Hinman 4fca5f734a Explicitly set packaging permissions
This changes our packaging to be explicit about the permissions of files
and directories in the tar.gz, rpm, and deb packages. This is to protect
against a user having an incorrectly set umask when installing.

Additionally, plugins that are installed now have their permissions set
by the plugin installation so that plugins that may have been packaged
with incorrect permissions are secured.

Resolves #17634
2016-04-21 12:30:56 -06:00
Martijn van Groningen dd2184ab25 ingest: Streamline option naming for several processors:
* `rename` processor, renamed `to` to `target_field`
* `date` processor, renamed `match_field` to `field` and renamed `match_formats` to `formats`
* `geoip` processor, renamed `source_field` to `field` and renamed `fields` to `properties`
* `attachment` processor, renamed `source_field` to `field` and renamed `fields` to `properties`

Closes #17835
2016-04-21 13:40:43 +02:00
Lee Hinman a1e8fb794c Allow JSON with unquoted field names by enabling system property
In Elasticsearch 5.0.0, by default unquoted field names in JSON will be
rejected. This can cause issues, however, for documents that were
already indexed with unquoted field names. To alleviate this, a system
property has been added that can be enabled so migration can occur.

This system property will be removed in Elasticsearch 6.0.0

Resolves #17674
2016-04-19 09:14:13 -06:00
Lee Hinman 66adcb2962 [TEST] Fix extra backslash causing sed to hang
This caused sed to hang and the output never to show for the smoke test
command
2016-04-13 10:24:39 -06:00
Adrien Grand 82849a787a Add back the Version.V_5_0_0 constant. #17688 2016-04-13 10:00:37 +02:00
Jason Tedor a581d7cca4 Merge pull request #17675 from jasontedor/java-opts
Add JVM options configuration file
2016-04-12 23:07:40 -04:00
Jason Tedor 3879aa2a98 Add JVM options configuration file
This commit adds a new configuration file jvm.options to centralize and
simplify management of JVM options. This separates the configuration of
the JVM from the packaging scripts (bin/elasticsearch*, bin/service.bat,
and init.d/elasticsearch) simplifying end-user operational management of
custom JVM options.
2016-04-12 11:19:16 -04:00
Lee Hinman dd8afc9567 [TEST] Add extra logging for vagrant test output
The $user, $group, and $privileges are echoed when they are being
compared.
2016-04-11 09:36:50 -06:00
Adrien Grand 4391594e4c Use Settings.builder instead of settingsBuilder in ESSmokeClientTestCase. 2016-04-08 18:37:05 +02:00
Ryan Ernst 19567fb794 Add stop task for vagrant which wraps all halt tasks, instead of using clean 2016-04-06 14:15:23 -07:00
Ryan Ernst bfc708ee58 Merge pull request #17573 from rjernst/vagrant_boxes_param
Tests: Add vagrant.boxes gradle property
2016-04-06 13:33:45 -07:00
Ryan Ernst dc376fb21b Tweak packagingTest description formatting 2016-04-06 13:08:38 -07:00
Ryan Ernst 9794d371ef Always add halt tasks for all available boxes 2016-04-06 13:07:11 -07:00
Ryan Ernst 9f24de7ca8 Tests: Add vagrant.boxes gradle property
This change makes specifying which boxes to run vagrant tests on a
little easier. Previously there were two tasks, checkPackages and
checkPackagesAllDistros. With this change, there is a single
packagingTest task. The boxes to run on are specified using the
gradle property vagrant.boxes, which can be easily specified on the
command line, or in a gradle properties file. There are also two
alias names, 'sample' for a yum and apt box, and 'all' for all boxes.
2016-04-06 12:36:35 -07:00
Jason Tedor eb7ecb7296 Add test of plugin script if JAVA_HOME has a space 2016-04-06 13:28:56 -04:00
Clinton Gormley b87beeb05f Rename update-by-query REST tests to update_by_query 2016-03-29 13:13:49 +02:00
Nik Everett 0e6141e675 Replace is_true: took with took >= 0
This prevents tests from failing on machines that can finish the request
less than half a millisecond.
2016-03-28 13:03:48 -04:00
Jason Tedor 85b06f48cf Revert "Add debug logging for Vagrant upgrade test"
This reverts commit 7ecfa6e2ad.
2016-03-24 21:59:32 -04:00
Jason Tedor a0634b2442 Merge pull request #17197 from jasontedor/chown
Elasticsearch ownership for data, logs, and configs
2016-03-24 21:21:11 -04:00
Jason Tedor d22b5977de Ownership for data, logs, and configs for packages
This commit ensures that the data, logs, and config directories have the
proper ownership after the packages are installed. Additionally, this
commit ensures that the configs in /etc/elasticsearch are preserved
after removal of the RPM package.
2016-03-24 20:56:02 -04:00
Tal Levy cabc4b1636 add on_failure exception metadata to ingest document for verbose simulate 2016-03-24 16:11:47 -07:00
Alexander Reelsen baec7bc23c Tests: Fix vagrant test on debian
Debian asks during installation, if the configuration file should be updated.
This is asked via a prompt and thus hangs.

This adds an option to always update to the newer config file, so automated
installation keeps working.
2016-03-24 14:21:33 +01:00
Simon Willnauer e4e08b28ff [TEST] Use to wait for the node to start - it will wait for state recovery and not return 503 2016-03-24 11:06:40 +01:00
Jim Ferenczi da42f199bd Enforce isolated mode for all plugins
This commit removes the isolated option, each plugin have its own classloader.
2016-03-24 09:17:33 +01:00
Alexander Reelsen b2573858b6 Version: Set version to 5.0.0-alpha1
Change version, required a minor fix in the RPM building.
In case of a alpha/beta version, the release will contain alpha/beta
as the RPM version cannot contains dashes/tildes.
2016-03-24 08:36:08 +01:00
Jason Tedor 7ecfa6e2ad Add debug logging for Vagrant upgrade test 2016-03-23 23:12:16 -04:00
Jason Tedor 17dd60dd31 Merge pull request #17208 from jasontedor/install-plugin-permissions
Install plugin permissions
2016-03-23 18:44:47 -04:00
Jason Tedor 04e6e6c3e0 Fix cluster health API call 2016-03-23 17:06:45 -04:00
Jason Tedor 033167de5b Wait for yellow indices when running upgrade test
This commit makes the Vagrant upgrade test wait for yellow indices
before attempting to get documents from the upgraded Elasticsearch node.
2016-03-23 15:57:21 -04:00
Jason Tedor 8004c51c17 Add max size virtual memory check
This commit adds a bootstrap check on Linux and OS X for the max size of
virtual memory (address space) to the user running the Elasticsearch
process.

Closes #16935
2016-03-22 11:52:36 -04:00
Jason Tedor 5dc48e71d0 Use mock filesystem during install plugins tests
This commit sets up the default filesystem used during install plugins
tests. A hack is neeeded to handle the temporary directory because the
system property "java.io.tmpdir" will have been initialized to a value
that is sensible for the default filesystem, but not necessarily to a
value that makes sense for the mock filesystem in use during the
tests. This property is restored after each test.
2016-03-22 10:25:27 -04:00
Martijn van Groningen 8f22a01bbd ingest: Give the `foreach` processor access to the rest of the document.
Closes #17147
2016-03-22 10:32:13 +01:00
Jason Tedor 6db6c15d06 Add tests of POSIX handling for installing plugins
This commit refactors the unit tests for installing plugins to test
against mock filesystems (as well as the native filesystem) for better
test coverage. This commit also adds tests that cover the POSIX
attributes handling when installing plugins (e.g., ensuring that the
plugins directory has the right permissions, the bin directory has
execute permissions, and the config directory has the same owner and
group as its parent).
2016-03-21 09:02:25 -04:00
Jason Tedor a7793f7271 Cutover to elastic Vagrant boxes
This commit cuts the Vagrant tests over to the elastic Vagrant boxes.
2016-03-20 22:11:30 -04:00
Jason Tedor c3f6ad89ef Simplify module or plugin file checks 2016-03-18 11:50:49 -04:00
Jason Tedor d4abfb2a87 Centralize umask utilities in bats tests 2016-03-18 08:25:21 -04:00
Jason Tedor 6bd19cff67 Centralize existence check for modules and plugins 2016-03-17 22:34:33 -04:00
Jason Tedor 6ecfc7adbe Permissions tests for modules and plugins 2016-03-17 22:16:09 -04:00
Jason Tedor 9f73152940 Fix plugins permissions 2016-03-17 15:35:54 -04:00
Jason Tedor dacb96ba61 Fix plugin installation logging 2016-03-17 15:35:54 -04:00
Jason Tedor ba6820caeb Fix plugin file permissions tests 2016-03-17 15:35:54 -04:00
Jason Tedor ffc6ba9e20 Fix installed plugins check 2016-03-17 15:35:53 -04:00
Jason Tedor 9ed4646296 Plugin site-example no longer exists 2016-03-17 15:35:53 -04:00
Jason Tedor 9e739da1d9 Add new plugins 2016-03-17 15:35:53 -04:00
Jason Tedor ace45e8bda Add module tests 2016-03-17 15:35:53 -04:00