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

Make systemd-tmpfiles optional #3435

Merged

Conversation

mnasiadka
Copy link
Contributor

Description

Makes systemd-tmpfiles optional (when installing in container images not supplying systemd-tmpfiles)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Michal Nasiadka <[email protected]>
@mnasiadka mnasiadka force-pushed the systemd_tmpfiles_optional branch from 8b5a619 to 1d36d4b Compare April 24, 2023 06:36
@codecov-commenter
Copy link

codecov-commenter commented Apr 24, 2023

Codecov Report

Merging #3435 (1d36d4b) into main (9cdacda) will not change coverage.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##             main    #3435   +/-   ##
=======================================
  Coverage   91.74%   91.74%           
=======================================
  Files         172      172           
  Lines        4991     4991           
=======================================
  Hits         4579     4579           
  Misses        412      412           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@peterzhuamazon
Copy link
Member

Taking a look......

@peterzhuamazon
Copy link
Member

peterzhuamazon commented May 5, 2023

Verify that even if the /var/run/opensearch dir not created by systemd_tmpfiles, the dir will still be create by opensearch.

% sudo rm -rf /var/run/opensearch

% sudo systemctl start opensearch

% ll /var/run/opensearch
total 4
-rw-r--r-- 1 opensearch opensearch 4 May  5 19:58 opensearch.pid

% curl https://localhost:9200 -ku admin:admin
{
  "name" : <>,
  "cluster_name" : "opensearch",
  "cluster_uuid" : "bMDIYmUqQIqFWEiXJotLwA",
  "version" : {
    "distribution" : "opensearch",
    "number" : "2.7.0",
    "build_type" : "rpm",
    "build_hash" : "b7a6e09e492b1e965d827525f7863b366ef0e304",
    "build_date" : "2023-04-27T21:43:23.577631441Z",
    "build_snapshot" : false,
    "lucene_version" : "9.5.0",
    "minimum_wire_compatibility_version" : "7.10.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "The OpenSearch Project: https://opensearch.org/"
}

@peterzhuamazon
Copy link
Member

OSD despite having the code to create /var/run/opensearch-dashboards it will still not create pid file there due to exestart not specify that like in OS.

In fact both of them are creating pid file already in /run/<>.

This is probably some old code that is still generating the tmpfiles conf.

In reality no need to redirect pid to /var/run if they already exist in /run.

@peterzhuamazon peterzhuamazon merged commit 6bbc227 into opensearch-project:main May 5, 2023
@mnasiadka mnasiadka deleted the systemd_tmpfiles_optional branch May 6, 2023 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants