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

CI org.elasticsearch.xpack.security.authz.ReadActionsTests testEmptyAuthorizedIndicesSearchForWildcard fails #30098

Closed
elasticmachine opened this issue Sep 19, 2017 · 4 comments · Fixed by #33296
Assignees
Labels
:Security/Security Security issues without another label >test-failure Triaged test failures from CI

Comments

@elasticmachine
Copy link
Collaborator

Original comment by @nik9000:

This ReadActionsTests failure doesn't reproduce for me locally.

gradle :x-pack-elasticsearch:plugin:test -Dtests.seed=6905B0F3BC9A59AE -Dtests.class=org.elasticsearch.xpack.security.authz.ReadActionsTests -Dtests.method="testEmptyAuthorizedIndicesSearchForWildcard" -Dtests.security.manager=true -Dtests.locale=en -Dtests.timezone=America/St_Barthelemy
09:58:37 ERROR   0.32s J0 | ReadActionsTests.testEmptyAuthorizedIndicesSearchForWildcard <<< FAILURES!
09:58:37    > Throwable LINK REDACTED: org.elasticsearch.action.ActionRequestValidationException: Validation Failed: 1: Must specify at least one alias action;
09:58:37    > 	at __randomizedtesting.SeedInfo.seed([6905B0F3BC9A59AE:3EC5FAC192761760]:0)
09:58:37    > 	at org.elasticsearch.action.ValidateActions.addValidationError(ValidateActions.java:29)
09:58:37    > 	at org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest.validate(IndicesAliasesRequest.java:460)
09:58:37    > 	at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:131)
09:58:37    > 	at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:84)
09:58:37    > 	at org.elasticsearch.client.node.NodeClient.executeLocally(NodeClient.java:83)
09:58:37    > 	at org.elasticsearch.client.node.NodeClient.doExecute(NodeClient.java:72)
09:58:37    > 	at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:408)
09:58:37    > 	at org.elasticsearch.client.FilterClient.doExecute(FilterClient.java:67)
09:58:37    > 	at org.elasticsearch.client.support.AbstractClient$1.doExecute(AbstractClient.java:1784)
09:58:37    > 	at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:408)
09:58:37    > 	at org.elasticsearch.client.FilterClient.doExecute(FilterClient.java:67)
09:58:37    > 	at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:408)
09:58:37    > 	at org.elasticsearch.client.support.AbstractClient$IndicesAdmin.execute(AbstractClient.java:1256)
09:58:37    > 	at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:80)
09:58:37    > 	at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:54)
09:58:37    > 	at org.elasticsearch.action.ActionRequestBuilder.get(ActionRequestBuilder.java:62)
09:58:37    > 	at org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked(ElasticsearchAssertions.java:110)
09:58:37    > 	at org.elasticsearch.test.SecurityIntegTestCase.createIndicesWithRandomAliases(SecurityIntegTestCase.java:422)
09:58:37    > 	at org.elasticsearch.xpack.security.authz.ReadActionsTests.testEmptyAuthorizedIndicesSearchForWildcard(ReadActionsTests.java:125)
09:58:37    > 	at java.lang.Thread.run(Thread.java:748)
@elasticmachine
Copy link
Collaborator Author

Original comment by @jaymode:

@albertzaharovits can you take a look at this failure?

@elasticmachine
Copy link
Collaborator Author

Original comment by @albertzaharovits:

Will do! It does not reproduce locally either.

@elasticmachine
Copy link
Collaborator Author

Original comment by @tlrx:

Different test in the same class with a similar error on 6.x:

