close
The Wayback Machine - https://web.archive.org/web/20211113091128/https://github.com/elastic/elasticsearch/issues/74163
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

Use ES_TMPDIR instead of java.io.tmpdir #74163

Open
pgomulka opened this issue Jun 16, 2021 · 11 comments
Open

Use ES_TMPDIR instead of java.io.tmpdir #74163

pgomulka opened this issue Jun 16, 2021 · 11 comments

Comments

Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
@pgomulka
Copy link
Contributor

@pgomulka pgomulka commented Jun 16, 2021

We should ignore java.io.tmpdir and override it with ES_TMPDIR. I think that variable should be taken into account from the beginning of startup scripts (including JavaVersionChecker) and the value should be applied as java option to all java processes.

Java processes started before ES_JAVA_OPTS are parsed (JavaVersionChecker, TempDirectory, JvmOptionParser) can also create temporary files in /tmp if not provided with java.io.tmpdir
Most notably TempDirectory if ES_TMPDIR is not set will create a temporary dir in that directory - trying to find out system default tmp dir.
JavaVersionChecker and TempDirectory are run before JvmOptionParser is executed, hence these cannot know if java.io.tmpdir was set in jvm.options.

@elasticmachine
Copy link
Collaborator

@elasticmachine elasticmachine commented Jun 16, 2021

Pinging @elastic/es-core-infra (Team:Core/Infra)

Loading

@SriSatyaT
Copy link

@SriSatyaT SriSatyaT commented Jun 30, 2021

@pgomulka @rdnm Can I work on this issue?

Loading

@oscarmparedes
Copy link

@oscarmparedes oscarmparedes commented Jun 30, 2021

Hi, could someone explain how can we set the ES_TMPDIR parameter?, where is that value stored? is it only a environment variable, if so, this variable should be set as environment variable for the Elasticsearch user?, thanks. I am asking this because we found that our elastic environments could not start after setting /dev/shm and /tmp dirs to noexec. Setting this parameter in jvm.options to an Elasticsearch owned dir fixed the issue, but I think setting the environment variable is a better solution. Thanks.

Loading

@sankalpawadhiya
Copy link

@sankalpawadhiya sankalpawadhiya commented Aug 29, 2021

can I start working on it?

Loading

@pugnascotia
Copy link
Contributor

@pugnascotia pugnascotia commented Aug 31, 2021

We also need to keep in mind #77014, which is very relevant here.

Loading

@tejassinghsital
Copy link

@tejassinghsital tejassinghsital commented Sep 1, 2021

Hi Can i work on this issue or is it already assigned?

Loading

@pugnascotia
Copy link
Contributor

@pugnascotia pugnascotia commented Sep 1, 2021

I don't believe anyone is working on this issue right now.

Loading

@bitNcode
Copy link

@bitNcode bitNcode commented Sep 19, 2021

@pugnascotia I went through #77285 and its waiting for the pull request to be merged into the master. Can you please advise if this issue is resolved or still open to be resolved. If so then, I would like to look into it and resolve it. Between, I'm looking to contribute to this project for the first time and am very excited to resolve any open issue/bug on this product as a first time contrbutor.

Loading

@pugnascotia
Copy link
Contributor

@pugnascotia pugnascotia commented Sep 20, 2021

#77285 is just about changing the documentation, so the issue here is still valid.

I'm not sure whether we're fully scoped out the required work here - @pgomulka did you do any thinking about what code changes are required? From a brief glance, I'm guessing startup scripts and maybe the CLI launcher classes?

Loading

@bitNcode
Copy link

@bitNcode bitNcode commented Sep 21, 2021

@pugnascotia Thank you for letting me know about #77285. While going through the comments on this issue, I went through #77014 and #77053 and they are connected to this issue. So, if we solve this issue, then we solve the other 2 issues as well, though #77014 activity log says that it needs libffi library to be at 3.4.2. But, the latest version of JNA is using libffi-3.3.0.
I'll further study the code and go through the startup script, while the required work is fully scoped out.

Loading

@Quarkspeed
Copy link

@Quarkspeed Quarkspeed commented Oct 1, 2021

Hello!

Is there any way to find the given issue in the master branch?
I am new to Github and can't find the file or module which has to be worked on.

Thanks!

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment