-
Notifications
You must be signed in to change notification settings - Fork 592
HDDS-4622. Use single ratis server in MiniOzoneCluster tests for SCM #1733
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
Closed
amaliujia
wants to merge
11
commits into
apache:HDDS-2823
from
amaliujia:HDDS-2823-single-ratis-server
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2468a6e
switch scm from MockRatisServer to true Ratis server
amaliujia a0dc4ba
update
amaliujia 7f72f9f
fixup! fix address already used
amaliujia 3c3939f
trigger new CI check
amaliujia c44568a
fixup! fix not leader issue
amaliujia 3d6db35
trigger new CI check
amaliujia 015634b
fixup! remove useless port setup
amaliujia 867c562
fixup! fix checkstyle
amaliujia f4d65ea
fixup! disabled SCMHAManager in failing tests
amaliujia 1827ee8
trigger new CI check
amaliujia 1be5adb
trigger new CI check
amaliujia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -169,17 +169,21 @@ public void waitForClusterToBeReady() | |
| throws TimeoutException, InterruptedException { | ||
| GenericTestUtils.waitFor(() -> { | ||
| final int healthy = scm.getNodeCount(HEALTHY); | ||
| // When SCM HA is not enabled, scm is always leader. | ||
| final boolean checkScmLeader = scm.checkLeader(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good! |
||
| final boolean isNodeReady = healthy == hddsDatanodes.size(); | ||
| final boolean exitSafeMode = !scm.isInSafeMode(); | ||
|
|
||
| LOG.info("{}. Got {} of {} DN Heartbeats.", | ||
| isNodeReady ? "Nodes are ready" : "Waiting for nodes to be ready", | ||
| healthy, hddsDatanodes.size()); | ||
| LOG.info(checkScmLeader ? "SCM became leader" : | ||
| "SCM has not become leader"); | ||
| LOG.info(exitSafeMode ? "Cluster exits safe mode" : | ||
| "Waiting for cluster to exit safe mode", | ||
| healthy, hddsDatanodes.size()); | ||
|
|
||
| return isNodeReady && exitSafeMode; | ||
| return isNodeReady && exitSafeMode && checkScmLeader; | ||
| }, 1000, waitForClusterToBeReadyTimeout); | ||
| } | ||
|
|
||
|
|
@@ -631,7 +635,12 @@ protected StorageContainerManager createSCM() | |
| configureSCM(); | ||
| SCMStorageConfig scmStore = new SCMStorageConfig(conf); | ||
| initializeScmStorage(scmStore); | ||
| StorageContainerManager scm = TestUtils.getScmSimple(conf); | ||
| StorageContainerManager scm; | ||
| if (useMockSCMHAManager) { | ||
| scm = TestUtils.getScm(conf); | ||
| } else { | ||
| scm = TestUtils.getScmSimple(conf); | ||
| } | ||
| HealthyPipelineSafeModeRule rule = | ||
| scm.getScmSafeModeManager().getHealthyPipelineSafeModeRule(); | ||
| if (rule != null) { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is workaround to config SCM ratis storage dir value. The usual way that config value in SCMHAConfiguration seems break. I will file a JIRA to fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://issues.apache.org/jira/browse/HDDS-4624
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We won't need this line of change after #1739