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

Indexserver & nameserver roles in cluster sites #2311

Merged
merged 7 commits into from
Feb 15, 2024

Conversation

CDimonaco
Copy link
Member

Description

This PR adds the support to nameserver and indexserver roles in cluster nodes.

image

The roles are extracted from node attributes.
The roles are separated by ":", the role string is splitted on the ":" character.

In scale up

4:P:master1:master:worker:master

Nameserver is at index 3, and Indexserver at index 5

In scale out

master1:master:worker:master

Nameserver is at index 1 and Indexserver at index 3

How was this tested?

Automated tests, frontend, backend and e2e

@CDimonaco CDimonaco added enhancement New feature or request javascript Pull requests that update Javascript code elixir Pull requests that update Elixir code env Create an ephimeral environment for the pr branch labels Feb 14, 2024
@CDimonaco CDimonaco self-assigned this Feb 14, 2024
@CDimonaco CDimonaco force-pushed the indexserver_nameserver_role branch 2 times, most recently from e2891f8 to a8d6ef2 Compare February 14, 2024 14:59
Copy link
Contributor

@abravosuse abravosuse left a comment

Choose a reason for hiding this comment

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

Code apart, it looks good to me @CDimonaco !. For the sake of authenticity we might want to update the story book for HANA scale-out taking into account:

  • in a given site, there can only be one master nameserver, the rest are slaves
  • in a given site, there can only be one master indexserver, the rest are slaves or standby
  • in the nodes that are not part of a site (other), there is no nameserver nor indexserver.

Copy link
Contributor

@arbulu89 arbulu89 left a comment

Choose a reason for hiding this comment

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

Really nice job @CDimonaco
I put some comments, but it is great in general. No need for a new review (unless you have some question)

lib/trento/discovery/policies/cluster_policy.ex Outdated Show resolved Hide resolved
test/support/factory.ex Outdated Show resolved Hide resolved
test/trento_web/controllers/v2/cluster_controller_test.exs Outdated Show resolved Hide resolved
@CDimonaco CDimonaco force-pushed the indexserver_nameserver_role branch 2 times, most recently from d21ef23 to bee9855 Compare February 15, 2024 15:00
Copy link
Contributor

@arbulu89 arbulu89 left a comment

Choose a reason for hiding this comment

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

🔝

@CDimonaco CDimonaco merged commit 95fae37 into main Feb 15, 2024
24 checks passed
@CDimonaco CDimonaco deleted the indexserver_nameserver_role branch February 15, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
elixir Pull requests that update Elixir code enhancement New feature or request env Create an ephimeral environment for the pr branch javascript Pull requests that update Javascript code
Development

Successfully merging this pull request may close these issues.

None yet

3 participants