Skip to content

Conversation

@neils-dev
Copy link
Contributor

@neils-dev neils-dev commented May 4, 2023

What changes were proposed in this pull request?

Changes to SCM decommission command to support decommissioning of primordial SCM node.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-8518

How was this patch tested?

Manual testing - decommissioning primordial scm node:

Bring up cluster with SCM-HA 3 nodes, primary scm nodeid = scm1

bash-4.2$ ozone admin scm roles   
scm1.org:9894:LEADER:3f61f995-7316-47a5-ba1f-255749874c7d:172.25.0.116
scm3.org:9894:FOLLOWER:9ab89602-7c32-4f52-8c78-5f9a620ef70a:172.25.0.118
scm2.org:9894:FOLLOWER:35b1e08f-660c-4c7c-86d3-7a02e082b2a8:172.25.0.117

Transfer scm leader to non-primordial node, scmid=scm3

bash-4.2$ ozone admin scm transfer --newLeaderId=9ab89602-7c32-4f52-8c78-5f9a620ef70a
Transfer leadership successfully to 9ab89602-7c32-4f52-8c78-5f9a620ef70a.

Decommission primordial scm node:

bash-4.2$ ozone admin scm decommission --nodeid=3f61f995-7316-47a5-ba1f-255749874c7d
Decommissioned Scm 3f61f995-7316-47a5-ba1f-255749874c7d

bash-4.2$ ozone admin scm roles
scm3.org:9894:LEADER:9ab89602-7c32-4f52-8c78-5f9a620ef70a:172.25.0.118
scm2.org:9894:FOLLOWER:35b1e08f-660c-4c7c-86d3-7a02e082b2a8:172.25.0.117

@neils-dev neils-dev requested a review from nandakumar131 May 4, 2023 02:15
@neils-dev neils-dev added the gr label May 4, 2023
@ChenSammi
Copy link
Contributor

@neils-dev , thanks for working on this. The patch overall looks good. Could you add a robot smoke test for this decommission process? Robot test can be put under hadoop-ozone/dist/src/main/smoketest/scmha.

@neils-dev
Copy link
Contributor Author

Thanks @ChenSammi. Added robot test for testing scm decommissioning. Tested in ozonesecure-ha.

Robot test can be put under hadoop-ozone/dist/src/main/smoketest/scmha.

@ChenSammi
Copy link
Contributor

Thanks @neils-dev, the patch LGTM +1.

@ChenSammi ChenSammi merged commit 72b5de7 into apache:master May 8, 2023
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.

2 participants