Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packaging: Unmark systemd service file as a config file #29004

Merged
merged 16 commits into from
May 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion distribution/packages/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ Closure commonPackageConfig(String type, boolean oss) {
}

// ========= systemd =========
configurationFile '/usr/lib/systemd/system/elasticsearch.service'
into('/usr/lib/tmpfiles.d') {
from "${packagingFiles}/systemd/elasticsearch.conf"
}
Expand Down
1 change: 1 addition & 0 deletions docs/CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ This section summarizes the changes in each release.
<<write-thread-pool-fallback, Removed `thread_pool.bulk.*` settings and
`es.thread_pool.write.use_bulk_as_display_name` system property>> ({pull}29609[#29609])

<<systemd-service-file-config, Systemd service file is no longer marked as configuration>> ({pull}29004[#29004])
<<remove-suggest-metric, Removed `suggest` metric on stats APIs>> ({pull}29635[#29635])

<<remove-field-caps-body, In field capabilities APIs, removed support for providing fields in the request body>> ({pull}30185[#30185])
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/migration/migrate_7_0.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Elasticsearch 6.x in order to be readable by Elasticsearch 7.x.
* <<breaking_70_indices_changes>>
* <<breaking_70_mappings_changes>>
* <<breaking_70_search_changes>>
* <<breaking_70_packaging_changes>>
* <<breaking_70_plugins_changes>>
* <<breaking_70_analysis_changes>>
* <<breaking_70_api_changes>>
Expand All @@ -41,6 +42,7 @@ include::migrate_7_0/cluster.asciidoc[]
include::migrate_7_0/indices.asciidoc[]
include::migrate_7_0/mappings.asciidoc[]
include::migrate_7_0/search.asciidoc[]
include::migrate_7_0/packaging.asciidoc[]
include::migrate_7_0/plugins.asciidoc[]
include::migrate_7_0/api.asciidoc[]
include::migrate_7_0/java.asciidoc[]
Expand Down
10 changes: 10 additions & 0 deletions docs/reference/migration/migrate_7_0/packaging.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[[breaking_70_packaging_changes]]
=== Packaging changes

[[systemd-service-file-config]]
==== systemd service file is no longer configuration

The systemd service file `/usr/lib/systemd/system/elasticsearch.service`
was previously marked as a configuration file in rpm and deb packages.
Overrides to the systemd elasticsearch service should be made
in `/etc/systemd/system/elasticsearch.service.d/override.conf`.
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,13 @@ setup() {
# The removal must disable the service
# see prerm file
if is_systemd; then
# Debian systemd distros usually returns exit code 3
missing_exit_code=4
if [ $(systemctl --version | head -1 | awk '{print $2}') -lt 231 ]; then
# systemd before version 231 used exit code 3 when the service did not exist
missing_exit_code=3
fi
run systemctl status elasticsearch.service
[ "$status" -eq 3 ]
[ "$status" -eq $missing_exit_code ]

run systemctl is-enabled elasticsearch.service
[ "$status" -eq 1 ]
Expand Down Expand Up @@ -166,7 +170,6 @@ setup() {

# The service files are still here
assert_file_exist "/etc/init.d/elasticsearch"
assert_file_exist "/usr/lib/systemd/system/elasticsearch.service"
}

@test "[DEB] purge package" {
Expand Down