Skip to content

fix and enable repository-hdfs secure tests #44044

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

Merged
merged 13 commits into from
Jul 10, 2019

Conversation

bizybot
Copy link
Contributor

@bizybot bizybot commented Jul 7, 2019

Due to recent changes are done for converting repository-hdfs to test
clusters (#41252), the integTestSecure* tasks did not depend on
secureHdfsFixture which when running would fail as the fixture
would not be available. This commit adds the dependency of the fixture
to the task.

The secureHdfsFixture is a AntFixture which is spawned a process.
Internally it waits for 30 seconds for the resources to be made available.
For my local machine, it took almost 45 seconds to be available so I have
added the wait time as an input to the AntFixture defaults to 30 seconds
and set it to 60 seconds in case of secure hdfs fixture.

The integ test for secure hdfs was disabled for a long time and so
the changes done in #42090 to fix the tests are also done in this commit.

@atorok
As we spawn a process for secure hdfs fixture, in case the task is interrupted/killed the spawned
process would keep running. Though I faced this problem locally when I used ctrl + c, there is a possibility that this happens on CI and then these process will keep running. Is there a standard way I could handle this? Thank you.

@bizybot bizybot added >test Issues or PRs that are addressing/adding tests :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v8.0.0 v7.4.0 labels Jul 7, 2019
@bizybot bizybot requested review from jbaiera and alpar-t July 7, 2019 15:51
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

Due to recent changes done for converting `repository-hdfs` to test
clusters (elastic#41252), the `integTestSecure*` tasks did not depend on
`secureHdfsFixture` which when running would fail as the fixture
would not be available. This commit adds the dependency of fixture
to the task.

The `secureHdfsFixture` is an AntFixture which is spawned process.
Internally it waits for 30 seconds for the resources to be made available.
For my local machine it took almost 45 seconds to be available so I have
added the wait time as an input to the AntFixture defaults to 30 seconds
 and set it to 60 seconds in case of secure hdfs fixture.

Another problem while running the `secureHdfsFixture` where it would fail
due to port not being privileged port (i.e system port, port < 1024).
By default datanode address key tries to find a free port and this would
later on fail in case it is running in a secure mode. To address this
in case of secure mode we find free port below 1024 and set it in the
config. The config `DFSConfigKeys.IGNORE_SECURE_PORTS_FOR_TESTING_KEY` is set to
`true` but it did not help.
https://fisheye.apache.org/browse/~br=branch-2.8.1/hadoop/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/SecureDataNodeStarter.java?hb=true#to140

The integ test for secure hdfs were disabled for long time and so
the changes done in elastic#42090 to fix the tests are also done in this commit.
@bizybot bizybot force-pushed the fix-hdfs-repository-tests branch from 79d5f52 to f4bf100 Compare July 7, 2019 16:18
@bizybot
Copy link
Contributor Author

bizybot commented Jul 7, 2019

@elasticmachine run elasticsearch-ci/1

1 similar comment
@bizybot
Copy link
Contributor Author

bizybot commented Jul 8, 2019

@elasticmachine run elasticsearch-ci/1

Copy link
Contributor

@alpar-t alpar-t left a comment

Choose a reason for hiding this comment

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

LGTM

We have the issue you describe with all ant fixtures,
but we haven't gotten around to address it yet.

Long term I think we should have all fixtures dockerized and then make sure
we don't leave containers running, like we do for test clusters.

@bizybot
Copy link
Contributor Author

bizybot commented Jul 9, 2019

failed because of existing issue #43889
@elasticmachine run elasticsearch-ci/2

@bizybot
Copy link
Contributor Author

bizybot commented Jul 9, 2019

Hi @atorok @jbaiera, For now, I have removed the hardcoding of IPC ports which caused PR build failures when running in parallel. I will create an issue for dockerizing the fixture that can be taken up later. Thank you.

Copy link
Contributor

@alpar-t alpar-t left a comment

Choose a reason for hiding this comment

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

Thanks for taking this on!

Copy link
Member

@jbaiera jbaiera left a comment

Choose a reason for hiding this comment

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

LGTM

@bizybot bizybot merged commit 8d87ab7 into elastic:master Jul 10, 2019
bizybot added a commit to bizybot/elasticsearch that referenced this pull request Jul 12, 2019
Due to recent changes are done for converting `repository-hdfs` to test
clusters (elastic#41252), the `integTestSecure*` tasks did not depend on
`secureHdfsFixture` which when running would fail as the fixture
would not be available. This commit adds the dependency of the fixture
to the task.

The `secureHdfsFixture` is a `AntFixture` which is spawned a process.
Internally it waits for 30 seconds for the resources to be made available.
For my local machine, it took almost 45 seconds to be available so I have
added the wait time as an input to the `AntFixture` defaults to 30 seconds
 and set it to 60 seconds in case of secure hdfs fixture.

The integ test for secure hdfs was disabled for a long time and so
the changes done in elastic#42090 to fix the tests are also done in this commit.
bizybot added a commit to bizybot/elasticsearch that referenced this pull request Jul 12, 2019
Due to recent changes are done for converting `repository-hdfs` to test
clusters (elastic#41252), the `integTestSecure*` tasks did not depend on
`secureHdfsFixture` which when running would fail as the fixture
would not be available. This commit adds the dependency of the fixture
to the task.

The `secureHdfsFixture` is a `AntFixture` which is spawned a process.
Internally it waits for 30 seconds for the resources to be made available.
For my local machine, it took almost 45 seconds to be available so I have
added the wait time as an input to the `AntFixture` defaults to 30 seconds
 and set it to 60 seconds in case of secure hdfs fixture.

The integ test for secure hdfs was disabled for a long time and so
the changes done in elastic#42090 to fix the tests are also done in this commit.
bizybot added a commit to bizybot/elasticsearch that referenced this pull request Jul 12, 2019
Due to recent changes are done for converting `repository-hdfs` to test
clusters (elastic#41252), the `integTestSecure*` tasks did not depend on
`secureHdfsFixture` which when running would fail as the fixture
would not be available. This commit adds the dependency of the fixture
to the task.

The `secureHdfsFixture` is a `AntFixture` which is spawned a process.
Internally it waits for 30 seconds for the resources to be made available.
For my local machine, it took almost 45 seconds to be available so I have
added the wait time as an input to the `AntFixture` defaults to 30 seconds
 and set it to 60 seconds in case of secure hdfs fixture.

The integ test for secure hdfs was disabled for a long time and so
the changes done in elastic#42090 to fix the tests are also done in this commit.
bizybot added a commit that referenced this pull request Jul 12, 2019
Due to recent changes are done for converting `repository-hdfs` to test
clusters (#41252), the `integTestSecure*` tasks did not depend on
`secureHdfsFixture` which when running would fail as the fixture
would not be available. This commit adds the dependency of the fixture
to the task.

The `secureHdfsFixture` is a `AntFixture` which is spawned a process.
Internally it waits for 30 seconds for the resources to be made available.
For my local machine, it took almost 45 seconds to be available so I have
added the wait time as an input to the `AntFixture` defaults to 30 seconds
 and set it to 60 seconds in case of secure hdfs fixture.

The integ test for secure hdfs was disabled for a long time and so
the changes done in #42090 to fix the tests are also done in this commit.
bizybot added a commit that referenced this pull request Jul 12, 2019
Due to recent changes are done for converting `repository-hdfs` to test
clusters (#41252), the `integTestSecure*` tasks did not depend on
`secureHdfsFixture` which when running would fail as the fixture
would not be available. This commit adds the dependency of the fixture
to the task.

The `secureHdfsFixture` is a `AntFixture` which is spawned a process.
Internally it waits for 30 seconds for the resources to be made available.
For my local machine, it took almost 45 seconds to be available so I have
added the wait time as an input to the `AntFixture` defaults to 30 seconds
 and set it to 60 seconds in case of secure hdfs fixture.

The integ test for secure hdfs was disabled for a long time and so
the changes done in #42090 to fix the tests are also done in this commit.
bizybot added a commit that referenced this pull request Jul 12, 2019
Due to recent changes are done for converting `repository-hdfs` to test
clusters (#41252), the `integTestSecure*` tasks did not depend on
`secureHdfsFixture` which when running would fail as the fixture
would not be available. This commit adds the dependency of the fixture
to the task.

The `secureHdfsFixture` is a `AntFixture` which is spawned a process.
Internally it waits for 30 seconds for the resources to be made available.
For my local machine, it took almost 45 seconds to be available so I have
added the wait time as an input to the `AntFixture` defaults to 30 seconds
 and set it to 60 seconds in case of secure hdfs fixture.

The integ test for secure hdfs was disabled for a long time and so
the changes done in #42090 to fix the tests are also done in this commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >test Issues or PRs that are addressing/adding tests v7.4.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants