errose28 commented on a change in pull request #2257:
URL: https://github.com/apache/ozone/pull/2257#discussion_r636945091
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java
##########
@@ -962,6 +963,11 @@ public static boolean scmInit(OzoneConfiguration conf,
return false;
}
} else {
+ // If SCM HA was not being used before pre-finalize, and is being used
+ // when the cluster is pre-finalized for the SCM HA feature, init
+ // should fail.
+ ScmHAUnfinalizedStateValidationAction.checkScmHA(conf, scmStorageConfig);
+
clusterId = scmStorageConfig.getClusterID();
final boolean isSCMHAEnabled = scmStorageConfig.isSCMHAEnabled();
if (SCMHAUtils.isSCMHAEnabled(conf) && !isSCMHAEnabled) {
Review comment:
Good catch, thanks @guihecheng . The problem here is that the upgrade
framework will only run upgrade actions in pre-finalized cluster, but because I
kind of had to side-step the upgrade framework's action runner here to execute
this statically, it is actually being run in finalized clusters too. This can
be seen in the latest integration test failure:
https://github.com/apache/ozone/pull/2257/checks?check_run_id=2631515596. I
will add a pre-finalization check to this call, which will differentiate it
from the if-else check here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]