08:50:55 ERROR   0.35s J0 | ReadActionsTests.testEmptyAuthorizedIndicesSearchForAllDisallowNoIndices <<< FAILURES!
08:50:55    > Throwable LINK REDACTED: org.elasticsearch.action.ActionRequestValidationException: Validation Failed: 1: Must specify at least one alias action;
08:50:55    > 	at __randomizedtesting.SeedInfo.seed([3AA5871380B7AB4F:7E7A3A3253A38D0C]:0)
08:50:55    > 	at org.elasticsearch.action.ValidateActions.addValidationError(ValidateActions.java:26)
08:50:55    > 	at org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest.validate(IndicesAliasesRequest.java:461)
08:50:55    > 	at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:128)
08:50:55    > 	at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:81)
08:50:55    > 	at org.elasticsearch.client.node.NodeClient.executeLocally(NodeClient.java:83)
08:50:55    > 	at org.elasticsearch.client.node.NodeClient.doExecute(NodeClient.java:72)
08:50:55    > 	at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:405)
08:50:55    > 	at org.elasticsearch.client.FilterClient.doExecute(FilterClient.java:67)
08:50:55    > 	at org.elasticsearch.client.support.AbstractClient$1.doExecute(AbstractClient.java:1781)
08:50:55    > 	at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:405)
08:50:55    > 	at org.elasticsearch.client.FilterClient.doExecute(FilterClient.java:67)
08:50:55    > 	at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:405)
08:50:55    > 	at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:394)
08:50:55    > 	at org.elasticsearch.client.support.AbstractClient$IndicesAdmin.execute(AbstractClient.java:1247)
08:50:55    > 	at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:46)
08:50:55    > 	at org.elasticsearch.action.ActionRequestBuilder.get(ActionRequestBuilder.java:53)
08:50:55    > 	at org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked(ElasticsearchAssertions.java:112)
08:50:55    > 	at org.elasticsearch.test.SecurityIntegTestCase.createIndicesWithRandomAliases(SecurityIntegTestCase.java:426)
08:50:55    > 	at org.elasticsearch.xpack.security.authz.ReadActionsTests.testEmptyAuthorizedIndicesSearchForAllDisallowNoIndices(ReadActionsTests.java:118)
08:50:55    > 	at java.lang.Thread.run(Thread.java:748)

It does not reproduce for me locally. Failed job is REDACTED LINK
See
[consoleText.txt](REDACTED LINK)

@elasticmachine elasticmachine added :Security/Security Security issues without another label >test-failure Triaged test failures from CI labels Apr 25, 2018
@vladimirdolzhenko
Copy link
Contributor

recent build failure:

Log:
https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+6.x+multijob-unix-compatibility/os=sles/1066/console

Reproduce steps

./gradlew :x-pack:plugin:security:test -Dtests.seed=FF986EE1F952641 -Dtests.class=org.elasticsearch.xpack.security.authz.ReadActionsTests -Dtests.method="testTermVectors" -Dtests.security.manager=true -Dtests.locale=id-ID -Dtests.timezone=America/Argentina/Cordoba

colings86 added a commit that referenced this issue Aug 31, 2018
)

* Fixes SecurityIntegTestCase so it always adds at least one alias

`SecurityIntegTestCase.createIndicesWithRandomAliases` could randomly
fail because its not gauranteed that the randomness of which aliases to
add to the `IndicesAliasesRequestBuilder` would always select at least
one alias to add. This change fixes the problem by keeping track of
whether we have added an alias to teh request and forcing the last
alias to be added if no other aliases have been added so far.

Closes #30098
Closes #33123e

* Addresses review comments
colings86 added a commit that referenced this issue Aug 31, 2018
(#33296)

* Fixes SecurityIntegTestCase so it always adds at least one alias

`SecurityIntegTestCase.createIndicesWithRandomAliases` could randomly
fail because its not gauranteed that the randomness of which aliases to
add to the `IndicesAliasesRequestBuilder` would always select at least
one alias to add. This change fixes the problem by keeping track of
whether we have added an alias to teh request and forcing the last
alias to be added if no other aliases have been added so far.

Closes #30098
Closes #33123e

* Addresses review comments
colings86 added a commit that referenced this issue Aug 31, 2018
(#33296)

* Fixes SecurityIntegTestCase so it always adds at least one alias

`SecurityIntegTestCase.createIndicesWithRandomAliases` could randomly
fail because its not gauranteed that the randomness of which aliases to
add to the `IndicesAliasesRequestBuilder` would always select at least
one alias to add. This change fixes the problem by keeping track of
whether we have added an alias to teh request and forcing the last
alias to be added if no other aliases have been added so far.

Closes #30098
Closes #33123e

* Addresses review comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Security/Security Security issues without another label >test-failure Triaged test failures from CI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants