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

Update onboarding interstitial to handle default Fleet assets #108193

Merged
merged 14 commits into from
Aug 17, 2021

Conversation

joshdover
Copy link
Contributor

@joshdover joshdover commented Aug 11, 2021

Summary

Fixes #107020

This updates the logic used to decide when to show the "add data" interstitial for new users to handle the case where Fleet server and the system package have been installed, but no user data has yet actually been ingested into the cluster.

This is intended to be a shorter-term solution with the long-term solution being solving #82851 more holistically by not installing all of the system package Kibana assets by default.

It follows the following logic:

  • Do any index-patterns exist?
    • If not, show add data interstitial.
    • If any index-patterns that are not metrics-* or logs-* exist, do not show the interstitial
    • Fetch GET /_cat/indices/metrics-*,logs-*
      • If an authorization error is thrown, don't show the interstitial. This can happen in the case where the user has either does not have the monitor cluster privilege or monitor index privilege for any index. In either case, the user is likely not to have privileges to add data.
      • Filter out metrics-elastic_agent* and logs-elastic_agent* indices from the response
      • If no other indices exist that contain documents, show the interstitial

Checklist

Delete any items that are not applicable to this PR.

@alexfrancoeur
Copy link

@joshdover I believe so, but want to double check, is this logic used only for the interstitial? And if so, is it a large effort to replace the logic (where there is some) in analytics applications? I've listed out the applications that are impacted here and they are primarily the "classic" Kibana apps. If it's too much out additional work, we can skip and revisit in another issue / PR, but I think it'd be good to have consistent logic for these apps and the interstitial. Let me know what you think

@joshdover
Copy link
Contributor Author

joshdover commented Aug 12, 2021

I believe so, but want to double check, is this logic used only for the interstitial? And if so, is it a large effort to replace the logic (where there is some) in analytics applications? I've listed out the applications that are impacted here and they are primarily the "classic" Kibana apps. If it's too much out additional work, we can skip and revisit in another issue / PR, but I think it'd be good to have consistent logic for these apps and the interstitial. Let me know what you think

Yes, this only affects the interstitial. I wanted to test this logic first before getting the Analytics apps involved, but I'll connect with them today to see how we can replicate this change in those flows as well.

Breaking this up into separate changes decreases the chances that we have an issue with backporting at least this change to 7.14.1.

