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

[keystore] use get_keystore in server cli #72954

Merged
merged 4 commits into from
Jul 23, 2020
Merged

Conversation

jbudz
Copy link
Member

@jbudz jbudz commented Jul 22, 2020

A new helper util to get the correct keystore path was introduced during the deprecation of data/kibana.keystore. This was not used the the sibling cli read_keystore and was causing scenarios with writes to the config folder and reads from the data folder.

This was initially found in docker images but is not docker specific
Closes #72323

manual testing

rm -f {data,config}/kibana.keystore

before fix

the server inconrrectly reads from the data directory and starts when it should not

node scripts/kibana_keystore create
echo "foo" | node scripts/kibana_keystore.js add "fake_field" -x
node scripts/kibana

after fix

examples uses an invalid config value with an expected exit error on start

data path

node scripts/kibana_keystore create
mv config/kibana.keystore data/kibana.keystore
echo "foo" | node scripts/kibana_keystore.js add "fake_field" -x
node scripts/kibana

config path

node scripts/kibana_keystore create
echo "foo" | node scripts/kibana_keystore.js add "fake_field" -x
node scripts/kibana

@jbudz jbudz added review v7.10.0 v7.9.0 release_note:skip Skip the PR/issue when compiling release notes v8.0.0 Team:Operations Team label for Operations Team labels Jul 22, 2020
@elasticmachine
Copy link
Contributor

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

@jbudz jbudz requested a review from LeeDr July 22, 2020 20:24
@@ -34,7 +34,7 @@ node scripts/functional_tests --assert-none-excluded \
if [[ -z "$CODE_COVERAGE" ]] ; then
echo " -> building and extracting default Kibana distributable for use in functional tests"
cd "$KIBANA_DIR"
node scripts/build --debug --no-oss
node scripts/build --debug --no-oss --all-platforms
Copy link

Choose a reason for hiding this comment

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

I'm not clear what this change does. What platform(s) were we not building that we are now? And are we testing those other platforms somehow?

Copy link
Member Author

@jbudz jbudz Jul 22, 2020

Choose a reason for hiding this comment

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

it's a convenience asking ci to do a build for docker that will be reverted before merging - you'll see it on the upload report in jenkins. i'm planning on doing one more pass with that in your exact setup once the uploads are up

Copy link

@LeeDr LeeDr left a comment

Choose a reason for hiding this comment

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

LGTM - I didn't pull the PR for testing but will verify the fix in the next snapshot build.

@tylersmalley
Copy link
Contributor

Looks good to me after --all-platforms is removed.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@jbudz jbudz merged commit 119cb10 into elastic:master Jul 23, 2020
jbudz added a commit that referenced this pull request Jul 23, 2020
* [keystore] use get_keystore in server cli

* temporily add docker build so this can be retested in original env

* Revert "temporily add docker build so this can be retested in original env"

This reverts commit 25f401a.
jbudz added a commit that referenced this pull request Jul 23, 2020
* [keystore] use get_keystore in server cli

* temporily add docker build so this can be retested in original env

* Revert "temporily add docker build so this can be retested in original env"

This reverts commit 25f401a.
@jbudz
Copy link
Member Author

jbudz commented Jul 23, 2020

7.x: b11297d
7.9: 0b53182

gmmorris added a commit to gmmorris/kibana that referenced this pull request Jul 23, 2020
* master: (35 commits)
  Migrated karma tests to jest (elastic#72649)
  Migrate status page app to core (elastic#72017)
  Failing test: Jest Tests.src/plugins/vis_type_vega/public (elastic#71834)
  Fix Firefox TSVB flaky test with switch index patterns (elastic#72882)
  [ML] Fixing link to index management from file data visualizer (elastic#72863)
  test: 💍 add test for sub-expression variables (elastic#71644)
  fix bug (elastic#72809)
  [keystore] use get_keystore in server cli (elastic#72954)
  Show step number instead of incomplete step. (elastic#72866)
  Fix bug where user can't add an exception when "close alert" is checked (elastic#72919)
  [Monitoring] Fix issues displaying alerts (elastic#72891)
  [Ingest Manager] Add more Fleet concurrency tests elastic#71744 (elastic#72338)
  [Security Solution][Exceptions] - Update UI exceptions builder nested logic (elastic#72490)
  disable renovate masterIssue
  [ML] API integration tests for UPDATE data frame analytics endpoint (elastic#72710)
  [Uptime] Fix accessibility issue in Uptime app nav links (elastic#72926)
  [Maps] fix removing global filter from layer can cause app to start thrashing (elastic#72763)
  [Maps] fix blended layer aggregation error when using composite aggregation (elastic#72759)
  fix unexpected arguments to unload command
  Limits the upload size of lists to 9 meg size (elastic#72898)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported release_note:skip Skip the PR/issue when compiling release notes review Team:Operations Team label for Operations Team v7.9.0 v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kibana 7.9.0 docker won't read elasticsearch.password from keystore
5 participants