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

Awareness attribute decommission backports #4970

Merged
merged 11 commits into from
Nov 2, 2022

Conversation

imRishN
Copy link
Member

@imRishN imRishN commented Oct 28, 2022

Description

Backports following PRs from Decommission Project -

  1. Add DecommissionService and helper to execute awareness attribute decommissioning #4084
  2. Add APIs (GET/PUT) to decommission awareness attribute #4261
  3. Controlling discovery for decommissioned nodes #4590
  4. Fix decommission status update to non leader nodes #4800
  5. Remove redundant field from GetDecommissionStateResponse #4751
  6. Service Layer changes for Recommission API #4320
  7. Recommission api level support #4604
  8. Fix bug in AwarenessAttributeDecommissionIT #4822

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

imRishN and others added 8 commits October 28, 2022 11:51
…ommissioning (opensearch-project#4084)

* Add Executor to decommission node attribute
* Decommission service implementation with cluster metadata
* Master abdication changes to decommission local awareness leader
* Update join validator changes to validate decommissioned node join request

Signed-off-by: Rishab Nahata <[email protected]>
…oject#4261)

* Add APIs (GET/PUT) to decommission awareness attribute

Signed-off-by: Rishab Nahata <[email protected]>
* Recommission API service level changes

Signed-off-by: pranikum <[email protected]>
Signed-off-by: Rishab Nahata <[email protected]>
* Add changes for Recommission API

Signed-off-by: pranikum <[email protected]>
Signed-off-by: Rishab Nahata <[email protected]>
* Controlling discovery for decommissioned nodes

Signed-off-by: Rishab Nahata <[email protected]>
…t#4800)

* Fix decommission status update to non leader nodes

Signed-off-by: Rishab Nahata <[email protected]>
…project#4751)

* Add attribute name to query param and simplify GetDecommissionStateResponse

Signed-off-by: Rishab Nahata <[email protected]>
* Fix bug in AwarenessAttributeDecommissionIT

Signed-off-by: Rishab Nahata <[email protected]>
@imRishN imRishN requested review from a team and reta as code owners October 28, 2022 07:53
@imRishN imRishN changed the title Decommission 2.x Decommission Project Backports Oct 28, 2022
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@imRishN imRishN changed the title Decommission Project Backports Awareness attribute decommission backports Oct 28, 2022
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@codecov-commenter
Copy link

Codecov Report

Merging #4970 (f27d3fe) into 2.x (26abe78) will increase coverage by 0.00%.
The diff coverage is 54.61%.

@@            Coverage Diff             @@
##                2.x    #4970    +/-   ##
==========================================
  Coverage     70.65%   70.66%            
- Complexity    57658    57829   +171     
==========================================
  Files          4620     4645    +25     
  Lines        276220   276891   +671     
  Branches      40422    40490    +68     
==========================================
+ Hits         195171   195671   +500     
- Misses        64771    64894   +123     
- Partials      16278    16326    +48     
Impacted Files Coverage Δ
.../delete/DeleteDecommissionStateRequestBuilder.java 0.00% <0.00%> (ø)
...reness/get/GetDecommissionStateRequestBuilder.java 0.00% <0.00%> (ø)
...sion/awareness/put/DecommissionRequestBuilder.java 0.00% <0.00%> (ø)
.../org/opensearch/client/support/AbstractClient.java 33.25% <0.00%> (-1.01%) ⬇️
...rg/opensearch/common/settings/ClusterSettings.java 91.89% <ø> (ø)
...eness/get/TransportGetDecommissionStateAction.java 23.07% <23.07%> (ø)
...arch/cluster/decommission/DecommissionService.java 29.22% <29.22%> (ø)
...rg/opensearch/cluster/coordination/JoinHelper.java 85.56% <33.33%> (-1.74%) ⬇️
...r/decommission/DecommissioningFailedException.java 33.33% <33.33%> (ø)
...on/awareness/get/GetDecommissionStateResponse.java 42.85% <42.85%> (ø)
... and 512 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@@ -142,7 +142,7 @@ public String getWriteableName() {

@Override
public Version getMinimalSupportedVersion() {
return Version.V_3_0_0;
return Version.V_2_4_0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this the only place we have versioning enabled? What happens to clusters running mixed version 2.0 and 2.4 lets say

Copy link
Member Author

Choose a reason for hiding this comment

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

Two more places -

DECOMMISSIONING_FAILED_EXCEPTION(
            org.opensearch.cluster.decommission.DecommissioningFailedException.class,
            org.opensearch.cluster.decommission.DecommissioningFailedException::new,
            163,
            V_2_4_0
        ),
        NODE_DECOMMISSIONED_EXCEPTION(
            org.opensearch.cluster.decommission.NodeDecommissionedException.class,
            org.opensearch.cluster.decommission.NodeDecommissionedException::new,
            164,
            V_2_4_0
        );

@Bukhtawar Bukhtawar merged commit b9f817f into opensearch-project:2.x Nov 2, 2022
imRishN added a commit to imRishN/OpenSearch that referenced this pull request Nov 3, 2022
* Add DecommissionService and helper to execute awareness attribute decommissioning opensearch-project#4084
* Add APIs (GET/PUT) to decommission awareness attribute opensearch-project#4261
* Controlling discovery for decommissioned nodes opensearch-project#4590
* Fix decommission status update to non leader nodes opensearch-project#4800
* Remove redundant field from GetDecommissionStateResponse opensearch-project#4751
* Service Layer changes for Recommission API opensearch-project#4320
* Recommission api level support opensearch-project#4604
* Fix bug in AwarenessAttributeDecommissionIT opensearch-project#4822

Signed-off-by: Rishab Nahata <[email protected]>
imRishN added a commit to imRishN/OpenSearch that referenced this pull request Nov 3, 2022
* Add DecommissionService and helper to execute awareness attribute decommissioning opensearch-project#4084
* Add APIs (GET/PUT) to decommission awareness attribute opensearch-project#4261
* Controlling discovery for decommissioned nodes opensearch-project#4590
* Fix decommission status update to non leader nodes opensearch-project#4800
* Remove redundant field from GetDecommissionStateResponse opensearch-project#4751
* Service Layer changes for Recommission API opensearch-project#4320
* Recommission api level support opensearch-project#4604
* Fix bug in AwarenessAttributeDecommissionIT opensearch-project#4822

Signed-off-by: Rishab Nahata <[email protected]>
Bukhtawar pushed a commit that referenced this pull request Nov 3, 2022
* Awareness attribute decommission backports (#4970)
* Add DecommissionService and helper to execute awareness attribute decommissioning #4084
* Add APIs (GET/PUT) to decommission awareness attribute #4261
* Controlling discovery for decommissioned nodes #4590
* Fix decommission status update to non leader nodes #4800
* Remove redundant field from GetDecommissionStateResponse #4751
* Service Layer changes for Recommission API #4320
* Recommission api level support #4604
* Fix bug in AwarenessAttributeDecommissionIT #4822

Signed-off-by: Rishab Nahata <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants