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

Allow configuring Elasticsearch cluster name #1478

Merged
merged 11 commits into from
Jun 13, 2022
Merged

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented Apr 19, 2022

To support multiple clusters, we need the ability to specify the cluster name when installing an Elasticsearch instance. This is not strictly required, but it prevents Elasticsearch nodes from joining the wrong cluster.

@dnhatn dnhatn requested a review from dliappis April 19, 2022 15:43
@dliappis dliappis requested a review from pquentin April 20, 2022 09:48
@dliappis dliappis added the enhancement Improves the status quo label Apr 20, 2022
Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

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

Can you please look into the lint failures? They're real issues, eg. DockerProvisioner is not instantiated with cluster_name in esrally/mechanic/provisioner.py

Have you tried running the tests locally?

@dnhatn
Copy link
Member Author

dnhatn commented Apr 20, 2022

@pquentin I ran make test but I didn't see any failure. I will look into the lint failure. Thanks for looking.

@pquentin
Copy link
Member

Right, this is a bit confusing. make test only runs unit tests, while make lint runs lint. make check-all will run lint, unit tests and integration tests. The mechanic module is mostly tested by integration tests, so even if they're slow if will be useful to run them.

@dnhatn
Copy link
Member Author

dnhatn commented Apr 20, 2022

@pquentin Great, thank you for the pointer 👍.

@dnhatn dnhatn removed the request for review from dliappis April 20, 2022 15:43
@dnhatn
Copy link
Member Author

dnhatn commented Apr 20, 2022

@pquentin It's ready for another round. Can you take another look? Thank you!

@dnhatn dnhatn requested a review from pquentin April 20, 2022 22:14
Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

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

Thanks!

Can you please add a test? I think we can add --cluster-name={cfg} to TestCluster.install and then at the end of TestCluster.start use the es client to get the cluster name and assert that it is cfg. This won't test all combinations but should be good enough.

esrally/mechanic/provisioner.py Outdated Show resolved Hide resolved
esrally/mechanic/provisioner.py Outdated Show resolved Hide resolved
esrally/rally.py Outdated Show resolved Hide resolved
@dnhatn
Copy link
Member Author

dnhatn commented May 2, 2022

@pquentin Thanks for reviews. I've addressed your comments. Would you please take another look?

@dnhatn dnhatn requested a review from pquentin May 2, 2022 20:14
Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

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

Thanks! There's mostly only documentation left.

docs/cluster_management.rst Outdated Show resolved Hide resolved
docs/cluster_management.rst Outdated Show resolved Hide resolved
docs/command_line_reference.rst Outdated Show resolved Hide resolved
docs/command_line_reference.rst Show resolved Hide resolved
docs/command_line_reference.rst Outdated Show resolved Hide resolved
esrally/rally.py Outdated Show resolved Hide resolved
@dnhatn
Copy link
Member Author

dnhatn commented Jun 13, 2022

@pquentin Sorry for the delay. I switched my focus to other topics recently. I have addressed your comments. Would you mind taking another look? Thank you!

@dnhatn dnhatn requested a review from pquentin June 13, 2022 17:26
Copy link
Member

@pquentin pquentin 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 iterating! LGTM.

@dnhatn
Copy link
Member Author

dnhatn commented Jun 13, 2022

@pquentin @inqueue Thanks for reviewing.

@dnhatn dnhatn merged commit 80d4d8f into elastic:master Jun 13, 2022
@dnhatn dnhatn deleted the cluster_name branch June 13, 2022 19:21
michaelbaamonde pushed a commit to michaelbaamonde/rally that referenced this pull request Jun 15, 2022
To support multiple clusters, we need the ability to specify the cluster 
name when installing an Elasticsearch instance. This is not strictly
required, but it prevents Elasticsearch nodes from joining the wrong
cluster.
@pquentin pquentin added this to the 2.5.0 milestone Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves the status quo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants