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

kibana-keystore requires kibana.yml starting 8.11.2 #172919

Closed
thbkrkr opened this issue Dec 8, 2023 · 2 comments · Fixed by #172951
Closed

kibana-keystore requires kibana.yml starting 8.11.2 #172919

thbkrkr opened this issue Dec 8, 2023 · 2 comments · Fixed by #172951
Labels
bug Fixes for quality problems that affect the customer experience Team:Operations Team label for Operations Team

Comments

@thbkrkr
Copy link
Contributor

thbkrkr commented Dec 8, 2023

In 8.11.1, it was possible to call kibana-keystore without kibana.yml:

> d run --rm --entrypoint bash -ti docker.elastic.co/kibana/kibana:8.11.1 -c 'rm config/kibana.yml && kibana-keystore'
Kibana is currently running with legacy OpenSSL providers enabled! For details and instructions on how to disable see https://www.elastic.co/guide/en/kibana/8.11/production.html#openssl-legacy-provider

  Usage: bin/kibana-keystore [command] [options]

  A tool for managing settings stored in the Kibana keystore

  Commands:
    create  [options]       Creates a new Kibana keystore
    list  [options]         List entries in the keystore
    add  [options] <key>    Add a setting to the keystore. Note: The value will be JSON parsed. Use quotes to force string inputs.
    remove  [options] <key> Remove a setting from the keystore
    show  [options] <key>   Displays the value of a single setting in the keystore. Pass the -o (or --output) parameter to write the setting to a file.
    help  <command>         get the help for a specific command

Since 8.11.2, it fails:

> d run --rm --entrypoint bash -ti docker.elastic.co/kibana/kibana:8.11.2 -c 'rm config/kibana.yml && kibana-keystore'
Kibana is currently running with legacy OpenSSL providers enabled! For details and instructions on how to disable see https://www.elastic.co/guide/en/kibana/8.11/production.html#openssl-legacy-provider
Error: ENOENT: no such file or directory, open '/usr/share/kibana/config/kibana.yml'
    at Object.openSync (node:fs:603:3)
    at readFileSync (node:fs:471:35)
    at readYaml (/usr/share/kibana/node_modules/@kbn/config/src/raw/read_config.js:20:69)
    at getConfigFromFiles (/usr/share/kibana/node_modules/@kbn/config/src/raw/read_config.js:56:18)
    at buildDataPaths (/usr/share/kibana/node_modules/@kbn/utils/src/path/index.js:41:82)
    at getDataPath (/usr/share/kibana/node_modules/@kbn/utils/src/path/index.js:71:36)
    at getKeystore (/usr/share/kibana/src/cli/keystore/get_keystore.js:21:63)
    at Object.<anonymous> (/usr/share/kibana/src/cli_keystore/cli_keystore.js:25:71)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1310:10)

One problem is that it is a breaking change that makes 8.11.2 not work with ECK, because ECK calls the kibana-keystore in an init container where kibana.yml is not present.

@thbkrkr thbkrkr added the bug Fixes for quality problems that affect the customer experience label Dec 8, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Dec 8, 2023
@delanni
Copy link
Contributor

delanni commented Dec 8, 2023

Caused by #157659 in #158426 - while the feature might be right, ECK is running on an init container without the config being present.

@jbudz jbudz added Team:Operations Team label for Operations Team and removed needs-team Issues missing a team label labels Dec 8, 2023
@elasticmachine
Copy link
Contributor

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

jbudz added a commit that referenced this issue Dec 8, 2023
This reverts commit 86d2f58.

Forward port of #172943 targeting
8.13 and 8.12. See the linked pr for 8.11.3 release notes.

Closes #172919
jbudz added a commit that referenced this issue Dec 8, 2023
This reverts commit 86d2f58.

#172919

Release note:
Fixes an issue where running `kibana-keystore` commands required
`kibana.yml` to exist.
kibanamachine pushed a commit that referenced this issue Dec 8, 2023
This reverts commit 86d2f58.

Forward port of #172943 targeting
8.13 and 8.12. See the linked pr for 8.11.3 release notes.

Closes #172919

(cherry picked from commit ee194d3)
kibanamachine referenced this issue Dec 19, 2023
#172970)

# Backport

This will backport the following commits from `main` to `8.12`:
- [Revert "fix/142865/path.data config unused (#158426)"
(#172951)](#172951)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"Jon","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-12-08T16:22:21Z","message":"Revert
\"fix/142865/path.data config unused (#158426)\" (#172951)\n\nThis
reverts commit 86d2f58.\r\n\r\nForward
port of #172943 targeting\r\n8.13
and 8.12. See the linked pr for 8.11.3 release notes.\r\n\r\nCloses
https://github.com/elastic/kibana/issues/172919","sha":"ee194d32a2e21baf6ae38a2e60e590ac3811b9f1","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","auto-backport","v8.12.0"],"number":172951,"url":"https://github.com/elastic/kibana/pull/172951","mergeCommit":{"message":"Revert
\"fix/142865/path.data config unused (#158426)\" (#172951)\n\nThis
reverts commit 86d2f58.\r\n\r\nForward
port of #172943 targeting\r\n8.13
and 8.12. See the linked pr for 8.11.3 release notes.\r\n\r\nCloses
https://github.com/elastic/kibana/issues/172919","sha":"ee194d32a2e21baf6ae38a2e60e590ac3811b9f1"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Jon <[email protected]>
Co-authored-by: Brad White <[email protected]>
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