Skip to content

Conversation

@ArafatKhan2198
Copy link
Contributor

@ArafatKhan2198 ArafatKhan2198 commented Feb 24, 2023

What changes were proposed in this pull request?

A lot of customers were facing issues Ozone service-related WebUI not opening with a 404 error. The issue can be fixed by restarting, but during the restart, a jetty-0_0_0_0-*/webapp folder is created, and the customer noticed that such a folder does not exist on the host with access issues. The customer performed manual restarts on each node and observed that the problem was resolved by creating a new jetty-0_0_0_0-*/webapp folder.

After investigating we can confirm that the ozone code is not responsible for the deletion of the contents in the tmp directory. It appears that an external program is responsible for the deletion.

The main culprit for deletion is the Linux program called systemd-tmpfiles-clean.timer . This program is designed to clean up temporary files that are generated by the system. By default, it runs daily and removes files and directories that are older than 3 days.

To avoid this issue, it is recommended to configure Jetty to use a dedicated directory for its temporary files and directories, rather than the system's temporary directory. We can do this by changing the ozone.http.basedir property in the Ozone Service Advanced Configuration Snippet for the ozone-conf/ozone-site.xml file. It is suggested that this property should be set to a directory such as /data/ozone that already exists and has sufficient permissions in HDFS.

In case if this property is not set, then fall back to the default property.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-6176

How was this patch tested?

Added Unit-Tests for directory creation and also checked it manually in a local docker cluster

@ArafatKhan2198
Copy link
Contributor Author

@sadanand48 @ChenSammi @jojochuang can you please take a look!

@ArafatKhan2198 ArafatKhan2198 requested review from devmadhuu and removed request for ChenSammi February 26, 2023 05:56
@kerneltime
Copy link
Contributor

kerneltime commented Feb 28, 2023

One downside of this approach is that the directory is only cleaned up on clean exits (and if persistTempDirectory is false).
Another alternative might be to set a base dir for jetty, which is cleaned up on start and populated again.

Copy link
Contributor

@jojochuang jojochuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a very minor comment otherwise it looks all good.

@jojochuang
Copy link
Contributor

Review comments are addressed and test checks all came back green. I'll merging this PR now.

@jojochuang jojochuang merged commit 3cc0794 into apache:master Mar 2, 2023
sadanand48 pushed a commit to sadanand48/hadoop-ozone that referenced this pull request Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants