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

[7.x] [SIEM] Fix and consolidate handling of error responses in the client (#59438) #59757

Merged
merged 1 commit into from
Mar 10, 2020

Conversation

rylnd
Copy link
Contributor

@rylnd rylnd commented Mar 10, 2020

Backports the following commits to 7.x:

…lastic#59438)

* Convert our manual throwing of TypeError to a custom Error

Throwing a TypeError meant that our manual errors were indistinguishable
from, say, trying to invoke a method on undefined. This adds a custom
error, BadRequestError, that disambiguates that situation.

* Present API Error messages to the user

With Core's new HTTP client, an unsuccessful API call will raise an
error containing the body of the response it received. In the case of
SIEM endpoints, this will include a useful error message with
potentially more specificity than e.g. 'Internal Server Error'.

This adds a type predicate to check for such errors, and adds a handling
case in our errorToToaster handler.

If the error does not contain our SIEM-specific message, it will fall
through as normal and the general error.message will be displayed in the
toaster.

* Remove unnecessary use of throwIfNotOk in our client API calls

The new HTTP client raises an error on a 4xx or 5xx response, so there
should not be a case where throwIfNotOk is actually going to throw an
error.

The established pattern on the frontend is to catch errors at the call
site and handle them appropriately, so I'm mainly just verifying that
these are caught where they're used, now.

* Move errorToToaster and ToasterError to general location

These were living in ML since that's where they originated. However, we
have need of it (and already use it) elsewhere.

The basic pattern for error handling on the frontend is:
1) API call throws error
2) caller catches error and dispatches a toast

throwIfNotOk is meant to convert the error into a useful message in 1).
We currently use both errorToToaster and displayErrorToast to display
that in a toaster in 2)

Now that errorToToaster handles a few different types of errors, and
throwIfNotOk is going to be bypassed due to the new client behavior of
throwing on error, we're going to start consolidating on:

1) Api call throws error
2) caller catches error and passes it to errorToToaster

* Refactor Rules API functions to not use throwIfNotOk

* Ensures that all callers of these methods properly catch errors
* Updates error toasterification to use errorToToaster
* Simplifies tests now that we mainly just invoke the http client and
return the result.

throwIfNotOk is not being used in the majority of cases, as the client
raises an error and bypasses that call.

The few cases this might break are where we return a 200 but have errors
within the response. Whether throwIfNotOk handled this or not, I'll need
a simpler helper to accomplish the same behavior.

* Define a type for our BulkRule responses

These can be an array of errors OR rules; typing it as such forces
downstream to deal with both. enableRules was being handled correctly
with the bucketing helper, and TS has confirmed the rest are as well.

This obviates the need to raise from our API calls, as bulk errors are
recoverable and we want to both a) continue on with any successful rules
and b) handle the errors as necessary. This is highly dependent on the
caller and so we can't/shouldn't handle it here.

* Address case where bulk rules errors were not handled

I'm not sure that we're ever using this non-dispatch version, but it was
throwing a type error. Will bring it up in review.

* Remove more throwIfNotOk uses from API calls

These are unneeded as an error response will already throw an error to
be handled at the call site.

* Display an error toaster on newsfeed fetch failure

* Remove dead code

This was left over as a result of elastic#56261

* Remove throwIfNotOk from case API calls

Again, not needed because the client already throws.

* Update use_get_tags for NP

* Gets rid of throwIfNotOK usage
* uses core http fetch

* Remove throwIfNotOk from signals API

* Remove throwIfNotOk

This served the same purpose as errorToToaster, but in a less robust
way. All usages have been replaced, so now we say goodbye.

* Remove custom errors in favor of KibanaApiError and isApiError type predicate

There was no functional difference between these two code paths, and
removing these custom errors allowed us to delete a bunch of associated
code as well..

* Fix test failures

These were mainly related to my swapping any remaining fetch calls with
the core router as good kibana denizens should :salute:

* Replace use of core mocks with our simpler local ones

This is enough to get our tests to pass. We can't use the core mocks for
now since there are circular dependencies there, which breaks our build.

* add signal api unit tests

* privilege unit test api

* Add unit tests on the signals container

* Refactor signals API tests to use core mocks

* Simplifies our mocking verbosity by leveraging core mocks
* Simplifies test setup by isolating a reference to our fetch mock
* Abstracts response structure to pure helper functions

The try/catch tests had some false positives in that nothing would be
asserted if the code did not throw an error. These proved to be masking
a gap in coverage for our get/create signal index requests, which do not
leverage `throwIfNotOk` but instead rely on the fetch to throw an error;
once that behavior is verified we can update those tests to have our
fetchMock throw errors, and we should be all set.

* Simplify signals API tests now that the subjects do less

We no longer re-throw errors, or parse the response, we just return the
result of the client call. Simple!

* Simplify API functions to use implict returns

When possible. Also adds missing error-throwing documentation where
necessary.

* Revert "Display an error toaster on newsfeed fetch failure"

This reverts commit 6421322.

* Error property is readonly

* Pull uuid generation into default argument value

* Fix type predicate isApiError