@joshdover joshdover added auto-backport Deprecated - use backport:version if exact versions are needed release_note:fix Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Fleet Team label for Observability Data Collection Fleet team v7.14.1 v7.15.0 v8.0.0 labels Aug 12, 2021
@@ -41,7 +41,6 @@ export default function () {
)}`,
`--elasticsearch.username=${kibanaServerTestUser.username}`,
`--elasticsearch.password=${kibanaServerTestUser.password}`,
`--home.disableWelcomeScreen=true`,
Copy link
Contributor Author

@joshdover joshdover Aug 12, 2021

Choose a reason for hiding this comment

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

I believe we can remove this configuration now. We now have some logic that sets the localStorage value in the FTR when attempting to login to Kibana to handle this case in Cloud where we can't set this config value. This makes this unnecessary now.

I'll tackle that as a follow up task.

@joshdover joshdover marked this pull request as ready for review August 12, 2021 17:43
@joshdover joshdover requested review from a team as code owners August 12, 2021 17:43
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@joshdover joshdover requested a review from jen-huang August 12, 2021 17:44
Copy link
Contributor

@jen-huang jen-huang left a comment

Choose a reason for hiding this comment

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

Thanks a lot for working on this!

I tested locally by mimicking Cloud conditions (i.e. Fleet is set up, Fleet Server agent is enrolled and running), and also if Endpoint happens to get installed, thereby creating an empty metrics-endpoint.metadata_* index, by visiting the Security app. Under these conditions I confirmed that the interstitial modal is shown.

Then I enrolled a regular agent that collects system metrics, and unfortunately after data was ingested I was still seeing the interstitial modal. I did some debugging, see the rest of my review comments for where the new instance logic needs to be adjusted.

Copy link
Contributor

@jen-huang jen-huang left a comment

Choose a reason for hiding this comment

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

I retested the scenarios from my last review and the behavior is as expected now :D

@joshdover
Copy link
Contributor Author

joshdover commented Aug 17, 2021

Working on fixing some flakiness with the integration test when using the Fleet setup API before I merge this.

Copy link
Member

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

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

kibana-qa changes LGTM

@LeeDr
Copy link

LeeDr commented Aug 17, 2021

I have some questions on the logic;

It follows the following logic:

  • Do any index-patterns exist?

    • If not, show add data interstitial.

Is this really: If no index-patterns exist in the current space, and there are indices that I have at least view_index_metadata priv on, show the add data interstitial?

  • If any index-patterns that are not metrics-* or logs-* exist, do not show the interstitial

(in the current space)

  • Fetch GET /_cat/indices/metrics-*,logs-*

    • If an authorization error is thrown, don't show the interstitial. This can happen in the case where the user has either does not have the monitor cluster privilege or monitor index privilege for any index. In either case, the user is likely not to have privileges to add data.

I don't know what the part "the user is likely not to have privileges to add data" means. Meaning adding an index pattern?
AFAIK users don't need monitor cluster privilege or monitor index privilege to create index patterns or use them anywhere in Kibana (unless Fleet adds that requirement) https://www.elastic.co/guide/en/kibana/current/index-patterns.html

* Filter out `metrics-elastic_agent*` and `logs-elastic_agent*` indices from the response
* If no other indices exist that contain documents, show the interstitial

If no other indices exist that contain documents that the user has view_index_metadata privilege on, show the interstitial

** Also, are there actually two different interstitials? One where there aren't any index patterns in this space and there is data, and another when there aren't any index patterns and also no non-system index data? I've seen one page that lets me go to index patterns anyway.

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / general / X-Pack Fleet Functional Tests.x-pack/test/fleet_functional/apps/home/welcome·ts.home onboarding Welcome interstitial is displayed on a fresh install with Fleet setup executed

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches

[00:00:00]       │
[00:00:09]         └-: home onboarding
[00:00:09]           └-> "before all" hook in "home onboarding"
[00:00:09]           └-: Welcome interstitial
[00:00:09]             └-> "before all" hook for "is displayed on a fresh install with Fleet setup executed"
[00:00:09]             └-> "before all" hook for "is displayed on a fresh install with Fleet setup executed"
[00:00:09]               │ debg navigateToUrl http://localhost:61241/app/home#/home/undefined
[00:00:09]               │ debg browser[INFO] http://localhost:61241/app/home?_t=1629224746943#/home/undefined 281 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:00:09]               │
[00:00:09]               │ debg browser[INFO] http://localhost:61241/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:09]               │ debg currentUrl = http://localhost:61241/app/home#/home/undefined
[00:00:09]               │          appUrl = http://localhost:61241/app/home#/home/undefined
[00:00:09]               │ debg TestSubjects.find(kibanaChrome)
[00:00:09]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:00:10]               │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_8.0.0_001/AWW3_SG7QpyN_6JelIXpQg] update_mapping [_doc]
[00:00:10]               │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_8.0.0_001/AWW3_SG7QpyN_6JelIXpQg] update_mapping [_doc]
[00:00:10]               │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_8.0.0_001/AWW3_SG7QpyN_6JelIXpQg] update_mapping [_doc]
[00:00:10]               │ warn delete by query deleted 26 of 29 total documents, trying again
[00:00:10]               │ warn delete by query deleted 0 of 29 total documents, trying again
[00:00:11]               │ proc [kibana]   log   [18:25:48.967] [warning][fleet][plugins] Failure to install package [fleet_server]: [Error: Saved object [epm-packages/fleet_server] not found]
[00:00:11]               │ proc [kibana]   log   [18:25:48.968] [error][fleet][plugins] uninstalling fleet_server-1.0.0 after error installing: [Error: Saved object [epm-packages/fleet_server] not found]
[00:00:11]               │ proc [kibana]   log   [18:25:48.992] [error][fleet][plugins] failed to uninstall or rollback package after installation error Error: fleet_server is not installed
[00:00:11]               │ warn delete by query deleted 167 of 169 total documents, trying again
[00:00:11]               │ warn delete by query deleted 0 of 169 total documents, trying again
[00:00:11]               │ warn delete by query deleted 0 of 169 total documents, trying again
[00:00:11]               │ warn delete by query deleted 0 of 169 total documents, trying again
[00:00:12]               │ warn since spaces are enabled, all objects other than the default space were deleted from .kibana rather than deleting the whole index
[00:00:12]               │ info [emptyKibanaIndex] Deleted existing index ".kibana"
[00:00:12]               │ debg Migrating saved objects
[00:00:12]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-elastic_agent.apm_server@mappings]
[00:00:12]               │ proc [kibana]   log   [18:25:50.124] [info][savedobjects-service] [.kibana_task_manager] INIT -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 14ms.
[00:00:12]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-elastic_agent.auditbeat@mappings]
[00:00:12]               │ proc [kibana]   log   [18:25:50.129] [info][savedobjects-service] [.kibana] INIT -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 21ms.
[00:00:12]               │ proc [kibana]   log   [18:25:50.140] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_READ. took: 11ms.
[00:00:12]               │ proc [kibana]   log   [18:25:50.141] [info][savedobjects-service] [.kibana_task_manager] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_READ. took: 17ms.
[00:00:12]               │ proc [kibana]   log   [18:25:50.159] [info][savedobjects-service] [.kibana_task_manager] OUTDATED_DOCUMENTS_SEARCH_READ -> OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT. took: 18ms.
[00:00:12]               │ proc [kibana]   log   [18:25:50.163] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_READ -> OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT. took: 23ms.
[00:00:12]               │ proc [kibana]   log   [18:25:50.167] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT -> UPDATE_TARGET_MAPPINGS. took: 4ms.
[00:00:12]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-elastic_agent.apm_server@mappings]
[00:00:12]               │ proc [kibana]   log   [18:25:50.170] [info][savedobjects-service] [.kibana_task_manager] OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT -> UPDATE_TARGET_MAPPINGS. took: 11ms.
[00:00:12]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-elastic_agent.auditbeat@mappings]
[00:00:12]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-elastic_agent@mappings]
[00:00:12]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-elastic_agent.apm_server@custom]
[00:00:12]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-elastic_agent.elastic_agent@mappings]
[00:00:12]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-elastic_agent.endpoint_security@mappings]
[00:00:12]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-elastic_agent.endpoint_security@mappings]
[00:00:12]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-elastic_agent.fleet_server@mappings]
[00:00:12]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-elastic_agent.filebeat@mappings]
[00:00:12]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-elastic_agent.filebeat@mappings]
[00:00:12]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-elastic_agent.heartbeat@mappings]
[00:00:12]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-elastic_agent.fleet_server@mappings]
[00:00:12]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-elastic_agent.heartbeat@mappings]
[00:00:12]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-elastic_agent.metricbeat@mappings]
[00:00:12]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-elastic_agent.osquerybeat@mappings]
[00:00:12]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-elastic_agent.metricbeat@mappings]
[00:00:12]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-elastic_agent.osquerybeat@mappings]
[00:00:12]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-elastic_agent.osquerybeat@custom]
[00:00:12]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-elastic_agent.elastic_agent@custom]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-elastic_agent.endpoint_security@custom]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-elastic_agent.packetbeat@mappings]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-elastic_agent.packetbeat@mappings]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-elastic_agent.auditbeat@custom]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-elastic_agent.apm_server@custom]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-elastic_agent.auditbeat@custom]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-elastic_agent@custom]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-elastic_agent.filebeat@custom]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-elastic_agent.fleet_server@custom]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-elastic_agent.endpoint_security@custom]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-elastic_agent.heartbeat@custom]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-elastic_agent.filebeat@custom]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-elastic_agent.metricbeat@custom]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-elastic_agent.osquerybeat@custom]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-elastic_agent.metricbeat@custom]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-elastic_agent.heartbeat@custom]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-elastic_agent.fleet_server@custom]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-elastic_agent.packetbeat@custom]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-elastic_agent.packetbeat@custom]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-elastic_agent.apm_server] for index patterns [metrics-elastic_agent.apm_server-*]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [logs-elastic_agent.osquerybeat] for index patterns [logs-elastic_agent.osquerybeat-*]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-elastic_agent.elastic_agent] for index patterns [metrics-elastic_agent.elastic_agent-*]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-elastic_agent.endpoint_security] for index patterns [metrics-elastic_agent.endpoint_security-*]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-elastic_agent.auditbeat] for index patterns [metrics-elastic_agent.auditbeat-*]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [logs-elastic_agent.apm_server] for index patterns [logs-elastic_agent.apm_server-*]
[00:00:13]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [logs-elastic_agent.auditbeat] for index patterns [logs-elastic_agent.auditbeat-*]
[00:00:14]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [logs-elastic_agent] for index patterns [logs-elastic_agent-*]
[00:00:14]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-elastic_agent.filebeat] for index patterns [metrics-elastic_agent.filebeat-*]
[00:00:14]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-elastic_agent.fleet_server] for index patterns [metrics-elastic_agent.fleet_server-*]
[00:00:14]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [logs-elastic_agent.endpoint_security] for index patterns [logs-elastic_agent.endpoint_security-*]
[00:00:14]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-elastic_agent.heartbeat] for index patterns [metrics-elastic_agent.heartbeat-*]
[00:00:14]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [logs-elastic_agent.filebeat] for index patterns [logs-elastic_agent.filebeat-*]
[00:00:14]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-elastic_agent.metricbeat] for index patterns [metrics-elastic_agent.metricbeat-*]
[00:00:14]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-elastic_agent.osquerybeat] for index patterns [metrics-elastic_agent.osquerybeat-*]
[00:00:14]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [logs-elastic_agent.metricbeat] for index patterns [logs-elastic_agent.metricbeat-*]
[00:00:14]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [logs-elastic_agent.heartbeat] for index patterns [logs-elastic_agent.heartbeat-*]
[00:00:14]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [logs-elastic_agent.fleet_server] for index patterns [logs-elastic_agent.fleet_server-*]
[00:00:14]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [logs-elastic_agent.packetbeat] for index patterns [logs-elastic_agent.packetbeat-*]
[00:00:14]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-elastic_agent.packetbeat] for index patterns [metrics-elastic_agent.packetbeat-*]
[00:00:14]               │ proc [kibana]   log   [18:25:52.476] [warning][fleet][plugins] Failure to install package [elastic_agent]: [Error: Saved object [epm-packages/elastic_agent] not found]
[00:00:14]               │ proc [kibana]   log   [18:25:52.477] [error][fleet][plugins] uninstalling elastic_agent-1.1.1 after error installing: [Error: Saved object [epm-packages/elastic_agent] not found]
[00:00:14]               │ proc [kibana]   log   [18:25:52.486] [error][fleet][plugins] failed to uninstall or rollback package after installation error Error: elastic_agent is not installed
[00:00:14]               │ proc [kibana]   log   [18:25:52.521] [info][savedobjects-service] [.kibana_task_manager] UPDATE_TARGET_MAPPINGS -> UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK. took: 2351ms.
[00:00:14]               │ proc [kibana]   log   [18:25:52.523] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS -> UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK. took: 2356ms.
[00:00:14]               │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [.tasks] creating index, cause [auto(bulk api)], templates [], shards [1]/[1]
[00:00:14]               │ info [o.e.c.r.a.AllocationService] [node-01] updating number_of_replicas to [0] for indices [.tasks]
[00:00:14]               │ info [o.e.c.r.a.AllocationService] [node-01] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.tasks][0]]])." previous.health="YELLOW" reason="shards started [[.tasks][0]]"
[00:00:14]               │ info [o.e.t.LoggingTaskListener] [node-01] 2728 finished with response BulkByScrollResponse[took=25.7ms,timed_out=false,sliceId=null,updated=1,created=0,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:00:14]               │ info [o.e.t.LoggingTaskListener] [node-01] 2727 finished with response BulkByScrollResponse[took=3.3ms,timed_out=false,sliceId=null,updated=0,created=0,deleted=0,batches=0,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:00:14]               │ proc [kibana]   log   [18:25:52.745] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK -> DONE. took: 222ms.
[00:00:14]               │ proc [kibana]   log   [18:25:52.746] [info][savedobjects-service] [.kibana] Migration completed after 2638ms
[00:00:14]               │ proc [kibana]   log   [18:25:52.747] [info][savedobjects-service] [.kibana_task_manager] UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK -> DONE. took: 226ms.
[00:00:14]               │ proc [kibana]   log   [18:25:52.747] [info][savedobjects-service] [.kibana_task_manager] Migration completed after 2637ms
[00:00:14]               │ info [emptyKibanaIndex] Created index ".kibana"
[00:00:14]               │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC","visualization:visualize:legacyChartsLibrary":true,"visualization:visualize:legacyPieChartsLibrary":true}
[00:00:15]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-system.process@custom]
[00:00:15]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-system.application@custom]
[00:00:15]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-system.auth@custom]
[00:00:15]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-system.fsstat@custom]
[00:00:15]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-system.filesystem@custom]
[00:00:15]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-system.process.summary@custom]
[00:00:15]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-system.security@custom]
[00:00:15]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-system.network@custom]
[00:00:15]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-system.core@custom]
[00:00:15]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-system.diskio@custom]
[00:00:15]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-system.memory@custom]
[00:00:15]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-system.syslog@custom]
[00:00:15]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-system.socket_summary@custom]
[00:00:15]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-system.uptime@custom]
[00:00:15]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [logs-system.system@custom]
[00:00:15]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-system.load@custom]
[00:00:15]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding component template [metrics-system.cpu@custom]
[00:00:16]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-system.process] for index patterns [metrics-system.process-*]
[00:00:16]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [logs-system.application] for index patterns [logs-system.application-*]
[00:00:16]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [logs-system.auth] for index patterns [logs-system.auth-*]
[00:00:16]             └-> is displayed on a fresh install with Fleet setup executed
[00:00:16]               └-> "before each" hook: global before each for "is displayed on a fresh install with Fleet setup executed"
[00:00:16]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-system.fsstat] for index patterns [metrics-system.fsstat-*]
[00:00:16]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-system.filesystem] for index patterns [metrics-system.filesystem-*]
[00:00:16]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-system.process.summary] for index patterns [metrics-system.process.summary-*]
[00:00:16]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [logs-system.security] for index patterns [logs-system.security-*]
[00:00:16]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-system.network] for index patterns [metrics-system.network-*]
[00:00:16]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-system.core] for index patterns [metrics-system.core-*]
[00:00:16]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-system.diskio] for index patterns [metrics-system.diskio-*]
[00:00:16]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-system.memory] for index patterns [metrics-system.memory-*]
[00:00:16]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [logs-system.syslog] for index patterns [logs-system.syslog-*]
[00:00:16]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-system.socket_summary] for index patterns [metrics-system.socket_summary-*]
[00:00:16]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-system.uptime] for index patterns [metrics-system.uptime-*]
[00:00:16]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [logs-system.system] for index patterns [logs-system.system-*]
[00:00:16]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-system.load] for index patterns [metrics-system.load-*]
[00:00:17]               │ info [o.e.c.m.MetadataIndexTemplateService] [node-01] adding index template [metrics-system.cpu] for index patterns [metrics-system.cpu-*]
[00:00:17]               │ proc [kibana]   log   [18:25:54.986] [warning][fleet][plugins] Failure to install package [system]: [Error: Saved object [epm-packages/system] not found]
[00:00:17]               │ proc [kibana]   log   [18:25:54.986] [error][fleet][plugins] uninstalling system-1.1.4 after error installing: [Error: Saved object [epm-packages/system] not found]
[00:00:17]               │ proc [kibana]   log   [18:25:54.993] [error][fleet][plugins] failed to uninstall or rollback package after installation error Error: system is not installed
[00:00:17]               │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_8.0.0_001/AWW3_SG7QpyN_6JelIXpQg] update_mapping [_doc]
[00:00:19]               │ proc [kibana]   log   [18:25:57.035] [error][fleet][plugins] Error: Default policy could not be added. system is not installed, add system to `xpack.fleet.packages` or remove it from system-1.
[00:00:19]               │ proc [kibana]     at /dev/shm/workspace/kibana-build-24/x-pack/plugins/fleet/server/services/preconfiguration.js:193:19
[00:00:19]               │ proc [kibana]     at runMicrotasks (<anonymous>)
[00:00:19]               │ proc [kibana]     at processTicksAndRejections (internal/process/task_queues.js:95:5)
[00:00:19]               │ proc [kibana]     at async Promise.all (index 0)
[00:00:19]               │ proc [kibana]     at ensurePreconfiguredPackagesAndPolicies (/dev/shm/workspace/kibana-build-24/x-pack/plugins/fleet/server/services/preconfiguration.js:182:42)
[00:00:19]               │ proc [kibana]     at createSetupSideEffects (/dev/shm/workspace/kibana-build-24/x-pack/plugins/fleet/server/services/setup.js:80:7)
[00:00:19]               │ proc [kibana]     at awaitIfPending (/dev/shm/workspace/kibana-build-24/x-pack/plugins/fleet/server/services/setup_utils.js:38:20)
[00:00:19]               │ proc [kibana]     at fleetSetupHandler (/dev/shm/workspace/kibana-build-24/x-pack/plugins/fleet/server/routes/setup/handlers.js:58:25)
[00:00:19]               │ proc [kibana]     at Router.handle (/dev/shm/workspace/kibana-build-24/src/core/server/http/router/router.js:163:30)
[00:00:19]               │ proc [kibana]     at handler (/dev/shm/workspace/kibana-build-24/src/core/server/http/router/router.js:124:50)
[00:00:19]               │ proc [kibana]     at exports.Manager.execute (/dev/shm/workspace/kibana-build-24/node_modules/@hapi/hapi/lib/toolkit.js:60:28)
[00:00:19]               │ proc [kibana]     at Object.internals.handler (/dev/shm/workspace/kibana-build-24/node_modules/@hapi/hapi/lib/handler.js:46:20)
[00:00:19]               │ proc [kibana]     at exports.execute (/dev/shm/workspace/kibana-build-24/node_modules/@hapi/hapi/lib/handler.js:31:20)
[00:00:19]               │ proc [kibana]     at Request._lifecycle (/dev/shm/workspace/kibana-build-24/node_modules/@hapi/hapi/lib/request.js:370:32)
[00:00:19]               │ proc [kibana]     at Request._execute (/dev/shm/workspace/kibana-build-24/node_modules/@hapi/hapi/lib/request.js:279:9)
[00:00:19]               │ proc [kibana]   log   [18:25:57.040] [error][fleet][plugins] Error: Default policy could not be added. system is not installed, add system to `xpack.fleet.packages` or remove it from system-1.
[00:00:19]               │ proc [kibana]     at /dev/shm/workspace/kibana-build-24/x-pack/plugins/fleet/server/services/preconfiguration.js:193:19
[00:00:19]               │ proc [kibana]     at runMicrotasks (<anonymous>)
[00:00:19]               │ proc [kibana]     at processTicksAndRejections (internal/process/task_queues.js:95:5)
[00:00:19]               │ proc [kibana]     at async Promise.all (index 0)
[00:00:19]               │ proc [kibana]     at ensurePreconfiguredPackagesAndPolicies (/dev/shm/workspace/kibana-build-24/x-pack/plugins/fleet/server/services/preconfiguration.js:182:42)
[00:00:19]               │ proc [kibana]     at createSetupSideEffects (/dev/shm/workspace/kibana-build-24/x-pack/plugins/fleet/server/services/setup.js:80:7)
[00:00:19]               │ proc [kibana]     at awaitIfPending (/dev/shm/workspace/kibana-build-24/x-pack/plugins/fleet/server/services/setup_utils.js:38:20)
[00:00:19]               │ proc [kibana]     at fleetSetupHandler (/dev/shm/workspace/kibana-build-24/x-pack/plugins/fleet/server/routes/setup/handlers.js:58:25)
[00:00:19]               │ proc [kibana]     at Router.handle (/dev/shm/workspace/kibana-build-24/src/core/server/http/router/router.js:163:30)
[00:00:19]               │ proc [kibana]     at handler (/dev/shm/workspace/kibana-build-24/src/core/server/http/router/router.js:124:50)
[00:00:19]               │ proc [kibana]     at exports.Manager.execute (/dev/shm/workspace/kibana-build-24/node_modules/@hapi/hapi/lib/toolkit.js:60:28)
[00:00:19]               │ proc [kibana]     at Object.internals.handler (/dev/shm/workspace/kibana-build-24/node_modules/@hapi/hapi/lib/handler.js:46:20)
[00:00:19]               │ proc [kibana]     at exports.execute (/dev/shm/workspace/kibana-build-24/node_modules/@hapi/hapi/lib/handler.js:31:20)
[00:00:19]               │ proc [kibana]     at Request._lifecycle (/dev/shm/workspace/kibana-build-24/node_modules/@hapi/hapi/lib/request.js:370:32)
[00:00:19]               │ proc [kibana]     at Request._execute (/dev/shm/workspace/kibana-build-24/node_modules/@hapi/hapi/lib/request.js:279:9)
[00:00:19]               │ proc [kibana]   log   [18:25:57.040] [error][fleet][plugins] Error: Default policy could not be added. system is not installed, add system to `xpack.fleet.packages` or remove it from system-1.
[00:00:19]               │ proc [kibana]     at /dev/shm/workspace/kibana-build-24/x-pack/plugins/fleet/server/services/preconfiguration.js:193:19
[00:00:19]               │ proc [kibana]     at runMicrotasks (<anonymous>)
[00:00:19]               │ proc [kibana]     at processTicksAndRejections (internal/process/task_queues.js:95:5)
[00:00:19]               │ proc [kibana]     at async Promise.all (index 0)
[00:00:19]               │ proc [kibana]     at ensurePreconfiguredPackagesAndPolicies (/dev/shm/workspace/kibana-build-24/x-pack/plugins/fleet/server/services/preconfiguration.js:182:42)
[00:00:19]               │ proc [kibana]     at createSetupSideEffects (/dev/shm/workspace/kibana-build-24/x-pack/plugins/fleet/server/services/setup.js:80:7)
[00:00:19]               │ proc [kibana]     at awaitIfPending (/dev/shm/workspace/kibana-build-24/x-pack/plugins/fleet/server/services/setup_utils.js:38:20)
[00:00:19]               │ proc [kibana]     at fleetSetupHandler (/dev/shm/workspace/kibana-build-24/x-pack/plugins/fleet/server/routes/setup/handlers.js:58:25)
[00:00:19]               │ proc [kibana]     at Router.handle (/dev/shm/workspace/kibana-build-24/src/core/server/http/router/router.js:163:30)
[00:00:19]               │ proc [kibana]     at handler (/dev/shm/workspace/kibana-build-24/src/core/server/http/router/router.js:124:50)
[00:00:19]               │ proc [kibana]     at exports.Manager.execute (/dev/shm/workspace/kibana-build-24/node_modules/@hapi/hapi/lib/toolkit.js:60:28)
[00:00:19]               │ proc [kibana]     at Object.internals.handler (/dev/shm/workspace/kibana-build-24/node_modules/@hapi/hapi/lib/handler.js:46:20)
[00:00:19]               │ proc [kibana]     at exports.execute (/dev/shm/workspace/kibana-build-24/node_modules/@hapi/hapi/lib/handler.js:31:20)
[00:00:19]               │ proc [kibana]     at Request._lifecycle (/dev/shm/workspace/kibana-build-24/node_modules/@hapi/hapi/lib/request.js:370:32)
[00:00:19]               │ proc [kibana]     at Request._execute (/dev/shm/workspace/kibana-build-24/node_modules/@hapi/hapi/lib/request.js:279:9)
[00:00:19]               │ info Taking screenshot "/dev/shm/workspace/parallel/24/kibana/x-pack/test/functional/screenshots/failure/home onboarding Welcome interstitial is displayed on a fresh install with Fleet setup executed.png"
[00:00:19]               │ proc [kibana]  error  [18:25:54.019]  Error: Internal Server Error
[00:00:19]               │ proc [kibana]     at HapiResponseAdapter.toError (/dev/shm/workspace/kibana-build-24/src/core/server/http/router/response_adapter.js:128:19)
[00:00:19]               │ proc [kibana]     at HapiResponseAdapter.toHapiResponse (/dev/shm/workspace/kibana-build-24/src/core/server/http/router/response_adapter.js:82:19)
[00:00:19]               │ proc [kibana]     at HapiResponseAdapter.handle (/dev/shm/workspace/kibana-build-24/src/core/server/http/router/response_adapter.js:73:17)
[00:00:19]               │ proc [kibana]     at Router.handle (/dev/shm/workspace/kibana-build-24/src/core/server/http/router/router.js:164:34)
[00:00:19]               │ proc [kibana]     at runMicrotasks (<anonymous>)
[00:00:19]               │ proc [kibana]     at processTicksAndRejections (internal/process/task_queues.js:95:5)
[00:00:19]               │ proc [kibana]     at handler (/dev/shm/workspace/kibana-build-24/src/core/server/http/router/router.js:124:50)
[00:00:19]               │ proc [kibana]     at exports.Manager.execute (/dev/shm/workspace/kibana-build-24/node_modules/@hapi/hapi/lib/toolkit.js:60:28)
[00:00:19]               │ proc [kibana]     at Object.internals.handler (/dev/shm/workspace/kibana-build-24/node_modules/@hapi/hapi/lib/handler.js:46:20)
[00:00:19]               │ proc [kibana]     at exports.execute (/dev/shm/workspace/kibana-build-24/node_modules/@hapi/hapi/lib/handler.js:31:20)
[00:00:19]               │ proc [kibana]     at Request._lifecycle (/dev/shm/workspace/kibana-build-24/node_modules/@hapi/hapi/lib/request.js:370:32)
[00:00:19]               │ proc [kibana]     at Request._execute (/dev/shm/workspace/kibana-build-24/node_modules/@hapi/hapi/lib/request.js:279:9)
[00:00:19]               │ info Current URL is: http://localhost:61241/app/home#/
[00:00:19]               │ info Saving page source to: /dev/shm/workspace/parallel/24/kibana/x-pack/test/functional/failure_debug/html/home onboarding Welcome interstitial is displayed on a fresh install with Fleet setup executed.html
[00:00:19]               └- ✖ fail: home onboarding Welcome interstitial is displayed on a fresh install with Fleet setup executed
[00:00:19]               │      Error: Request failed with status code 500
[00:00:19]               │       at createError (/dev/shm/workspace/parallel/24/kibana/node_modules/axios/lib/core/createError.js:16:15)
[00:00:19]               │       at settle (/dev/shm/workspace/parallel/24/kibana/node_modules/axios/lib/core/settle.js:17:12)
[00:00:19]               │       at IncomingMessage.handleStreamEnd (/dev/shm/workspace/parallel/24/kibana/node_modules/axios/lib/adapters/http.js:260:11)
[00:00:19]               │       at endReadableNT (internal/streams/readable.js:1317:12)
[00:00:19]               │       at processTicksAndRejections (internal/process/task_queues.js:82:21)
[00:00:19]               │ 
[00:00:19]               │ 

Stack Trace

Error: Request failed with status code 500
    at createError (/dev/shm/workspace/parallel/24/kibana/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/dev/shm/workspace/parallel/24/kibana/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/dev/shm/workspace/parallel/24/kibana/node_modules/axios/lib/adapters/http.js:260:11)
    at endReadableNT (internal/streams/readable.js:1317:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21) {
  config: {
    url: 'http://elastic:changeme@localhost:61241/api/fleet/setup',
    method: 'post',
    headers: {
      Accept: 'application/json, text/plain, */*',
      'Content-Type': 'application/x-www-form-urlencoded',
      'kbn-xsrf': 'kbn-client',
      'User-Agent': 'axios/0.21.1'
    },
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    paramsSerializer: [Function: paramsSerializer],
    timeout: 0,
    adapter: [Function: httpAdapter],
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: 30000000,
    maxBodyLength: 30000000,
    httpsAgent: null,
    validateStatus: [Function: validateStatus],
    data: undefined
  },
  request: <ref *1> ClientRequest {
    _events: [Object: null prototype] {
      abort: [Function (anonymous)],
      aborted: [Function (anonymous)],
      connect: [Function (anonymous)],
      error: [Function (anonymous)],
      socket: [Function (anonymous)],
      timeout: [Function (anonymous)],
      prefinish: [Function: requestOnPrefinish]
    },
    _eventsCount: 7,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    destroyed: true,
    _last: true,
    chunkedEncoding: false,
    shouldKeepAlive: false,
    _defaultKeepAlive: true,
    useChunkedEncodingByDefault: true,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    _contentLength: 0,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    socket: Socket {
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'localhost',
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 6,
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: null,
      _server: null,
      parser: null,
      _httpMessage: [Circular *1],
      [Symbol(async_id_symbol)]: 1635556,
      [Symbol(kHandle)]: null,
      [Symbol(kSetNoDelay)]: false,
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesRead)]: 642,
      [Symbol(kBytesWritten)]: 282,
      [Symbol(RequestTimeout)]: undefined
    },
    _header: 'POST /api/fleet/setup HTTP/1.1\r\n' +
      'Accept: application/json, text/plain, */*\r\n' +
      'Content-Type: application/x-www-form-urlencoded\r\n' +
      'kbn-xsrf: kbn-client\r\n' +
      'User-Agent: axios/0.21.1\r\n' +
      'Host: localhost:61241\r\n' +
      'Authorization: Basic ZWxhc3RpYzpjaGFuZ2VtZQ==\r\n' +
      'Connection: close\r\n' +
      'Content-Length: 0\r\n' +
      '\r\n',
    _keepAliveTimeout: 0,
    _onPendingData: [Function: noopPendingOutput],
    agent: Agent {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      defaultPort: 80,
      protocol: 'http:',
      options: [Object],
      requests: {},
      sockets: {},
      freeSockets: {},
      keepAliveMsecs: 1000,
      keepAlive: false,
      maxSockets: Infinity,
      maxFreeSockets: 256,
      scheduling: 'lifo',
      maxTotalSockets: Infinity,
      totalSocketCount: 0,
      [Symbol(kCapture)]: false
    },
    socketPath: undefined,
    method: 'POST',
    maxHeaderSize: undefined,
    insecureHTTPParser: undefined,
    path: '/api/fleet/setup',
    _ended: true,
    res: IncomingMessage {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 3,
      _maxListeners: undefined,
      socket: [Socket],
      httpVersionMajor: 1,
      httpVersionMinor: 1,
      httpVersion: '1.1',
      complete: true,
      headers: [Object],
      rawHeaders: [Array],
      trailers: {},
      rawTrailers: [],
      aborted: false,
      upgrade: false,
      url: '',
      method: null,
      statusCode: 500,
      statusMessage: 'Internal Server Error',
      client: [Socket],
      _consuming: false,
      _dumped: false,
      req: [Circular *1],
      responseUrl: 'http://elastic:changeme@localhost:61241/api/fleet/setup',
      redirects: [],
      [Symbol(kCapture)]: false,
      [Symbol(RequestTimeout)]: undefined
    },
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    reusedSocket: false,
    host: 'localhost',
    protocol: 'http:',
    _redirectable: Writable {
      _writableState: [WritableState],
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      _options: [Object],
      _ended: true,
      _ending: true,
      _redirectCount: 0,
      _redirects: [],
      _requestBodyLength: 0,
      _requestBodyBuffers: [],
      _onNativeResponse: [Function (anonymous)],
      _currentRequest: [Circular *1],
      _currentUrl: 'http://elastic:changeme@localhost:61241/api/fleet/setup',
      [Symbol(kCapture)]: false
    },
    [Symbol(kCapture)]: false,
    [Symbol(kNeedDrain)]: false,
    [Symbol(corked)]: 0,
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      accept: [Array],
      'content-type': [Array],
      'kbn-xsrf': [Array],
      'user-agent': [Array],
      host: [Array],
      authorization: [Array]
    }
  },
  response: {
    status: 500,
    statusText: 'Internal Server Error',
    headers: {
      'x-content-type-options': 'nosniff',
      'referrer-policy': 'no-referrer-when-downgrade',
      'kbn-name': 'kibana-ci-immutable-ubuntu-16-tests-xxl-1629218648456542065',
      'kbn-license-sig': 'e356828e7cc777fc29ecb98fc707164c687cea6606172816a852570c8f67bf2f',
      'content-type': 'application/json; charset=utf-8',
      'cache-control': 'private, no-cache, no-store, must-revalidate',
      'content-length': '187',
      date: 'Tue, 17 Aug 2021 18:25:57 GMT',
      connection: 'close'
    },
    config: {
      url: 'http://elastic:changeme@localhost:61241/api/fleet/setup',
      method: 'post',
      headers: [Object],
      transformRequest: [Array],
      transformResponse: [Array],
      paramsSerializer: [Function: paramsSerializer],
      timeout: 0,
      adapter: [Function: httpAdapter],
      xsrfCookieName: 'XSRF-TOKEN',
      xsrfHeaderName: 'X-XSRF-TOKEN',
      maxContentLength: 30000000,
      maxBodyLength: 30000000,
      httpsAgent: null,
      validateStatus: [Function: validateStatus],
      data: undefined
    },
    request: <ref *1> ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: true,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      socket: [Socket],
      _header: 'POST /api/fleet/setup HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'Content-Type: application/x-www-form-urlencoded\r\n' +
        'kbn-xsrf: kbn-client\r\n' +
        'User-Agent: axios/0.21.1\r\n' +
        'Host: localhost:61241\r\n' +
        'Authorization: Basic ZWxhc3RpYzpjaGFuZ2VtZQ==\r\n' +
        'Connection: close\r\n' +
        'Content-Length: 0\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: noopPendingOutput],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/api/fleet/setup',
      _ended: true,
      res: [IncomingMessage],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'localhost',
      protocol: 'http:',
      _redirectable: [Writable],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    data: {
      statusCode: 500,
      error: 'Internal Server Error',
      message: 'Default policy could not be added. system is not installed, add system to `xpack.fleet.packages` or remove it from system-1.'
    }
  },
  isAxiosError: true,
  toJSON: [Function: toJSON]
}

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
home 121.7KB 121.8KB +13.0B

History

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

@kibanamachine
Copy link
Contributor

💔 Backport failed

Status Branch Result
7.x Commit could not be cherrypicked due to conflicts
7.14

Successful backport PRs will be merged automatically after passing CI.

To backport manually run:
node scripts/backport --pr 108193

jbudz added a commit that referenced this pull request Aug 17, 2021
joshdover added a commit to joshdover/kibana that referenced this pull request Aug 18, 2021
…c#108193)

# Conflicts:
#	test/functional/page_objects/common_page.ts
@joshdover
Copy link
Contributor Author

joshdover commented Aug 18, 2021

@LeeDr

Is this really: If no index-patterns exist in the current space, and there are indices that I have at least view_index_metadata priv on, show the add data interstitial?

Yes that is the behavior and how this worked previously. One piece of logic that is not expressed above is also: "have we ever shown this to the user before". We won't ever show this more than once for a user, even if they create a new Space.

I don't know what the part "the user is likely not to have privileges to add data" means. Meaning adding an index pattern?
AFAIK users don't need monitor cluster privilege or monitor index privilege to create index patterns or use them anywhere in Kibana (unless Fleet adds that requirement) elastic.co/guide/en/kibana/current/index-patterns.html

The reason we need the monitor privilege is because we're using the _cat/indices API for this logic in order to ensure that this logic executes as fast as possible. Searching for an actual document would have been potentially much slower in some cases since it'd have to hit each shard in the cluster for all of these indices whereas _cat/indices only needs to access cluster state which is available in memory on every Elasticsearch node.

I agree this isn't perfect logic. My goal with this change was to make the minimal amount of changes to be able to show this interstitial quickly for the use case that is most important which is brand new users of Elastic. My reasoning here is:

  • If you don't have permissions for the monitor privilege you likely don't have access to create new indices for ingesting data. This isn't always going to be the case, but in those exceptions, not showing this interstitial doesn't result in an entirely broken experience.
  • For the case where data indices already exist, but no index patterns are created yet, and the user only has search privileges, the "add data" interstitial isn't going to be helpful. They need to go create index patterns, but this flow doesn't direct them to do so. Hiding the interstitial in this case actually seems preferable IMO.

** Also, are there actually two different interstitials? One where there aren't any index patterns in this space and there is data, and another when there aren't any index patterns and also no non-system index data? I've seen one page that lets me go to index patterns anyway.

There is an onboarding intestitial which this change fixes and there is also a UI that is displayed in Dashboard, Discover, and Visualize when no index patterns have been created. That will be addressed separately in #108887

kibanamachine added a commit that referenced this pull request Aug 18, 2021
…108193) (#108985)

* Update onboarding interstitial to handle default Fleet assets (#108193)

* Skip flaky test

Co-authored-by: Josh Dover <[email protected]>
joshdover added a commit that referenced this pull request Aug 18, 2021
…108193) (#109074)

* Update onboarding interstitial to handle default Fleet assets (#108193)

# Conflicts:
#	test/functional/page_objects/common_page.ts

* Skip flaky test
joshdover added a commit to joshdover/kibana that referenced this pull request Aug 30, 2021
joshdover pushed a commit to joshdover/kibana that referenced this pull request Aug 30, 2021
joshdover added a commit that referenced this pull request Aug 30, 2021
…108193) (#110496)

* Update onboarding interstitial to handle default Fleet assets (#108193)

* skip flaky suite.  #108193

Co-authored-by: Jonathan Budzenski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:fix Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Fleet Team label for Observability Data Collection Fleet team v7.14.1 v7.15.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing Add Data welcome / interstitial page
9 participants