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

HDDS-11959. Remove tests for non-Ratis SCM #7612

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chungen0126
Copy link
Contributor

What changes were proposed in this pull request?

Remove tests that exercise non-Ratis SCM.

Please describe your PR in detail:

  1. Remove tests for non-Ratis SCM
  2. Remove unnecessary "Enable SCM Ratis" config.
  3. Integration tests with SCM HA Enabled not working with MiniOzoneClusterImpl. (should be fixed in HDDS-6897)
  4. Disable test cases in SCM unit tests where test implementation is specific to non-Ratis mode (should be updated in HDDS-11986)

What is the link to the Apache JIRA

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

How was this patch tested?

https://github.com/chungen0126/ozone/actions/runs/12473049289

@chungen0126 chungen0126 marked this pull request as ready for review December 24, 2024 04:34
Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @chungen0126 for the patch.

There are some leftover references in tests:

conf.setBoolean(ScmConfigKeys.OZONE_SCM_HA_ENABLE_KEY, true);

conf.setBoolean(ScmConfigKeys.OZONE_SCM_HA_ENABLE_KEY, true);

conf.setBoolean(ScmConfigKeys.OZONE_SCM_HA_ENABLE_KEY, false);

(please check if TestSecureOzoneCluster works without this setting)

Also in MiniOzoneClusterImpl:

//TODO: HDDS-6897
//Disabling Ratis for only of MiniOzoneClusterImpl.
//MiniOzoneClusterImpl doesn't work with Ratis enabled SCM
if (StringUtils.isNotEmpty(
conf.get(ScmConfigKeys.OZONE_SCM_HA_ENABLE_KEY))
&& SCMHAUtils.isSCMHAEnabled(conf)) {
scmStore.setSCMHAFlag(true);
scmStore.persistCurrentState();
SCMRatisServerImpl.initialize(clusterId, scmId,
SCMHANodeDetails.loadSCMHAConfig(conf, scmStore)
.getLocalNodeDetails(), conf);
}

@chungen0126
Copy link
Contributor Author

Thanks @adoroszlai for reviewing.

There are some leftover references in tests:

conf.setBoolean(ScmConfigKeys.OZONE_SCM_HA_ENABLE_KEY, true);

conf.setBoolean(ScmConfigKeys.OZONE_SCM_HA_ENABLE_KEY, true);

(please check if TestSecureOzoneCluster works without this setting)

Also in MiniOzoneClusterImpl:

//TODO: HDDS-6897
//Disabling Ratis for only of MiniOzoneClusterImpl.
//MiniOzoneClusterImpl doesn't work with Ratis enabled SCM
if (StringUtils.isNotEmpty(
conf.get(ScmConfigKeys.OZONE_SCM_HA_ENABLE_KEY))
&& SCMHAUtils.isSCMHAEnabled(conf)) {
scmStore.setSCMHAFlag(true);
scmStore.persistCurrentState();
SCMRatisServerImpl.initialize(clusterId, scmId,
SCMHANodeDetails.loadSCMHAConfig(conf, scmStore)
.getLocalNodeDetails(), conf);
}

I'm leaving the reference in MiniOzoneClusterImpl because that enabling SCM Ratis in all tests with MiniOzoneClusterImpl leads to many tests failures. TestSCMSnapshot.java and TestSCMInstallSnapshot.java should set OZONE_SCM_HA_ENABLE_KEY to true because MiniOzoneClusterImpl is non-Ratis SCM by default.
I believe we should fix this in HDDS-6897.

(please check if TestSecureOzoneCluster works without this setting)

TestSecureOzoneCluster doesn't work with OZONE_SCM_HA_ENABLE_KEY set to true but works without it. However, MiniOzoneClusterImpl is non-Ratis SCM by default.

I'll convert this to draft and fix HDDS-6897 first. I think that would make the change clearer.

@chungen0126 chungen0126 marked this pull request as draft December 24, 2024 09:42
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