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] MlJobIT#testDeleteJobAfterMissingAliases fails #32034

Closed
cbuescher opened this issue Jul 13, 2018 · 5 comments
Closed

[CI] MlJobIT#testDeleteJobAfterMissingAliases fails #32034

cbuescher opened this issue Jul 13, 2018 · 5 comments
Assignees
Labels
:ml Machine learning >test-failure Triaged test failures from CI

Comments

@cbuescher
Copy link
Member

Failure: https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+intake/2315/console

This doesn't reproduce locally:

REPRODUCE WITH: ./gradlew :x-pack:qa:ml-native-multi-node-tests:integTestRunner \
  -Dtests.seed=2D9C408C6CA59049 \
  -Dtests.class=org.elasticsearch.xpack.ml.integration.MlJobIT \
  -Dtests.method="testDeleteJobAfterMissingAliases" \
  -Dtests.security.manager=true \
  -Dtests.locale=cs \
  -Dtests.timezone=Africa/Monrovia

Error:

org.elasticsearch.client.ResponseException: method [GET], host [http://[::1]:40430], URI [_cat/aliases], status line [HTTP/1.1 404 Not Found]
{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index","index_uuid":"_na_","resource.type":"index_or_alias","resource.id":".ml-notifications","index":".ml-notifications"}],"type":"index_not_found_exception","reason":"no such index","index_uuid":"_na_","resource.type":"index_or_alias","resource.id":".ml-notifications","index":".ml-notifications"},"status":404}
	at __randomizedtesting.SeedInfo.seed([2D9C408C6CA59049:84ABAB451D02DB1B]:0)
	at org.elasticsearch.client.RestClient$SyncResponseListener.get(RestClient.java:920)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:227)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:272)
	at org.elasticsearch.xpack.ml.integration.MlJobIT.testDeleteJobAfterMissingAliases(MlJobIT.java:448)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1713)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:907)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:943)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:957)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at org.apache.lucene.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:49)
	at org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:45)
	at org.apache.lucene.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:48)
	at org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:64)
	at org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:47)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368)
	at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:817)
	at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:468)
	at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:916)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:802)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:852)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:863)
	at org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:45)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at org.apache.lucene.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:41)
	at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
	at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
	at org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:47)
	at org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:64)
	at org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:54)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.elasticsearch.client.ResponseException: method [GET], host [http://[::1]:40430], URI [_cat/aliases], status line [HTTP/1.1 404 Not Found]
{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index","index_uuid":"_na_","resource.type":"index_or_alias","resource.id":".ml-notifications","index":".ml-notifications"}],"type":"index_not_found_exception","reason":"no such index","index_uuid":"_na_","resource.type":"index_or_alias","resource.id":".ml-notifications","index":".ml-notifications"},"status":404}
	at org.elasticsearch.client.RestClient$1.completed(RestClient.java:540)
	at org.elasticsearch.client.RestClient$1.completed(RestClient.java:529)
	at org.apache.http.concurrent.BasicFuture.completed(BasicFuture.java:119)
	at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.responseCompleted(DefaultClientExchangeHandlerImpl.java:177)
	at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.processResponse(HttpAsyncRequestExecutor.java:436)
	at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.inputReady(HttpAsyncRequestExecutor.java:326)
	at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:265)
	at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:81)
	at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:39)
	at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:114)
	at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162)
	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337)
	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315)
	at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276)
	at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:588)
	... 1 more
@cbuescher cbuescher added >test-failure Triaged test failures from CI :ml Machine learning labels Jul 13, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core

@cbuescher cbuescher changed the title [CI] [CI] MlJobIT#testDeleteJobAfterMissingAliases fails Jul 13, 2018
@dimitris-athanasiou
Copy link
Contributor

Line 448 on the test is:

Response response = client().performRequest("get", "_cat/aliases");

How could that throw IndexNotFoundException? I must be missing something.

@droberts195
Copy link
Contributor

It's the age-old problem about security changing the behaviour of some endpoints. One such endpoint is _cat/aliases in the (unlikely) case where no indices exist.

It can be demonstrated as follows:

  1. ./gradlew run (i.e. no security)
  2. In a browser go to http://localhost:9200/_cat/aliases
  3. Note the blank response
  4. CTRL+C ES
  5. ./gradlew run -Dtests.es.xpack.license.self_generated.type=trial
  6. In a browser go to http://localhost:9200/_cat/aliases
  7. Log in with elastic / password
  8. The result is:
{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index","index_uuid":"_na_","index":"_all"}],"type":"index_not_found_exception","reason":"no such index","index_uuid":"_na_","index":"_all"},"status":404}

This is extremely unlikely to affect any customer, as anyone creating an ML job probably has at least one other index.

But possibly what we should do is wait for the job results index to exist before returning from creating a job. This would give a more consistent end-user experience - the instant create job returns you could safely search the job results index without risk of an exception.

I assume the reason this bug has surfaced now is that creating an index on a multi-node cluster takes longer than on a single node cluster so it's another side-effect of switching the native tests to a 3 node cluster.

@jimczi
Copy link
Contributor

jimczi commented Jul 16, 2018

@davidkyle davidkyle self-assigned this Jul 16, 2018
@jimczi
Copy link
Contributor

jimczi commented Jul 16, 2018

Another instance in 6.x:
https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+6.x+multijob-unix-compatibility/os=sles/1184/console
I muted the tests in 6.x and master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ml Machine learning >test-failure Triaged test failures from CI
Projects
None yet
Development

No branches or pull requests

6 participants