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

path.data config is not respected everywhere #142865

Closed
cdfa opened this issue Oct 6, 2022 · 1 comment · Fixed by #157659
Closed

path.data config is not respected everywhere #142865

cdfa opened this issue Oct 6, 2022 · 1 comment · Fixed by #157659
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:Operations Team label for Operations Team

Comments

@cdfa
Copy link

cdfa commented Oct 6, 2022

Kibana version: 8.4.1

Elasticsearch version: 8.4.1

Server OS version: 5.19.11-zen1-1-zen GNU/Linux

Browser version: Irrelavant

Browser OS version: Irrelavant

Original install method (e.g. download page, yum, from source, etc.): tarball

Describe the bug:
The path.data config option is not respected everywhere in the application.

Steps to reproduce:

  1. Download and extract the tarball
  2. Delete the data directory
  3. Set path.data to data2 in the config
  4. Start Kibana
  5. Observe that the data directory is recreated (in my case it contains a folder chromium-xxx

Expected behavior:
The directory at path.data is used for all data storage.

Screenshots (if relevant):

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Any additional context:
This is an issue for me because for my use case the tarball must be extracted by the root user and I get access denied errors when I try to run kibana as myself, because the data directory is not writable.
I also encountered a few other issues that I don't want to create a formal bug report for ATM, because it's easy enough to work around them:

  1. I had expected the path.data config to be resolved against the $ELASTIC_HOME environment variable, but it seems to be dependent on the location of one of the javascript files.
  2. The documentation says that Kibana looks for the config at $ELASTIC_HOME/config first, but instead the bin/kibana script tries to find the config find one relative to the script path (with symlinks removed).
@cdfa cdfa added the bug Fixes for quality problems that affect the customer experience label Oct 6, 2022
@botelastic botelastic bot added the needs-team Issues missing a team label label Oct 6, 2022
@bhavyarm bhavyarm added the Team:Operations Team label for Operations Team label Oct 7, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Oct 7, 2022
@Ikuni17 Ikuni17 self-assigned this May 5, 2023
Ikuni17 added a commit that referenced this issue May 15, 2023
Fixes #142865

## Summary

The user can set a path for local data storage through CLI or
`kibana.yml`, but this setting was not implemented and the default
`data` directory was being used.

There are a few instances of hard coded `data/xxx` paths in the codebase
for babel, ci and testing which are not applicable to production.

### Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
jasonrhodes pushed a commit that referenced this issue May 17, 2023
Fixes #142865

## Summary

The user can set a path for local data storage through CLI or
`kibana.yml`, but this setting was not implemented and the default
`data` directory was being used.

There are a few instances of hard coded `data/xxx` paths in the codebase
for babel, ci and testing which are not applicable to production.

### Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Ikuni17 added a commit to Ikuni17/kibana that referenced this issue May 18, 2023
Fixes elastic#142865

## Summary

The user can set a path for local data storage through CLI or
`kibana.yml`, but this setting was not implemented and the default
`data` directory was being used.

There are a few instances of hard coded `data/xxx` paths in the codebase
for babel, ci and testing which are not applicable to production.

### Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 9aa186e)

# Conflicts:
#	packages/kbn-utils/src/path/index.test.ts
#	packages/kbn-utils/src/path/index.ts
#	packages/kbn-utils/tsconfig.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Operations Team label for Operations Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants