summaryrefslogtreecommitdiff
path: root/distribution
AgeCommit message (Collapse)Author
2017-06-28Remove implicit 32-bit supportJason Tedor
We previously tried to maintain (while not formally supporting) 32-bit support, although we never tested this anywhere in CI. Since we do not formally support this, and 32-bit usage is very low, we have elected to no longer maintain 32-bit support. This commit removes any implication of 32-bit support. Relates #25435
2017-06-26Remove default path settingsJason Tedor
This commit removes the default path settings for data and logs. With this change, we now ship the packages with these settings set in the elasticsearch.yml configuration file rather than going through the default.path.data and default.path.logs dance that we went through in the past. Relates #25408
2017-06-26Remove path.conf settingJason Tedor
This commit removes path.conf as a valid setting and replaces it with a command-line flag for specifying a non-default path for configuration. Relates #25392
2017-06-22Fix use of spaces on Windows if JAVA_HOME not setJason Tedor
When JAVA_HOME is not set we try to detect the location of Java. If its location contains a space, due to a lack of quoting we will be unsuccessful in invoking Java. This commit adds the necessary quoting to handle this case. Relates #23822
2017-06-19Fix artifact locationNik Everett
Fix the location of the rpm and deb used for the packaging upgrade tests when upgrading from -SNAPSHOT version.
2017-06-16Remove assemble from build task when assemble removedNik Everett
Removes the `assemble` task from the `build` task when we have removed `assemble` from the project. We removed `assemble` from projects that aren't published so our releases will be faster. But That broke CI because CI builds with `gradle precommit build` and, it turns out, that `build` includes `check` and `assemble`. With this change CI will only run `check` for projects without an `assemble`.
2017-06-16Remove assemble task when not used for publishing (#25228)Nik Everett
Removes the `assemble` task from projects that are not published. This should speed up `gradle assemble` by skipping projects that don't need to be built. Which is useful because `gradle assemble` is how we cut releases.
2017-06-14When stopping via systemd only kill the JVM, not its control group (#25195)David Roberts
This prevents possible race conditions between the Elasticsearch JVM and plugin native controller processes that can cause the Elasticsearch shutdown to hang. The problem can happen when the JVM and the controller process receive a SIGTERM at almost the same time. (There's an assumption here that Elasticsearch will continue to use other mechanisms to kill native controller processes.)
2017-06-09Log checkout so SHA is knownJason Tedor
This commit changes the task type of the checkoutBwcBranch task to Exec from LoggedExec so that the output of the checkout command is shown. This enables us to see the SHA used for the checkout which can be useful when debugging a BWC break. Relates #25166
2017-06-09Remove incorrect bwc branch logic from masterjaymode
Commit bf007e8d936d82ed2d28c70da1a7366cfa862342 was a forward port of logic needed in 5.x to get the correct bwc branch. However, other changes on master meant that this forward port was not needed and actually broke the bwc tests. This change removes the incorrect if statement. Relates #25134
2017-06-08Fix branch logic for bwc tests in the same major version (#25134)jaymode
When testing against the previous 5.x release, the bwc project incorrectly would checkout the 5.x branch instead of the 5.5 branch as it still had the logic that applies for major versions bwc. This change adds a check to compare the major version when making the decision on the branch to use.
2017-06-06Honor masking of systemd-sysctl.serviceChristian Hofstaedtler
During package install on systemd-based systems, some sysctl settings should be set (e.g. vm.max_map_count). In some environments, changing sysctl settings plainly does not work; previously a global environment variable named ES_SKIP_SET_KERNEL_PARAMETERS was introduced to skip calling sysctl, but this causes trouble for: - configuration management systems, which usually cannot apply an env var when running a package manager - package upgrades, which will not have the env var set any more, and thus leaving the package management system in a bad state (possibly half-way upgraded, can be very hard to recover) This removes the env var again and instead of calling systemd-sysctl manually, tells systemd to restart the wrapper unit - which itself can be masked by system administrators or management tools if it is known that sysctl does not work in a given environment. The restart is not silent on systems in their default configuration, but is ignored if the unit is masked. Relates #24234
2017-06-02Adds nodes usage API to monitor usages of actions (#24169)Colin Goodheart-Smithe
* Adds nodes usage API to monitor usages of actions The nodes usage API has 2 main endpoints /_nodes/usage and /_nodes/{nodeIds}/usage return the usage statistics for all nodes and the specified node(s) respectively. At the moment only one type of usage statistics is available, the REST actions usage. This records the number of times each REST action class is called and when the nodes usage api is called will return a map of rest action class name to long representing the number of times each of the action classes has been called. Still to do: * [x] Create usage service to store usage statistics * [x] Record usage in REST layer * [x] Add Transport Actions * [x] Add REST Actions * [x] Tests * [x] Documentation * Rafactors UsageService so counts are done by the handlers * Fixing up docs tests * Adds a name to all rest actions * Addresses review comments
2017-06-01Remove import from InstallPluginCommandTestsJason Tedor
This commit removes an unused import from InstallPluginCommandTests.java.
2017-06-01Add purge option to remove plugin CLIJason Tedor
By default, the remove plugin CLI command preserves configuration files. This is so that if a user is upgrading the plugin (which is done by first removing the old version and then installing the new version) they do not lose their configuration file. Yet, there are circumstances where preserving the configuration file is not desired. This commit adds a purge option to the remove plugin CLI command. Relates #24981
2017-05-30Set number of processes in systemd unit fileJason Tedor
This commit sets the number of processes in the systemd unit file for Elasticsearch to meet the bootstrap checks. Relates #24970
2017-05-29Rework bwc snapshot projects to build up to two bwc versions (#24870)Nik Everett
Removes the `distribution:bwc` project in favor of `distribution:bwc-release-snapshot` and `distribution:bwc-stable-snapshot`. `distribution:bwc-release-snapshot` builds a snapshot of the latest release branch (5.4 now) if needed for backwards compatibility. `distribution:bwc-stable-snapshot` builds a snapshot of the latest stable branch (5.x now) if needed for backwards compatibility.
2017-05-24Add BWC packaging distributionsJason Tedor
Some packaging tests depend on snapshot versions of packaging distributions yet the build does not use a repository that includes such distributions. While we could add such a repository, a better strategy is to follow our approach for other BWC tests where we depend on a locally-compiled archive distribution. This commit adds a local compilation of packaging artifacts and substitutes these anywhere that we would otherwise depend on a snapshot of these artifacts. Relates #24861
2017-05-18remove remaining references to scripts directory (#24771)Colin Goodheart-Smithe
The packaging scripts still referenced the scripts directory which is now removed.
2017-05-17Scripting: Remove file scripts (#24627)Ryan Ernst
This commit removes file scripts, which were deprecated in 5.5. closes #21798
2017-05-17Build: Extract all ES versions into gradle properties (#24748)Ryan Ernst
This commit expands the logic for version extraction from Version.java to include a list of all versions for backcompat purposes. The tests using bwcVersion are converted to use this list, but those tests (rolling upgrade and backwards-5.0) are still not randomized; that will happen in another followup.
2017-05-17Handle parentheses in pathRuss Cam
The variable assignment needs to be quoted to correctly handle scenario where the path contains parentheses. Realtes #24731
2017-05-16Tests: Change rest test extension from .yaml to .yml (#24659)Ryan Ernst
This commit renames all rest test files to use the .yml extension instead of .yaml. This way the extension used within all of elasticsearch for yaml is consistent.
2017-05-15Remove Jython hacksJason Tedor
We had a hack in setting up permissions for tests to support testing the lang-python plugin. We also had a hack to prevent Log4j from loading a shaded version of Jansi provided by Jython. This plugin has been removed so these hacks are no longer necessary. Relates #24681
2017-05-09Fix handling of spaces in plugin script on WindowsJason Tedor
A previous fix for handling spaces in the Windows scripts should also be applied to the plugin script. This commit does that. Closes #24750
2017-05-06Fix plugin installation permissionsJason Tedor
When installing plugin permissions, we try to set the permissions on all installed files ourselves because a umask from the user could violate everything needed to get the permissions right. Sadly, directories were not handled correctly at all and so we were still left with broken installations with umasks like 0077. This commit fixes this issue, adds a thorough unit test for the situation, and most importantly, adds a test that sets the umask before installing the plugin. Relates #24527
2017-05-02Try not to lose stacktraces (#24426)Nik Everett
This adds `-XX:-OmitStackTraceInFastThrow` to the JVM arguments which *should* prevent the JVM from omitting stack traces on common exception sites. Even though these sites are common, we'd still like the exceptions to debug them. This also adds the flag when running tests and adapts some tests that had workarounds for the absense of the flag. Closes #24376
2017-04-27Plugins: Add support for platform specific plugins (#24265)Ryan Ernst
This commit adds support for plugins having a platform specific variant. It also adds unit tests for all official and maven urls.
2017-04-21Remove extra newline in RemovePluginCommand.javaJason Tedor
This commit removes an extra newline in RemovePluginCommand.java because it drives the OCD among us insane.
2017-04-21Fix delete of plugin directory on remove pluginJason Tedor
This commit fixes an issue when deleting the plugin directory while executing the remove plugin command. Namely, we take out a file descriptor on the plugin directory to traverse its contents to obtain the list of files to delete. We leaked this file descriptor. On Unix-based filesystems, this is not a problem, deleting the plugin directory deletes the plugin directory. On Windows though, a delete is not executed until the last file descriptor is closed. Since we leaked this file descriptor, the plugin was not actually deleted. This led to test failures that tried to cleanup left behind temporary directories but these test failures were just exposing this bug. This commit fixes this issue by ensuring that we close the file descriptor to the plugin directory when we are finished with it. Relates #24266
2017-04-21Use a marker file when removing a pluginJason Tedor
Today when removing a plugin, we attempt to move the plugin directory to a temporary directory and then delete that directory from the filesystem. We do this to avoid a plugin being in a half-removed state. We previously tried an atomic move, and fell back to a non-atomic move if that failed. Atomic moves can fail on union filesystems when the plugin directory is not in the top layer of the filesystem. Interestingly, the regular move can fail as well. This is because when the JDK is executing such a move, it first tries to rename the source directory to the target directory and if this fails with EXDEV (as in the case of an atomic move failing), it falls back to copying the source to the target, and then attempts to rmdir the source. The bug here is that the JDK never deleted the contents of the source so the rmdir will always fail (except in the case of an empty directory). Given all this silliness, we were inspired to find a different strategy. The strategy is simple. We will add a marker file to the plugin directory that indicates the plugin is in a state of removal. This file will be the last file out the door during removal. If this file exists during startup, we fail startup. Relates #24252
2017-04-21Build: Move plugin cli and tests to distribution tool (#24220)Ryan Ernst
The plugin cli currently resides inside the elasticsearch jar. This commit moves it into a plugin-cli jar. This is change alone is a no-op; it does not change anything about what is loaded at runtime. But it will allow easier testing (with fixtures in the future to test ES or maven installation), as well as eventually not loading these classes when starting elasticsearch.
2017-04-18Tests: Clean up rest test file handling (#21392)Ryan Ernst
This change simplifies how the rest test runner finds test files and removes all leniency. Previously multiple prefixes and suffixes would be tried, and tests could exist inside or outside of the classpath, although outside of the classpath never quite worked. Now only classpath tests are supported, and only one resource prefix is supported, `/rest-api-spec/tests`. closes #20240
2017-04-17Tests: Move cluster dependencies from runner to cluster (#24142)Ryan Ernst
After splitting integ tests into cluster configuration and the test runner task, we still have dependencies of the test runner added as deps of the cluster. This commit adds dependencies directly to the cluster, so that the runner can have other dependencies independent of what is needed for the cluster.
2017-04-15Revert "Ensure output for createClone task"Jason Tedor
This reverts commit 2620200ff7d945c5bc17d2b854b4a6a92fd2120e.
2017-04-14Remove customization of ES_USER and ES_GROUPLee Hinman
This removes the ability to configure Elasticsearch to use custom username and/or group when it is run. Resolves #23848
2017-04-10Build: Support offline build of bwc zip (#24037)Ryan Ernst
The bwc checkout for backcompat tests currently always tries to fetch the latest from the upstream remote. This change makes fetching from upstream conditional on not running an offline build.
2017-04-10Add the ability to include extra notices in a plugin's NOTICES file (#23898)David Roberts
Adds the option for a plugin to specify extra directories containing notices and licenses files to be incorporated into the overall notices file that is generated for the plugin. This can be useful, for example, where the plugin has a non-Java dependency that itself incorporates many 3rd party components.
2017-04-06Ensure output for createClone taskJason Tedor
This commit changes the task type from LoggedExec to Exec for the BWC createClone task to ensure that we can get some debug output.
2017-04-05Tests: Extend rest test timeout to 30 minutes for windows (#23912)Ryan Ernst
Windows rest tests consistenly fail because the filesystem appears to be an order of magnitude slower than that of *nix, at least in the context of our rest tests. This commit overrides the suite timeout to 30 mins for windows. From past failures, it appears this should be enough, as the tests seem to fail when they are almost complete. The default suite timeout for ESTestCase is 20 mins, so this leaves ample buffer for windows shenanigans.
2017-03-29Build: Ensure upstream check works even when using info logging (#23804)Ryan Ernst
The LoggedExec task does not capture output when info logging is enabled. This commit changes the upstream check to use Exec directly, so as not to break when info logging is enabled.
2017-03-29Build: Use filesystem agnostic printing of bwc dir path (#23803)Ryan Ernst
This will use File.toString() for the `git clone` command, which will automatically be correct for whatever system the build is running on. closes #23784
2017-03-29Build: Find bwc version during build (#23801)Ryan Ernst
We currently have the last minor version of the previous major hardcoded in tests like rolling upgrade. This change programatically finds this during gradle initialization by parsing versions from Version.java.
2017-03-27Build: Use GradleBuild task for invoking 5.x checkout build (#23770)Ryan Ernst
This commit switches from executing gradle when building the bwc testing zip through Exec, to using GradleBuild. In addition to not depending on gradle being in the PATH, it also has the added benefit of much better logging while the bwc build is going on (the actual tasks show up as tasks of a subproject within the current build).
2017-03-24Fetch all upstream refs for bwc checkoutRyan Ernst
2017-03-24Fix bwc checkout upstream remote checkRyan Ernst
2017-03-23Tests: Use local clone build of 5.x with bwc tests (#22946)Ryan Ernst
The current rest backcompat tests, which run against a mixed cluster of 5.x and 6.0 nodes, depend on snapshot builds of 5.x. However, this has the potential for inconsistency that results in CI failures, and happens quite often, whenever some backcompat logic is added to 5.x, but the bwc test on master fails because the 5.x code has not yet been published as a snapshot. This change creates a git clone of the 5.x branch, builds the zip distribution, and ties that into gradle substitutions for the 5.x version.
2017-03-21Packaging: Remove classpath ordering hack (#23596)Ryan Ernst
After the removal of the joda time hack we used to have, we can cleanup the codebase handling in security, jarhell and plugins to be more picky about uniqueness. This was originally in #18959 which was never merged. closes #18959
2017-02-22Build: Rework integ test setup and shutdown to ensure stop runs when desired ↵Ryan Ernst
(#23304) Gradle's finalizedBy on tasks only ensures one task runs after another, but not immediately after. This is problematic for our integration tests since it allows multiple project's integ test clusters to be simultaneously. While this has not been a problem thus far (gradle 2.13 happened to keep the finalizedBy tasks close enough that no clusters were running in parallel), with gradle 3.3 the task graph generation has changed, and numerous clusters may be running simultaneously, causing memory pressure, and thus generally slower tests, or even failure if the system has a limited amount of memory (eg in a vagrant host). This commit reworks how integ tests are configured. It adds an `integTestCluster` extension to gradle which is equivalent to the current `integTest.cluster` and moves the rest test runner task to `integTestRunner`. The `integTest` task is then just a dummy task, which depends on the cluster runner task, as well as the cluster stop task. This means running `integTest` in one project will both run the rest tests, and shut down the cluster, before running `integTest` in another project.
2017-02-17Enforce Content-Type requirement on the rest layer and remove deprecated ↵Jay Modi
methods (#23146) This commit enforces the requirement of Content-Type for the REST layer and removes the deprecated methods in transport requests and their usages. While doing this, it turns out that there are many places where *Entity classes are used from the apache http client libraries and many of these usages did not specify the content type. The methods that do not specify a content type explicitly have been added to forbidden apis to prevent more of these from entering our code base. Relates #19388