Uses has to properly inspect our errorish object. Turns out we have a
'message' property, not an 'error' property.

* Fix test setup following modification of type predicate

We need a message (via new Error), a body.message, and a
body.status_code to satisfy isApiError.

Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@rylnd rylnd added the backport label Mar 10, 2020
@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / kibana-xpack-agent / X-Pack Spaces API Integration Tests -- security_and_spaces.x-pack/test/spaces_api_integration/security_and_spaces/apis/copy_to_space·ts.spaces api with security copy to spaces rbac user with all at space from the space_1 space "before each" hook in "rbac user with all at space from the space_1 space"

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 6 times on tracked branches: https://github.com/elastic/kibana/issues/59240
  - Test has failed 6 times on tracked branches: https://github.com/elastic/kibana/issues/59240

[00:00:00]       │
[00:00:00]         └-: spaces api with security
[00:00:00]           └-> "before all" hook
[00:00:00]           └-> "before all" hook
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_legacy_user]
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_dual_privileges_user]
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_dual_privileges_dashboard_only_user]
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_user]
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_dashboard_only_user]
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_default_space_all_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_default_space_read_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_1_all_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_1_read_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_2_all_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_2_read_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_1_2_all_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_1_2_read_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_default_space_saved_objects_all_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_default_space_saved_objects_read_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_1_saved_objects_all_user]
[00:00:03]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_1_saved_objects_read_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [not_a_kibana_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_legacy_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_dual_privileges_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_dual_privileges_dashboard_only_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_dashboard_only_user]
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_default_space_all_user]
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_default_space_read_user]
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_1_all_user]
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_1_read_user]
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_2_all_user]
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_2_read_user]
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_1_2_all_user]
[00:00:05]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_1_2_read_user]
[00:00:05]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_default_space_saved_objects_all_user]
[00:00:05]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_default_space_saved_objects_read_user]
[00:00:05]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_1_saved_objects_all_user]
[00:00:05]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_1_saved_objects_read_user]
[00:00:05]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_apm_user]
[00:00:06]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_machine_learning_admin]
[00:00:06]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_machine_learning_user]
[00:00:06]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_monitoring_user]
[00:05:09]                 └-> "after all" hook
[00:00:06]           └-: copy to spaces
[00:00:06]             └-> "before all" hook
[00:05:09]                   └-> "after all" hook
[00:04:55]             └-: rbac user with all at space from the space_1 space
[00:04:55]               └-> "before all" hook
[00:04:55]               └-> "before all" hook
[00:04:55]               └-> should return 200 when copying to space without conflicts or references
[00:04:55]                 └-> "before each" hook: global before each
[00:04:55]                 └-> "before each" hook
[00:04:55]                   │ info [saved_objects/spaces] Loading "mappings.json"
[00:04:55]                   │ info [saved_objects/spaces] Loading "data.json"
[00:04:56]                   │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_2/0jzl-bRcT-6qpF0K8gHvmw] deleting index
[00:04:56]                   │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_1/JMmz14wLRe25IG9RoGqX8g] deleting index
[00:04:56]                   │ info [saved_objects/spaces] Deleted existing index [".kibana_2",".kibana_1"]
[00:04:56]                   │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:04:56]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana][0]]]).
[00:04:56]                   │ info [saved_objects/spaces] Created index ".kibana"
[00:04:56]                   │ debg [saved_objects/spaces] ".kibana" settings {"index":{"auto_expand_replicas":"0-1","number_of_replicas":"0","number_of_shards":"1"}}
[00:04:56]                   │ info [saved_objects/spaces] Indexed 16 docs into ".kibana"
[00:04:56]                   │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana/doJ5daPFRYaF6dmwS4I-yw] update_mapping [_doc]
[00:04:56]                   │ debg Migrating saved objects
[00:04:57]                   │ proc [kibana]   log   [15:14:03.378] [info][savedobjects-service] Creating index .kibana_2.
[00:04:57]                   │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:04:57]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] updating number_of_replicas to [0] for indices [.kibana_2]
[00:04:57]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_2][0]]]).
[00:04:57]                   │ proc [kibana]   log   [15:14:03.479] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:04:57]                   │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:04:57]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] updating number_of_replicas to [0] for indices [.kibana_1]
[00:04:57]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_1][0]]]).
[00:04:57]                   │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] 25199 finished with response BulkByScrollResponse[took=52.7ms,timed_out=false,sliceId=null,updated=0,created=17,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:04:57]                   │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana/doJ5daPFRYaF6dmwS4I-yw] deleting index
[00:04:57]                   │ proc [kibana]   log   [15:14:03.860] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:04:57]                   │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_2/c63JNyZHS7m-lprDyUxNbw] update_mapping [_doc]
[00:04:57]                   │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_2/c63JNyZHS7m-lprDyUxNbw] update_mapping [_doc]
[00:04:57]                   │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_2/c63JNyZHS7m-lprDyUxNbw] update_mapping [_doc]
[00:04:57]                   │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_2/c63JNyZHS7m-lprDyUxNbw] update_mapping [_doc]
[00:04:57]                   │ proc [kibana]   log   [15:14:04.037] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:04:57]                   │ proc [kibana]   log   [15:14:04.085] [info][savedobjects-service] Finished in 712ms.
[00:04:58]                 └- ✓ pass  (425ms) "spaces api with security copy to spaces rbac user with all at space from the space_1 space should return 200 when copying to space without conflicts or references"
[00:04:58]               └-> "after each" hook
[00:04:58]                 │ info [saved_objects/spaces] Unloading indices from "mappings.json"
[00:04:58]                 │ warn since spaces are enabled, all objects other than the default space were deleted from .kibana rather than deleting the whole index
[00:04:58]                 │ info [saved_objects/spaces] Deleted existing index ".kibana"
[00:04:58]                 │ info [saved_objects/spaces] Unloading indices from "data.json"
[00:04:58]               └-> should return 200 when copying to space without conflicts with references
[00:04:58]                 └-> "before each" hook: global before each
[00:04:58]                 └-> "before each" hook
[00:04:59]                   │ info [saved_objects/spaces] Loading "mappings.json"
[00:04:59]                   │ info [saved_objects/spaces] Loading "data.json"
[00:04:59]                   │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_2/c63JNyZHS7m-lprDyUxNbw] deleting index
[00:04:59]                   │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_1/13kNUJgBSQmj18VNlU-qNA] deleting index
[00:04:59]                   │ info [saved_objects/spaces] Deleted existing index [".kibana_2",".kibana_1"]
[00:04:59]                   │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:04:59]                   │ info [r.suppressed] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] path: /.kibana/_doc/telemetry%3Atelemetry, params: {index=.kibana, id=telemetry:telemetry}
[00:04:59]                   │      org.elasticsearch.action.NoShardAvailableActionException: No shard available for [get [.kibana][_doc][telemetry:telemetry]: routing [null]]
[00:04:59]                   │      	at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.perform(TransportSingleShardAction.java:224) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.onFailure(TransportSingleShardAction.java:210) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.access$1100(TransportSingleShardAction.java:136) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction$2.handleException(TransportSingleShardAction.java:266) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:1126) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:1235) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:1209) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.transport.TaskTransportChannel.sendResponse(TaskTransportChannel.java:60) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.support.ChannelActionListener.onFailure(ChannelActionListener.java:56) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.ActionRunnable.onFailure(ActionRunnable.java:88) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.onFailure(ThreadContext.java:680) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:39) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
[00:04:59]                   │      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
[00:04:59]                   │      	at java.lang.Thread.run(Thread.java:830) [?:?]
[00:04:59]                   │      Caused by: org.elasticsearch.transport.RemoteTransportException: [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898][127.0.0.1:6183][indices:data/read/get[s]]
[00:04:59]                   │      Caused by: org.elasticsearch.index.shard.IllegalIndexShardStateException: CurrentState[RECOVERING] operations only allowed when shard state is one of [POST_RECOVERY, STARTED]
[00:04:59]                   │      	at org.elasticsearch.index.shard.IndexShard.readAllowed(IndexShard.java:1729) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.index.shard.IndexShard.get(IndexShard.java:941) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.index.get.ShardGetService.innerGet(ShardGetService.java:180) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.index.get.ShardGetService.get(ShardGetService.java:104) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.index.get.ShardGetService.get(ShardGetService.java:95) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.get.TransportGetAction.shardOperation(TransportGetAction.java:106) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.get.TransportGetAction.shardOperation(TransportGetAction.java:45) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.support.single.shard.TransportSingleShardAction.lambda$asyncShardOperation$0(TransportSingleShardAction.java:110) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.ActionRunnable.lambda$supply$0(ActionRunnable.java:58) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:73) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:692) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	... 3 more
[00:04:59]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana][0]]]).
[00:04:59]                   │ proc [kibana] internal/process/warning.js:153
[00:04:59]                   │ proc [kibana]         throw warning;
[00:04:59]                   │ proc [kibana]         ^
[00:04:59]                   │ proc [kibana] 
[00:04:59]                   │ proc [kibana] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[00:04:59]                   │ proc [kibana]     at emitDeprecationWarning (internal/process/promises.js:111:13)
[00:04:59]                   │ proc [kibana]     at emitWarning (internal/process/promises.js:104:3)
[00:04:59]                   │ proc [kibana]     at emitPromiseRejectionWarnings (internal/process/promises.js:143:7)
[00:04:59]                   │ proc [kibana]     at process._tickCallback (internal/process/next_tick.js:69:34)
[00:04:59]                   │ info [saved_objects/spaces] Created index ".kibana"
[00:04:59]                   │ debg [saved_objects/spaces] ".kibana" settings {"index":{"auto_expand_replicas":"0-1","number_of_replicas":"0","number_of_shards":"1"}}
[00:04:59]                   │ info [saved_objects/spaces] Indexed 16 docs into ".kibana"
[00:04:59]                   └- ✖ fail: "spaces api with security copy to spaces rbac user with all at space from the space_1 space "before each" hook"
[00:04:59]                   │
[00:04:59]                   └-> "after each" hook
[00:04:59]                     │ERROR [GET http://elastic:changeme@localhost:6181/api/status] request failed (attempt=1/5)
[00:04:59]                     │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana/0AoPeoP2ShGP3R8mzZW4Gg] update_mapping [_doc]
[00:04:59]                     │ debg Migrating saved objects
[00:04:59]                     │ERROR [migrate saved objects] request failed (attempt=1/5)
[00:05:00]                     │ERROR [GET http://elastic:changeme@localhost:6181/api/status] request failed (attempt=2/5)
[00:05:00]                     │ERROR [migrate saved objects] request failed (attempt=2/5)
[00:05:02]                     │ERROR [GET http://elastic:changeme@localhost:6181/api/status] request failed (attempt=3/5)
[00:05:02]                     │ERROR [migrate saved objects] request failed (attempt=3/5)
[00:05:05]                     │ERROR [GET http://elastic:changeme@localhost:6181/api/status] request failed (attempt=4/5)
[00:05:05]                     │ERROR [migrate saved objects] request failed (attempt=4/5)
[00:05:09]                     │ERROR [GET http://elastic:changeme@localhost:6181/api/status] request failed (attempt=5/5)
[00:05:09]                     └- ✖ fail: "spaces api with security copy to spaces rbac user with all at space from the space_1 space "after each" hook for "should return 200 when copying to space without conflicts with references""
[00:05:09]                     │
[00:05:09]                     └-> "after all" hook

Stack Trace

{ DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    at emitDeprecationWarning (internal/process/promises.js:111:13)
    at emitWarning (internal/process/promises.js:104:3)
    at emitPromiseRejectionWarnings (internal/process/promises.js:143:7)
    at process._tickCallback (internal/process/next_tick.js:69:34)
  name: 'DeprecationWarning',
  code: 'DEP0018',
  uncaught: true,
  multiple:
   [ Error: [migrate saved objects] request failed (attempt=5/5) -- and ran out of retries
         at KbnClientRequester.request (/dev/shm/workspace/kibana/packages/kbn-dev-utils/target/kbn_client/kbn_client_requester.js:99:23)
         at process._tickCallback (internal/process/next_tick.js:68:7) ] }

Kibana Pipeline / kibana-xpack-agent / X-Pack Spaces API Integration Tests -- security_and_spaces.x-pack/test/spaces_api_integration/security_and_spaces/apis/copy_to_space·ts.spaces api with security copy to spaces rbac user with all at space from the space_1 space "after each" hook for "should return 200 when copying to space without conflicts with references"

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: spaces api with security
[00:00:00]           └-> "before all" hook
[00:00:00]           └-> "before all" hook
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_legacy_user]
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_dual_privileges_user]
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_dual_privileges_dashboard_only_user]
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_user]
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_dashboard_only_user]
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_default_space_all_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_default_space_read_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_1_all_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_1_read_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_2_all_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_2_read_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_1_2_all_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_1_2_read_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_default_space_saved_objects_all_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_default_space_saved_objects_read_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_1_saved_objects_all_user]
[00:00:03]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_1_saved_objects_read_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [not_a_kibana_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_legacy_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_dual_privileges_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_dual_privileges_dashboard_only_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_dashboard_only_user]
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_default_space_all_user]
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_default_space_read_user]
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_1_all_user]
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_1_read_user]
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_2_all_user]
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_2_read_user]
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_1_2_all_user]
[00:00:05]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_1_2_read_user]
[00:00:05]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_default_space_saved_objects_all_user]
[00:00:05]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_default_space_saved_objects_read_user]
[00:00:05]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_1_saved_objects_all_user]
[00:00:05]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_1_saved_objects_read_user]
[00:00:05]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_apm_user]
[00:00:06]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_machine_learning_admin]
[00:00:06]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_machine_learning_user]
[00:00:06]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_monitoring_user]
[00:00:06]           └-: copy to spaces
[00:00:06]             └-> "before all" hook
[00:04:55]             └-: rbac user with all at space from the space_1 space
[00:04:55]               └-> "before all" hook
[00:04:55]               └-> "before all" hook
[00:04:55]               └-> should return 200 when copying to space without conflicts or references
[00:04:55]                 └-> "before each" hook: global before each
[00:04:55]                 └-> "before each" hook
[00:04:55]                   │ info [saved_objects/spaces] Loading "mappings.json"
[00:04:55]                   │ info [saved_objects/spaces] Loading "data.json"
[00:04:56]                   │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_2/0jzl-bRcT-6qpF0K8gHvmw] deleting index
[00:04:56]                   │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_1/JMmz14wLRe25IG9RoGqX8g] deleting index
[00:04:56]                   │ info [saved_objects/spaces] Deleted existing index [".kibana_2",".kibana_1"]
[00:04:56]                   │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:04:56]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana][0]]]).
[00:04:56]                   │ info [saved_objects/spaces] Created index ".kibana"
[00:04:56]                   │ debg [saved_objects/spaces] ".kibana" settings {"index":{"auto_expand_replicas":"0-1","number_of_replicas":"0","number_of_shards":"1"}}
[00:04:56]                   │ info [saved_objects/spaces] Indexed 16 docs into ".kibana"
[00:04:56]                   │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana/doJ5daPFRYaF6dmwS4I-yw] update_mapping [_doc]
[00:04:56]                   │ debg Migrating saved objects
[00:04:57]                   │ proc [kibana]   log   [15:14:03.378] [info][savedobjects-service] Creating index .kibana_2.
[00:04:57]                   │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:04:57]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] updating number_of_replicas to [0] for indices [.kibana_2]
[00:04:57]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_2][0]]]).
[00:04:57]                   │ proc [kibana]   log   [15:14:03.479] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:04:57]                   │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:04:57]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] updating number_of_replicas to [0] for indices [.kibana_1]
[00:04:57]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_1][0]]]).
[00:04:57]                   │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] 25199 finished with response BulkByScrollResponse[took=52.7ms,timed_out=false,sliceId=null,updated=0,created=17,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:04:57]                   │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana/doJ5daPFRYaF6dmwS4I-yw] deleting index
[00:04:57]                   │ proc [kibana]   log   [15:14:03.860] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:04:57]                   │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_2/c63JNyZHS7m-lprDyUxNbw] update_mapping [_doc]
[00:04:57]                   │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_2/c63JNyZHS7m-lprDyUxNbw] update_mapping [_doc]
[00:04:57]                   │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_2/c63JNyZHS7m-lprDyUxNbw] update_mapping [_doc]
[00:04:57]                   │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_2/c63JNyZHS7m-lprDyUxNbw] update_mapping [_doc]
[00:04:57]                   │ proc [kibana]   log   [15:14:04.037] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:04:57]                   │ proc [kibana]   log   [15:14:04.085] [info][savedobjects-service] Finished in 712ms.
[00:04:58]                 └- ✓ pass  (425ms) "spaces api with security copy to spaces rbac user with all at space from the space_1 space should return 200 when copying to space without conflicts or references"
[00:04:58]               └-> "after each" hook
[00:04:58]                 │ info [saved_objects/spaces] Unloading indices from "mappings.json"
[00:04:58]                 │ warn since spaces are enabled, all objects other than the default space were deleted from .kibana rather than deleting the whole index
[00:04:58]                 │ info [saved_objects/spaces] Deleted existing index ".kibana"
[00:04:58]                 │ info [saved_objects/spaces] Unloading indices from "data.json"
[00:04:58]               └-> should return 200 when copying to space without conflicts with references
[00:04:58]                 └-> "before each" hook: global before each
[00:04:58]                 └-> "before each" hook
[00:04:59]                   │ info [saved_objects/spaces] Loading "mappings.json"
[00:04:59]                   │ info [saved_objects/spaces] Loading "data.json"
[00:04:59]                   │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_2/c63JNyZHS7m-lprDyUxNbw] deleting index
[00:04:59]                   │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_1/13kNUJgBSQmj18VNlU-qNA] deleting index
[00:04:59]                   │ info [saved_objects/spaces] Deleted existing index [".kibana_2",".kibana_1"]
[00:04:59]                   │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:04:59]                   │ info [r.suppressed] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] path: /.kibana/_doc/telemetry%3Atelemetry, params: {index=.kibana, id=telemetry:telemetry}
[00:04:59]                   │      org.elasticsearch.action.NoShardAvailableActionException: No shard available for [get [.kibana][_doc][telemetry:telemetry]: routing [null]]
[00:04:59]                   │      	at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.perform(TransportSingleShardAction.java:224) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.onFailure(TransportSingleShardAction.java:210) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.access$1100(TransportSingleShardAction.java:136) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction$2.handleException(TransportSingleShardAction.java:266) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:1126) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:1235) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:1209) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.transport.TaskTransportChannel.sendResponse(TaskTransportChannel.java:60) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.support.ChannelActionListener.onFailure(ChannelActionListener.java:56) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.ActionRunnable.onFailure(ActionRunnable.java:88) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.onFailure(ThreadContext.java:680) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:39) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
[00:04:59]                   │      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
[00:04:59]                   │      	at java.lang.Thread.run(Thread.java:830) [?:?]
[00:04:59]                   │      Caused by: org.elasticsearch.transport.RemoteTransportException: [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898][127.0.0.1:6183][indices:data/read/get[s]]
[00:04:59]                   │      Caused by: org.elasticsearch.index.shard.IllegalIndexShardStateException: CurrentState[RECOVERING] operations only allowed when shard state is one of [POST_RECOVERY, STARTED]
[00:04:59]                   │      	at org.elasticsearch.index.shard.IndexShard.readAllowed(IndexShard.java:1729) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.index.shard.IndexShard.get(IndexShard.java:941) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.index.get.ShardGetService.innerGet(ShardGetService.java:180) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.index.get.ShardGetService.get(ShardGetService.java:104) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.index.get.ShardGetService.get(ShardGetService.java:95) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.get.TransportGetAction.shardOperation(TransportGetAction.java:106) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.get.TransportGetAction.shardOperation(TransportGetAction.java:45) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.support.single.shard.TransportSingleShardAction.lambda$asyncShardOperation$0(TransportSingleShardAction.java:110) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.ActionRunnable.lambda$supply$0(ActionRunnable.java:58) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:73) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:692) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	... 3 more
[00:04:59]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana][0]]]).
[00:04:59]                   │ proc [kibana] internal/process/warning.js:153
[00:04:59]                   │ proc [kibana]         throw warning;
[00:04:59]                   │ proc [kibana]         ^
[00:04:59]                   │ proc [kibana] 
[00:04:59]                   │ proc [kibana] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[00:04:59]                   │ proc [kibana]     at emitDeprecationWarning (internal/process/promises.js:111:13)
[00:04:59]                   │ proc [kibana]     at emitWarning (internal/process/promises.js:104:3)
[00:04:59]                   │ proc [kibana]     at emitPromiseRejectionWarnings (internal/process/promises.js:143:7)
[00:04:59]                   │ proc [kibana]     at process._tickCallback (internal/process/next_tick.js:69:34)
[00:04:59]                   │ info [saved_objects/spaces] Created index ".kibana"
[00:04:59]                   │ debg [saved_objects/spaces] ".kibana" settings {"index":{"auto_expand_replicas":"0-1","number_of_replicas":"0","number_of_shards":"1"}}
[00:04:59]                   │ info [saved_objects/spaces] Indexed 16 docs into ".kibana"
[00:04:59]                   └- ✖ fail: "spaces api with security copy to spaces rbac user with all at space from the space_1 space "before each" hook"
[00:04:59]                   │
[00:04:59]                   └-> "after each" hook
[00:04:59]                     │ERROR [GET http://elastic:changeme@localhost:6181/api/status] request failed (attempt=1/5)
[00:04:59]                     │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana/0AoPeoP2ShGP3R8mzZW4Gg] update_mapping [_doc]
[00:04:59]                     │ debg Migrating saved objects
[00:04:59]                     │ERROR [migrate saved objects] request failed (attempt=1/5)
[00:05:00]                     │ERROR [GET http://elastic:changeme@localhost:6181/api/status] request failed (attempt=2/5)
[00:05:00]                     │ERROR [migrate saved objects] request failed (attempt=2/5)
[00:05:02]                     │ERROR [GET http://elastic:changeme@localhost:6181/api/status] request failed (attempt=3/5)
[00:05:02]                     │ERROR [migrate saved objects] request failed (attempt=3/5)
[00:05:05]                     │ERROR [GET http://elastic:changeme@localhost:6181/api/status] request failed (attempt=4/5)
[00:05:05]                     │ERROR [migrate saved objects] request failed (attempt=4/5)
[00:05:09]                     │ERROR [GET http://elastic:changeme@localhost:6181/api/status] request failed (attempt=5/5)
[00:05:09]                     └- ✖ fail: "spaces api with security copy to spaces rbac user with all at space from the space_1 space "after each" hook for "should return 200 when copying to space without conflicts with references""
[00:05:09]                     │

Stack Trace

Error: [GET http://elastic:changeme@localhost:6181/api/status] request failed (attempt=5/5) -- and ran out of retries
    at KbnClientRequester.request (/dev/shm/workspace/kibana/packages/kbn-dev-utils/target/kbn_client/kbn_client_requester.js:99:23)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Kibana Pipeline / kibana-xpack-agent / X-Pack Spaces API Integration Tests -- security_and_spaces.x-pack/test/spaces_api_integration/security_and_spaces/apis/copy_to_space·ts.spaces api with security copy to spaces rbac user with all at space from the space_1 space "before each" hook in "rbac user with all at space from the space_1 space"

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 6 times on tracked branches: https://github.com/elastic/kibana/issues/59240
  - Test has failed 6 times on tracked branches: https://github.com/elastic/kibana/issues/59240

[00:00:00]       │
[00:00:00]         └-: spaces api with security
[00:00:00]           └-> "before all" hook
[00:00:00]           └-> "before all" hook
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_legacy_user]
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_dual_privileges_user]
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_dual_privileges_dashboard_only_user]
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_user]
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_dashboard_only_user]
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_default_space_all_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_default_space_read_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_1_all_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_1_read_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_2_all_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_2_read_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_1_2_all_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_1_2_read_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_default_space_saved_objects_all_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_default_space_saved_objects_read_user]
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_1_saved_objects_all_user]
[00:00:03]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added role [kibana_rbac_space_1_saved_objects_read_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [not_a_kibana_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_legacy_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_dual_privileges_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_dual_privileges_dashboard_only_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_dashboard_only_user]
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_default_space_all_user]
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_default_space_read_user]
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_1_all_user]
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_1_read_user]
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_2_all_user]
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_2_read_user]
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_1_2_all_user]
[00:00:05]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_1_2_read_user]
[00:00:05]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_default_space_saved_objects_all_user]
[00:00:05]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_default_space_saved_objects_read_user]
[00:00:05]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_1_saved_objects_all_user]
[00:00:05]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_kibana_rbac_space_1_saved_objects_read_user]
[00:00:05]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_apm_user]
[00:00:06]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_machine_learning_admin]
[00:00:06]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_machine_learning_user]
[00:00:06]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] added user [a_monitoring_user]
[00:05:09]                 └-> "after all" hook
[00:00:06]           └-: copy to spaces
[00:00:06]             └-> "before all" hook
[00:05:09]                   └-> "after all" hook
[00:04:55]             └-: rbac user with all at space from the space_1 space
[00:04:55]               └-> "before all" hook
[00:04:55]               └-> "before all" hook
[00:04:55]               └-> should return 200 when copying to space without conflicts or references
[00:04:55]                 └-> "before each" hook: global before each
[00:04:55]                 └-> "before each" hook
[00:04:55]                   │ info [saved_objects/spaces] Loading "mappings.json"
[00:04:55]                   │ info [saved_objects/spaces] Loading "data.json"
[00:04:56]                   │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_2/0jzl-bRcT-6qpF0K8gHvmw] deleting index
[00:04:56]                   │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_1/JMmz14wLRe25IG9RoGqX8g] deleting index
[00:04:56]                   │ info [saved_objects/spaces] Deleted existing index [".kibana_2",".kibana_1"]
[00:04:56]                   │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:04:56]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana][0]]]).
[00:04:56]                   │ info [saved_objects/spaces] Created index ".kibana"
[00:04:56]                   │ debg [saved_objects/spaces] ".kibana" settings {"index":{"auto_expand_replicas":"0-1","number_of_replicas":"0","number_of_shards":"1"}}
[00:04:56]                   │ info [saved_objects/spaces] Indexed 16 docs into ".kibana"
[00:04:56]                   │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana/doJ5daPFRYaF6dmwS4I-yw] update_mapping [_doc]
[00:04:56]                   │ debg Migrating saved objects
[00:04:57]                   │ proc [kibana]   log   [15:14:03.378] [info][savedobjects-service] Creating index .kibana_2.
[00:04:57]                   │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:04:57]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] updating number_of_replicas to [0] for indices [.kibana_2]
[00:04:57]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_2][0]]]).
[00:04:57]                   │ proc [kibana]   log   [15:14:03.479] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:04:57]                   │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:04:57]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] updating number_of_replicas to [0] for indices [.kibana_1]
[00:04:57]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_1][0]]]).
[00:04:57]                   │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] 25199 finished with response BulkByScrollResponse[took=52.7ms,timed_out=false,sliceId=null,updated=0,created=17,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:04:57]                   │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana/doJ5daPFRYaF6dmwS4I-yw] deleting index
[00:04:57]                   │ proc [kibana]   log   [15:14:03.860] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:04:57]                   │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_2/c63JNyZHS7m-lprDyUxNbw] update_mapping [_doc]
[00:04:57]                   │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_2/c63JNyZHS7m-lprDyUxNbw] update_mapping [_doc]
[00:04:57]                   │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_2/c63JNyZHS7m-lprDyUxNbw] update_mapping [_doc]
[00:04:57]                   │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_2/c63JNyZHS7m-lprDyUxNbw] update_mapping [_doc]
[00:04:57]                   │ proc [kibana]   log   [15:14:04.037] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:04:57]                   │ proc [kibana]   log   [15:14:04.085] [info][savedobjects-service] Finished in 712ms.
[00:04:58]                 └- ✓ pass  (425ms) "spaces api with security copy to spaces rbac user with all at space from the space_1 space should return 200 when copying to space without conflicts or references"
[00:04:58]               └-> "after each" hook
[00:04:58]                 │ info [saved_objects/spaces] Unloading indices from "mappings.json"
[00:04:58]                 │ warn since spaces are enabled, all objects other than the default space were deleted from .kibana rather than deleting the whole index
[00:04:58]                 │ info [saved_objects/spaces] Deleted existing index ".kibana"
[00:04:58]                 │ info [saved_objects/spaces] Unloading indices from "data.json"
[00:04:58]               └-> should return 200 when copying to space without conflicts with references
[00:04:58]                 └-> "before each" hook: global before each
[00:04:58]                 └-> "before each" hook
[00:04:59]                   │ info [saved_objects/spaces] Loading "mappings.json"
[00:04:59]                   │ info [saved_objects/spaces] Loading "data.json"
[00:04:59]                   │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_2/c63JNyZHS7m-lprDyUxNbw] deleting index
[00:04:59]                   │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana_1/13kNUJgBSQmj18VNlU-qNA] deleting index
[00:04:59]                   │ info [saved_objects/spaces] Deleted existing index [".kibana_2",".kibana_1"]
[00:04:59]                   │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:04:59]                   │ info [r.suppressed] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] path: /.kibana/_doc/telemetry%3Atelemetry, params: {index=.kibana, id=telemetry:telemetry}
[00:04:59]                   │      org.elasticsearch.action.NoShardAvailableActionException: No shard available for [get [.kibana][_doc][telemetry:telemetry]: routing [null]]
[00:04:59]                   │      	at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.perform(TransportSingleShardAction.java:224) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.onFailure(TransportSingleShardAction.java:210) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.access$1100(TransportSingleShardAction.java:136) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction$2.handleException(TransportSingleShardAction.java:266) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:1126) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:1235) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:1209) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.transport.TaskTransportChannel.sendResponse(TaskTransportChannel.java:60) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.support.ChannelActionListener.onFailure(ChannelActionListener.java:56) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.ActionRunnable.onFailure(ActionRunnable.java:88) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.onFailure(ThreadContext.java:680) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:39) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
[00:04:59]                   │      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
[00:04:59]                   │      	at java.lang.Thread.run(Thread.java:830) [?:?]
[00:04:59]                   │      Caused by: org.elasticsearch.transport.RemoteTransportException: [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898][127.0.0.1:6183][indices:data/read/get[s]]
[00:04:59]                   │      Caused by: org.elasticsearch.index.shard.IllegalIndexShardStateException: CurrentState[RECOVERING] operations only allowed when shard state is one of [POST_RECOVERY, STARTED]
[00:04:59]                   │      	at org.elasticsearch.index.shard.IndexShard.readAllowed(IndexShard.java:1729) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.index.shard.IndexShard.get(IndexShard.java:941) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.index.get.ShardGetService.innerGet(ShardGetService.java:180) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.index.get.ShardGetService.get(ShardGetService.java:104) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.index.get.ShardGetService.get(ShardGetService.java:95) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.get.TransportGetAction.shardOperation(TransportGetAction.java:106) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.get.TransportGetAction.shardOperation(TransportGetAction.java:45) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.support.single.shard.TransportSingleShardAction.lambda$asyncShardOperation$0(TransportSingleShardAction.java:110) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.ActionRunnable.lambda$supply$0(ActionRunnable.java:58) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:73) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:692) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
[00:04:59]                   │      	... 3 more
[00:04:59]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana][0]]]).
[00:04:59]                   │ proc [kibana] internal/process/warning.js:153
[00:04:59]                   │ proc [kibana]         throw warning;
[00:04:59]                   │ proc [kibana]         ^
[00:04:59]                   │ proc [kibana] 
[00:04:59]                   │ proc [kibana] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[00:04:59]                   │ proc [kibana]     at emitDeprecationWarning (internal/process/promises.js:111:13)
[00:04:59]                   │ proc [kibana]     at emitWarning (internal/process/promises.js:104:3)
[00:04:59]                   │ proc [kibana]     at emitPromiseRejectionWarnings (internal/process/promises.js:143:7)
[00:04:59]                   │ proc [kibana]     at process._tickCallback (internal/process/next_tick.js:69:34)
[00:04:59]                   │ info [saved_objects/spaces] Created index ".kibana"
[00:04:59]                   │ debg [saved_objects/spaces] ".kibana" settings {"index":{"auto_expand_replicas":"0-1","number_of_replicas":"0","number_of_shards":"1"}}
[00:04:59]                   │ info [saved_objects/spaces] Indexed 16 docs into ".kibana"
[00:04:59]                   └- ✖ fail: "spaces api with security copy to spaces rbac user with all at space from the space_1 space "before each" hook"
[00:04:59]                   │
[00:04:59]                   └-> "after each" hook
[00:04:59]                     │ERROR [GET http://elastic:changeme@localhost:6181/api/status] request failed (attempt=1/5)
[00:04:59]                     │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1583849640912259898] [.kibana/0AoPeoP2ShGP3R8mzZW4Gg] update_mapping [_doc]
[00:04:59]                     │ debg Migrating saved objects
[00:04:59]                     │ERROR [migrate saved objects] request failed (attempt=1/5)
[00:05:00]                     │ERROR [GET http://elastic:changeme@localhost:6181/api/status] request failed (attempt=2/5)
[00:05:00]                     │ERROR [migrate saved objects] request failed (attempt=2/5)
[00:05:02]                     │ERROR [GET http://elastic:changeme@localhost:6181/api/status] request failed (attempt=3/5)
[00:05:02]                     │ERROR [migrate saved objects] request failed (attempt=3/5)
[00:05:05]                     │ERROR [GET http://elastic:changeme@localhost:6181/api/status] request failed (attempt=4/5)
[00:05:05]                     │ERROR [migrate saved objects] request failed (attempt=4/5)
[00:05:09]                     │ERROR [GET http://elastic:changeme@localhost:6181/api/status] request failed (attempt=5/5)
[00:05:09]                     └- ✖ fail: "spaces api with security copy to spaces rbac user with all at space from the space_1 space "after each" hook for "should return 200 when copying to space without conflicts with references""
[00:05:09]                     │
[00:05:09]                     └-> "after all" hook

Stack Trace

Error: [migrate saved objects] request failed (attempt=5/5) -- and ran out of retries
    at KbnClientRequester.request (/dev/shm/workspace/kibana/packages/kbn-dev-utils/target/kbn_client/kbn_client_requester.js:99:23)
    at process._tickCallback (internal/process/next_tick.js:68:7)

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

@rylnd rylnd merged commit 6e08471 into elastic:7.x Mar 10, 2020
@rylnd rylnd deleted the backport/7.x/pr-59438 branch March 10, 2020 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants