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

[ILM] Fix Index Management not loading when ILM enricher errors out #28108

Merged
merged 4 commits into from
Jan 7, 2019

Conversation

jen-huang
Copy link
Contributor

@jen-huang jen-huang commented Jan 4, 2019

Fixes #28087

On Cloud, Index Management fails to load. This fixes the issue by:

  1. Only loading ILM data enricher for Index Management if the ILM UI is enabled (ILM UI is disabled by default on Cloud)
  2. Adding handling for any data enrichers that error out

Locally, this can be tested by setting xpack.ilm.ui.enabled: false in kibana.yml and changing this request URL to /*/_ilm/somebadurl. Without this fix, observe that Index Management page shows no indices (no system indices either) and displays an error toast. After applying this fix, page should function normally.

In addition, I also found that ILM is extending Index Management UI ("Add lifecycle policy" as a management option, etc) regardless of xpack.ilm.ui.enabled, I've adjust the extension registration so that they are only registered when UI is enabled.

@jen-huang jen-huang added review v7.0.0 v6.6.0 Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v6.7.0 labels Jan 4, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui

@jen-huang jen-huang changed the title Fix/ilm failure [ILM] Fix Index Management not loading when ILM enricher errors out Jan 4, 2019
@jen-huang jen-huang requested a review from bmcconaghy January 4, 2019 20:42
@elasticmachine
Copy link
Contributor

💔 Build Failed

@jen-huang
Copy link
Contributor Author

Failed on unrelated test (#27922):

12:49:26  FAIL  plugins/xpack_main/public/hacks/telemetry.test.js
12:49:26   ● telemetry class › _checkReportStatus › returns false if last report is too recent
12:49:26 
12:49:26     expect(received).toBe(expected) // Object.is equality
12:49:26 
12:49:26     Expected: false
12:49:26     Received: true
12:49:26 
12:49:26       132 |       const telemetry = new Telemetry(mockInjectorFromObject(injector), mockFetchTelemetry);
12:49:26       133 | 
12:49:26     > 134 |       expect(telemetry._checkReportStatus()).toBe(false);
12:49:26           |                                              ^
12:49:26       135 |     });
12:49:26       136 | 
12:49:26       137 |     test('returns true if last report is not defined', () => {
12:49:26 
12:49:26       at Object.toBe (plugins/xpack_main/public/hacks/telemetry.test.js:134:46)

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@bmcconaghy bmcconaghy left a comment

Choose a reason for hiding this comment

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

Code LGTM

@jen-huang jen-huang merged commit a5fdc8e into elastic:master Jan 7, 2019
@jen-huang jen-huang deleted the fix/ilm-failure branch January 7, 2019 17:35
jen-huang added a commit to jen-huang/kibana that referenced this pull request Jan 7, 2019
…lastic#28108)

* Only load ILM data enricher if UI is enabled

* Silently swallow errors from data enrichers

* Only add index management ILM extensions if ILM UI is enabled
jen-huang added a commit to jen-huang/kibana that referenced this pull request Jan 7, 2019
…lastic#28108)

* Only load ILM data enricher if UI is enabled

* Silently swallow errors from data enrichers

* Only add index management ILM extensions if ILM UI is enabled
jen-huang added a commit that referenced this pull request Jan 7, 2019
…28108) (#28191)

* Only load ILM data enricher if UI is enabled

* Silently swallow errors from data enrichers

* Only add index management ILM extensions if ILM UI is enabled
jen-huang added a commit that referenced this pull request Jan 8, 2019
…28108) (#28192)

* Only load ILM data enricher if UI is enabled

* Silently swallow errors from data enrichers

* Only add index management ILM extensions if ILM UI is enabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v6.6.0 v6.7.0 v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot open Index Management on the cloud instance
3 participants